aliyun/alibabacloud-aiops-skills/alibabacloud-analyticdb-postgresql-knowledgebase-ops
Claude Code and agent skill by aliyun/alibabacloud-aiops-skills
- community
Checking that the SKILL.md file is still in the repository.
ADBPG Knowledge Base Management: Create knowledge bases, upload documents, search, Q&A. Triggers: "knowledge base", "document library", "document upload", "knowledge search", "RAG", "Q&A", "embedding", "ADBPG", "AnalyticDB PostgreSQL"
Install
npx vskill@latest install aliyun/alibabacloud-aiops-skills/alibabacloud-analyticdb-postgresql-knowledgebase-opsSKILL.md
The same SKILL.md was published earlier as aliyun/alibabacloud-aiops-skills/alibabacloud-analyticdb-postgresql-knowledgebase-ops.
ADBPG Knowledge Base Management
Build enterprise knowledge bases in three steps: Create Knowledge Base → Upload Documents → Search & Q&A
The system automatically handles document parsing, chunking, vectorization, and index building. Users only need to focus on business logic.
Architecture: ADBPG Instance + Namespace + DocumentCollection + Vector Index + LLM Service
Core Concepts
- Knowledge Base: Container for documents, automatically manages vector indexes (corresponds to DocumentCollection in API)
- Document: Files uploaded to the knowledge base, supports PDF/Word/Markdown/HTML/JSON/CSV/images, etc.
- Q&A: Intelligent conversation based on knowledge base + large language model
Environment Setup
[MUST] CLI User-Agent — Every aliyun CLI command invocation must include: --user-agent AlibabaCloud-Agent-Skills/alibabacloud-analyticdb-postgresql-knowledgebase-ops
[MUST] Enable AI-Mode — AI-mode is required for Agent Skill execution.Run the following commands before any CLI invocation:```bashaliyun configure ai-mode enablealiyun configure ai-mode set-user-agent --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-analyticdb-postgresql-knowledgebase-ops"```
[MUST] Disable AI-Mode at EVERY exit point — Before delivering the final response for ANY reason, always disable AI-mode first. This applies to ALL exit paths: workflow success, workflow failure, error/exception, user cancellation, session end, or any other scenario where no further CLI commands will be executed.AI-mode is only used for Agent Skill invocation scenarios and MUST NOT remain enabled after the skill stops running.```bashaliyun configure ai-mode disable```
Pre-check: Aliyun CLI >= 3.3.3 requiredRunaliyun versionto verify >= 3.3.3. If not installed or version too low,runcurl -fsSL https://aliyuncli.alicdn.com/setup.sh | bashto install/update,or see references/cli-installation-guide.md for installation instructions.Then [MUST] runaliyun configure set --auto-plugin-install trueto enable automatic plugin installation.Then [MUST] runaliyun plugin updateto ensure that any existing plugins on your local machine are always up-to-date.
Pre-check: Alibaba Cloud Credentials RequiredSecurity Rules:- NEVER read, echo, or print credential material (including environment-based secrets)- NEVER ask the user to paste long-lived secrets directly in the conversation or command line- NEVER usealiyun configure setwith literal credential values- ONLY usealiyun configure listto check credential status```bashaliyun configure list```Check the output for a valid profile (AK, STS, or OAuth identity).If no valid profile exists, STOP here.1. Obtain credentials from Alibaba Cloud Console2. Configure credentials outside of this session (viaaliyun configurein terminal or environment variables in shell profile)3. Return and re-run afteraliyun configure listshows a valid profile
Verify CLI Credentials
Script dependencies (Python)
`scripts/upload_document_local.py` uses the Alibaba Cloud Python SDK. Declare dependencies in `requirements.txt`. Install before running the script:
Requires Python 3.7+ (same baseline as Alibaba Cloud SDK for Python).
RAM Permissions
[MUST] RAM Permission Pre-check: Before executing operations, verify current user has required permissions.Useram-permission-diagnoseskill to check permissions, then compare against references/ram-policies.md.If any permission is missing, abort and prompt user.
Parameter Confirmation
IMPORTANT: Parameter Confirmation — Before executing any command or API call,ALL user-customizable parameters (e.g., RegionId, instance names, CIDR blocks,passwords, domain names, resource specifications, etc.) MUST be confirmed with theuser. Do NOT assume or use default values without explicit user approval.
| Parameter | Required/Optional | Description | Default Value | |
|---|---|---|---|---|
| biz-region-id | Required | Region ID | cn-hangzhou | |
| db-instance-id | Required | Instance ID (format: gp-xxxxx) | - | |
| manager-account | Required | Manager account name | - | |
| manager-account-password | Required | Manager account password | - | |
| namespace | Optional | Namespace name | public | |
| namespace-password | Required | Namespace password | - | |
| collection | Required | Knowledge base name | - | |
| embedding-model | Optional | Embedding model | text-embedding-v4 | |
| dimension | Optional | Vector dimension | 1024 |
Note: If the knowledge base is created in a custom namespace, all subsequent operations must specify the same namespace parameter.
For interaction guidelines, smart defaults, and best practices, see references/interaction-guidelines.md.
Documentation placeholders: CLI examples use strings like<manager-account-password>and<namespace-password>. Replace them with real values from the user; never commit or log real passwords in docs, tickets, or chat.
Timeout Configuration
Timeout Rules: All operations must complete within reasonable time limits.- Standard operations: ≤10 seconds (create/list/query)- Upload document async: No timeout limit (async job, poll every 5-10s)
CLI Timeout Settings:
Python SDK (default credential chain + timeouts + User-Agent):
Use CredentialClient() with no arguments so the SDK resolves credentials via the default chain (same sources as the CLI). Do not parse credential files or pass raw keys in skill code. Set user_agent and HTTP timeouts on Config (milliseconds).
Core Workflow
1. Knowledge Base Management
Create Knowledge Base
Pre-checks (run in order; not silent idempotency):
- Duplicate names: If a create step is run again when the resource already exists, the API returns a clear error (e.g. conflict / already exists). Do not create duplicate resources; interpret already-exists-style errors as “this step is satisfied” only when the response clearly indicates the resource is present, then continue the workflow.
- Retries / ClientToken: For network-level retries (e.g. timeout), use ClientToken when the API or
aliyun gpdbexposes it for that subcommand—checkaliyun gpdb <subcommand> --help. The examples below omit it when the plugin does not list it globally.
Important: CreateNamespace MUST be executed before CreateDocumentCollection
Create knowledge base:
List Knowledge Bases
List Namespaces
2. Document Management
Upload Document (Public URL)
Upload Document (Local File - SDK)
Local files use Python SDK upload_document_async_advance. Do not paste multi-line Python into the skill; use the packaged script only (default credential chain, user_agent, Config timeouts, and RuntimeOptions timeouts — see scripts/upload_document_local.py).
See scripts/upload_document_local.py.
Poll Upload Progress
List Documents
3. Search & Q&A
Search Knowledge Base
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/database/adb/alibabacloud-analyticdb-postgresql-knowledgebase-ops/SKILL.md
Popularity
- Repository stars
- 216
- Repository forks
- 27
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/aliyun/alibabacloud-aiops-skills/alibabacloud-analyticdb-postgresql-knowledgebase-ops)