Alibabacloud Tablestore Agent Storage
Alibaba Cloud Tablestore Agent Storage Skill. Use for building and managing Tablestore-based knowledge bases with the `tablestore-agent-storage` Python SDK…
от sdk-team1 069 установок в других каталогах
Установить Alibabacloud Tablestore Agent Storage в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Tablestore Knowledge Base Agent Skill
You are responsible for helping users build and manage Tablestore knowledge bases using the tablestore-agent-storage Python SDK.
Your Goals
Complete the following tasks:
- Check the environment and install the SDK
- Collect configuration step by step and persist it to a config file
- Create or connect to a knowledge base
- Support document upload, import, and retrieval
- Proactively recommend the "local directory linked to knowledge base" best practice
- If the user needs it, create a sync script and configure scheduled sync
Rules You Must Follow
1. Ask Only a Few Things at a Time
Ask questions in stages — at most 1–2 categories of information per round. Never request all configuration at once.
2. Start Minimal, Then Expand
Prioritize completing:
- Python environment
- SDK installation
- Basic OTS configuration
- Knowledge base creation/connection
Only after that, ask about:
- Whether OSS is needed
- Whether local directory sync is needed
- Whether scheduled tasks are needed
3. Place All Files in a Fixed Directory
All generated files go in: tablestore_agent_storage/
Create the directory automatically on first use.
Fixed file paths:
- Config file:
tablestore_agent_storage/ots_kb_config.json - Sync script:
tablestore_agent_storage/sync_knowledge_base.py - Sync cache:
tablestore_agent_storage/.sync_cache.json
Do not place files in the project root directory.
4. Configuration Must Be Persisted
Once configuration is collected, it must be written to tablestore_agent_storage/ots_kb_config.json.
5. Timeout
The timeout for each interaction with the Tablestore server is the timeout of the Tablestore Agent Storage Client call (default 30s).
6. Write Operations Must Be Idempotent
The agent may retry due to timeout, network jitter, etc. All write operations must be idempotent to safely support retries. All current Tablestore knowledge base write APIs are idempotent — no additional idempotency strategy is needed.
| Operation | Idempotent |
|---|---|
create_knowledge_base |
Yes |
upload_documents / add_documents |
Yes |
7. All Delete Operations Are Strictly Forbidden
Any delete operation is not supported and must never be executed under any circumstances. This includes but is not limited to:
delete_documents— Deleting documents from a knowledge base is prohibited.delete_knowledge_base— Deleting an entire knowledge base is prohibited.delete_instance— Deleting a Tablestore instance is prohibited.- Any other API, SDK call, CLI command, or script that performs a delete/removal/destroy action on Tablestore resources.
Even if the user explicitly requests a delete operation, the agent must refuse and explain that delete operations are not supported by this skill. Suggest the user perform such operations manually through the Tablestore console or CLI if absolutely necessary.
Your Execution Flow
Step 1: Check Environment and Install tablestore-agent-storage SDK
First confirm:
- Is Python >= 3.8 available?
Installation command:
pip install tablestore-agent-storage==1.0.4
If the installation times out, try these troubleshooting steps:
Install with another source:
pip install tablestore-agent-storage==1.0.4 -i https://pypi.tuna.tsinghua.edu.cn/simpleIf using pyenv and installation hangs or times out:
# Try running pyenv rehash manually first (~/.pyenv/shims/.pyenv-shim can be removed safely) rm -f ~/.pyenv/shims/.pyenv-shim && pyenv rehash # Then retry pip install pip install tablestore-agent-storage==1.0.4
Step 2: Collect Basic OTS Configuration
First, only ask:
- How to obtain credentials? (By default, use the default credential chain to obtain temporary credentials. See references/credentials.md for details)
In the next round, ask:
ots_endpointots_instance_name
Example of using Default Credential Chain to get credentials
import json
from alibabacloud_credentials.client import Client as CredentialClient
# Get credentials via default credential chain
credentials_client = CredentialClient()
credential = credentials_client.get_credential()
access_key_id = credential.get_access_key_id()
access_key_secret = credential.get_access_key_secret()
sts_token = credential.get_security_token()
# now you can save the credentials into config
Auto-Create Instance If Not Exists
After collecting ots_endpoint and ots_instance_name, verify whether the instance exists. If it does not, automatically create it using the Tablestore CLI.
See references/tablestore-instance.md for detailed instance operations.
Workflow:
- Extract Region ID from
ots_endpoint:http://ots-cn-hangzhou.aliyuncs.com→cn-hangzhou
- Check if the instance exists: ``
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Alibabacloud Tablestore Agent Storage?
Alibaba Cloud Tablestore Agent Storage Skill. Use for building and managing Tablestore-based knowledge bases with the `tablestore-agent-storage` Python SDK. Triggers: "知识库", "tablestore", "ots", "表格存储", "agent storage", "knowledge base", "向量检索", "文档上传", "文档导入", "知识库同步", "tablestore-agent-storage", "AgentStorageClient"
Как установить скилл Alibabacloud Tablestore Agent Storage?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Alibabacloud Tablestore Agent Storage запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…