You need to enable JavaScript to run this app.
Database Workshop

Database Workshop

Copy page
Download PDF
Best practices
How to use Database-Skill for agent's smart queries, data analysis, and troubleshooting
Copy page
Download PDF
How to use Database-Skill for agent's smart queries, data analysis, and troubleshooting
Database-skill transforms database capabilities from being exclusively for Database Administrators (DBAs) to being accessible to everyone. Developers, product managers, and operations staff can now directly query databases, generate reports, and troubleshoot issues. This eliminates the need to rely on others, wait for ticket processing, or memorize SQL syntax. This article explains how to leverage Database-Skill to enable intelligent querying, data analysis, and troubleshooting.​
Background​
Designed for AI assistants supporting the Agent Skills protocol, Database-Skill provides capabilities for database querying, data analysis, and troubleshooting, seamlessly integrating complex database operations into conversational workflows. Once integrated, you can describe your intent in natural language. The Agent will then automatically orchestrate and execute tasks such as data exploration, query analysis, fault diagnosis, and optimization recommendations.​
Currently supports OpenClaw, Trae-CN, and ArkClaw. Other Coding Agents compatible with the Agent Skills Agreement also have a foundation for integration, with specific availability subject to actual adaptation and verification results.​
Process overview​
AI assistants supporting the Agent Skills protocol, such as OpenClaw, Trae-CN, and ArkClaw, have achieved an upgrade in interaction paradigms from 'button-driven' to 'intent-driven'. In the console, you no longer need to search for specific operation entries; simply express your business requirements directly. Its underlying architecture adopts a three-tier collaborative model:​
  • Instruction parsing layer: AI assistants supporting the Agent Skills protocol, such as OpenClaw, Trae-CN, and ArkClaw, are responsible for processing your natural language inputs, accurately understanding and extracting the core intent.​
  • Capability routing layer: Serving as an intermediate hub, Database-Skill is responsible for accurately routing the parsed intent to the corresponding database processing capabilities.​
  • Execution engine layer: The database workspace or data source connection module then takes over, ultimately executing specific queries, analyses, and diagnostic actions.​
Supported function​
  • Metadata Exploration: Supports browsing instance and database lists, and provides in-depth analysis of table structures and field-level information.​
  • Data analysis: Provides capabilities for natural language data querying, multi-dimensional statistical analysis, visual report generation, and multi-source joint queries.​
  • Operation and maintenance diagnosis: Covers slow query analysis, deadlock and lock wait troubleshooting, tablespace monitoring, error log retrieval, and automated health inspections.​
  • Development changes: Support DML/DDL ticket creation, approval workflow tracking, and automatic SQL specification validation.​
  • Data governance: Enable global asset inventory, data profiling, data quality checks, and sensitive data security scanning.​
Applicable scenarios​
​
Scenario​
What the Agent can do for you​
Intelligent Query​
View instances, list databases, check table structures, read sample data, and generate queries in natural language.​
Data Analysis​
Analyze data around trends, aggregation, distribution, and correlations, and generate visual reports.​
Troubleshooting​
Execute standard troubleshooting paths for issues such as slow queries, slow SQL, full connections, and abnormal resource levels, and provide optimization suggestions.​
​
Advantages​
  • Eliminate multi-tool switching: Complete all database operations in one dialog without repeatedly switching between the console, Grafana, and ticket systems.​
  • Lower the expertise barrier: No need to memorize table structures or complex SQL syntax; natural language is directly converted into precise queries and charts.​
  • Intelligent decision support: Not only identifies slow queries but also automatically provides context-aware professional optimization suggestions.​
  • Streamlined closed-loop process: Complete the entire cycle from data insights to change requests through conversation, significantly shortening troubleshooting and operations workflows.​
Prerequisites​
Before you start installation and configuration, ensure that you have completed the following preparations:​
  • Instance connection: Your instance has been connected to the DBW console. For detailed steps, refer to Connect an instance.​
  • Obtain access keys: To enable the AI assistant connected to Database-skill to interact with Volcano Engine services via API, you need to generate and obtain access keys.​
  1. On the API Access Key management page.​
  1. Create or obtain a valid pair of Access Key ID and Secret Access Key. These two values correspond to VOLCENGINE_ACCESS_KEY and VOLCENGINE_SECRET_KEY in the subsequent configuration, respectively.​
  1. Also, note the Region where your resources are located, such as cn-beijing.​
Install Database-skill​
This article mainly uses OpenClaw and ArkClaw as examples to introduce how to install Database-skill. In addition to the above assistants, general assistants like Trae-CN that support the Agent Skills Agreement can also load Database-skill. If the installation entry or command format differs, follow the access method of the corresponding assistant.​
​
Install Database skill in OpenClaw
Install Database skill in ArkClaw
​
  1. Install Node.js 22 or later. For details, see Node.js.​
  1. Install OpenClaw​
  1. Select the appropriate command to install OpenClaw based on your operating system​
  • For macOS and Linux:​
  • ​
    curl -fsSL https://openclaw.ai/install.sh | bash​
    ​
  • Windows (using PowerShell):​
  • ​
    iwr -useb https://openclaw.ai/install.ps1 | iex​
    ​
  1. Run the following command to initialize OpenClaw and configure it step by step according to the prompts.​
  • ​
    openclaw onboard --install-daemon​
    ​
  • After successful installation, you can run the openclaw --version command to verify the installation.​
  1. Install Database-skill.​
  1. Run the following command to install Database-Skill.​
  • ​
    npx skills add https://skills.volces.com/skills/volcengine/agentkit-samples -s database-skill​
    ​
  1. For environments that require explicit credential configuration, provide the following configurations via environment variables or a local .env file:​
  • ​
    Configuration item​
    Description​
    Required​
    VOLCENGINE_ACCESS_KEY​
    Volcano Engine Access Key​
    Required​
    VOLCENGINE_SECRET_KEY​
    Volcano Engine Secret Key​
    Required​
    VOLCENGINE_REGION​
    Default region, e.g., cn-beijing​
    Optional​
    VOLCENGINE_INSTANCE_ID​
    Default instance ID​
    Optional​
    VOLCENGINE_DATABASE​
    Default database name​
    Optional​
    ​
tip​
If you frequently view a specific instance, you can pre-configure the default region, instance, and database. This allows you to skip context in many subsequent questions, making your queries more convenient.​
​
Usage example​
You can copy the Prompt from the following Form and replace the object name to perform intelligent queries, data analysis, and troubleshooting.​
​
Scenario​
Ready-to-use prompt​
Metadata exploration​
Show me the tables in [instance_id]'s [database], then display the structure of [table].​
Detailed query​
Query the last 100 records of [table] in [database] on [instance_id].​
Trend analysis​
Analyze [instance_id]'s [database] and its [table], count the number of orders for the last 7 days by day, and output an HTML report.​
Multi-source Integration​
Combine order data from a MySQL instance, user profiles from a PostgreSQL instance, and campaign data from the local marketing_data.xlsx file to analyze ROI per channel.​
Slow query troubleshooting​
[instance_id] What are the slow queries in the last 8 hours? Provide optimization suggestions.​
Health Inspection​
Perform a full inspection on [instance_id] and provide P0/P1/P2 handling suggestions.​
​
​
​
How to make the Agent perform intelligent queries
How to have an Agent perform data analysis
How to have an Agent perform troubleshooting
​
Intelligent query is not just about writing SQL for you, but about having the Agent first understand your goal, then automatically complete the intermediate steps, such as: first listing examples, then querying the table, then querying the structure, and finally running the query.​
Recommended ways to ask questions are as follows:​
  • View example: Help me list the database instances in cn-beijing.​
  • View table structure: Show me the tables in [database] of [instance_id], then display the structure of [table].​
  • Query sample data: Retrieve the latest 100 records from [table] in [database] on [instance_id].​
  • Query with business conditions: Find data from [table] for new orders in the last 7 days where the state is Paid.​
tip​
  • Including Instance ID, Database name, and Table name in your question leads to faster hits.​
  • Specify a time frame, such as "last 7 days" or "last 1 month", for trend analysis.​
  • Specify the number of rows, such as "latest 100 records", for viewing details.​
  • Specify the indicator, such as "daily order count" or "payment success rate", for statistical analysis.​
​
FAQ​
Q: Which Agents are supported?​
  • Currently supports OpenClaw, Trae-CN, and ArkClaw. Other coding agents supporting the agent skills agreement can theoretically be used.​
Q: Will it accidentally write Data?​
  • No. Skills are strictly limited to Read-only Actions, and all write operations (DDL/DML) are executed through the Ticket platform. The Agent helps generate write SQL statements and guides you through the Ticket process.​
Q: How to configure AK/SK?​
  • The assistant automatically checks the credential status and guides the configuration during first use. Create AK/SK in the Volcano Engine console > Key Management. After configuration, they are securely stored locally in the .env file and will not be exposed in conversations.​
Q: Which databases connected over public network are supported?​
  • All databases compatible with MySQL or PostgreSQL wire Agreement can be directly connected via standard drivers, including over 40 types such as TiDB, OceanBase, CockroachDB, StarRocks, and ClickHouse.​
Q: What should I pay attention to when querying PostgreSQL?​
  • Use the schema.table format for Table names (e.g., public.users), and specify the schema when querying Table structure.​
Q: If the query returns empty results, is it due to no data or unsupported capability?​
  • The skill clearly distinguishes: when the capability is unsupported, it proactively explains and provides alternatives; when the capability is available but no Data is found, it prompts you with "Interface Normal, confirm query conditions." It will not mislead you into thinking "no data."​
​
Last updated: 2026.07.03 10:16:50