bytedance/agentkit-samples is a collection of examples and tutorials for Volcengine AgentKit, an AI-agent development platform for building, deploying, and operating agent applications. Developers use the samples to learn agent creation, multi-agent collaboration, memory, retrieval, MCP integrations, media generation, customer service, and other workflows. The catalogue skills provide agent workflows based on these examples.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/bytedance/agentkit-samples/database-skillnpx skills add bytedance/agentkit-samples --skill database-skillgit clone --depth 1 https://github.com/bytedance/agentkit-samplesWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/bytedance/agentkit-samples/database-skill)<a href="https://agentmods.dev/skills/bytedance/agentkit-samples/database-skill"><img src="https://agentmods.dev/badge/skills/bytedance/agentkit-samples/database-skill.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00196 | $0.03817 |
| Opus 5 | $0.00098 | $0.01909 |
| Sonnet 5 | $0.00039 | $0.00763 |
| Haiku 4.5 | $0.00020 | $0.00382 |
Grade A, and why
database-skill scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 218 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Database Skill 核心指令
你是一名专业的数据库智能助手。你的目标是安全、准确、高效地执行数据库相关任务。
帮用户多想一步 — 不只完成任务,更提供专家洞察。结论先行:先说好还是不好,再说为什么。
🔴 核心原则 (必须遵守)
- 安全第一: 涉及数据变更 (DML/DDL) 时,必须严格遵循审批流程,严禁直接执行高风险 SQL。
- 场景路由: 收到用户请求后,立即根据「场景路由」判断使用哪个场景,并加载对应的参考文件。
- 数据诚实: 绝不编造数据,图表不误导。
- 必须使用指定工具链:
- 数据库操作必须通过 toolbox 函数,禁止直接用 pymysql / sqlalchemy 等连接数据库
- 本地文件分析(CSV / Excel / JSON / Parquet)必须通过
MultiSourceAnalyzer - 混合分析(数据库 + 文件)时,先用
query_sql()获取 DB 数据,再用MultiSourceAnalyzer联合分析
行为准则
- 自主执行:用户给出了明确任务(如"帮我查一下"、"分析某表"),直接执行,不要停下来反复确认。只在真正缺少必要信息时才询问。
- SOP 完整性:按 SOP 排查时,必须尝试所有步骤。某步调用失败或不支持时,明确说明跳过原因,不要默默跳过。
- 不支持 ≠ 无结论:函数不支持或返回空数据时,必须给出替代方案或下一步建议,不能只说"不支持"就结束。
- 诊断要深入:运维诊断场景,初始查询后应继续深入(如慢查询聚合 → 明细/趋势/优化建议)。
- 趋势查询:用户要求"趋势"或"时间维度分析"时,SQL 必须包含时间维度的 GROUP BY(如按天/小时分组)。
- 场景切换:用户话题发生实质改变时(如从"分析数据"→"为什么慢"→"加个字段"),必须回到场景路由表重新匹配,读取新场景的全部必读文件。
- 产出必须交付:场景路由表的"产出"列是必需的交付物,不是可选的。数据分析必须产出 HTML 报告 + 截图,运维诊断必须给出明确行动建议,不能只返回原始数据就结束。
- 运维诊断必须读 SOP:进入运维诊断场景后,必须先读取对应的场景 SOP 文件再开始排查。SOP 包含诊断路径、必看数据和根因知识,禁止跳过 SOP 仅凭经验诊断。
- 尊重用户指定的数据库:用户在 prompt 中提到了具体数据库名(如"demo_refund 库"、"skill_test 里"),必须切换到该数据库操作。遇到错误时如实报告,禁止静默切换到其他数据库。
🔑 配置检查
凭证通过 create_client() 初始化时自动加载(优先级:环境变量 > skills/.env 文件)。
⚠️ 严禁直接操作 .env 文件
- 绝对禁止用 Write / Edit / shell 命令直接读写
.env文件 - 绝对禁止通过 shell 命令(如
echo $VOLCENGINE_ACCESS_KEY)检查凭证
正确方式
from toolbox import check_env, update_env, create_client
# 1. 检查凭证状态(不泄露实际值)
result = check_env()
# → {"success": True, "data": {"credentials_ready": True, "configured_keys": [...], "missing_keys": [...]}}
# 2. 若缺少配置,询问用户后安全更新
update_env(VOLCENGINE_ACCESS_KEY="xxx", VOLCENGINE_SECRET_KEY="yyy")
仅当 check_env() 返回 credentials_ready: False 时,才询问用户提供缺失值。
🌏 支持的地域
用户提到地域时,根据下表映射为 RegionId 传给 create_client(region=...):
| 地域 | RegionId |
|---|---|
| 华东2(上海) | cn-shanghai |
| 华北2(北京/廊坊) | cn-beijing |
| 华南1(广州) | cn-guangzhou |
| 中国香港 | cn-hongkong |
| 亚太东南(柔佛) | ap-southeast-1 |
| 亚太东南(雅加达) | ap-southeast-3 |
What ships with it
60 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- pyproject.toml 340 B
- references/analysis/index.md 7.7 KB
- references/analysis/report.md 3.3 KB
- references/analysis/templates/template-bar.md 2.3 KB
- references/analysis/templates/template-diagnosis.md 2.6 KB
- references/analysis/templates/template-drilldown.md 16 KB
- references/analysis/templates/template-funnel.md 2.2 KB
- references/analysis/templates/template-heatmap.md 4.7 KB
- references/analysis/templates/template-kpi.md 2.0 KB
- references/analysis/templates/template-line.md 3.6 KB
- references/analysis/templates/template-map.md 4.0 KB
- references/analysis/templates/template-pie.md 3.1 KB
- references/analysis/templates/template-progress.md 2.6 KB
- references/analysis/templates/template-rank.md 2.8 KB
- references/analysis/templates/template-table.md 2.5 KB
- references/analysis/templates/template-tabs.md 2.1 KB
- references/analysis/templates/template-wordcloud.md 2.5 KB
- references/api/metadata-query.md 7.3 KB
- references/api/ops.md 17 KB
- references/develop/index.md 3.1 KB
- references/develop/mysql/ddl-guide.md 4.6 KB
- references/develop/mysql/dml-guide.md 3.9 KB
- references/develop/postgresql/ddl-guide.md 3.6 KB
- references/develop/postgresql/dml-guide.md 2.9 KB
- references/metadata/asset-inventory.md 3.4 KB
- references/metadata/data-profiling.md 3.5 KB
- references/metadata/data-quality.md 5.3 KB
- references/metadata/schema-audit.md 3.7 KB
- references/metadata/sensitive-data.md 3.7 KB
- references/ops/health-inspection.md 5.8 KB
- references/ops/index.md 9.9 KB
- references/ops/mongodb/connection-full.md 4.8 KB
- references/ops/mongodb/connection-leak.md 2.8 KB
- references/ops/mongodb/cpu-spike.md 4.7 KB
- references/ops/mongodb/disk-full.md 3.3 KB
- references/ops/mongodb/lock-wait.md 4.2 KB
- references/ops/mongodb/memory-pressure.md 2.5 KB
- references/ops/mongodb/replication-delay.md 3.3 KB
- references/ops/mongodb/slow-query.md 4.1 KB
- references/ops/mongodb/write-conflict.md 4.5 KB
- references/ops/mysql/connection-full.md 6.5 KB
- references/ops/mysql/cpu-spike.md 4.3 KB
- references/ops/mysql/deadlock.md 4.9 KB
- references/ops/mysql/disk-full.md 4.8 KB
- references/ops/mysql/io-bottleneck.md 3.2 KB
- references/ops/mysql/lock-wait.md 4.7 KB
- references/ops/mysql/memory-pressure.md 3.8 KB
- references/ops/mysql/network-jitter.md 3.2 KB
- references/ops/mysql/session-pileup.md 4.5 KB
- references/ops/mysql/slow-query.md 4.2 KB
- references/ops/mysql/temp-table-overflow.md 3.7 KB
- references/ops/postgresql/connection-full.md 5.3 KB
- references/ops/postgresql/cpu-spike.md 3.5 KB
- references/ops/postgresql/disk-full.md 3.8 KB
- references/ops/postgresql/lock-wait.md 7.1 KB
- references/ops/postgresql/memory-pressure.md 3.4 KB
- references/ops/postgresql/replication-delay.md 3.6 KB
- references/ops/postgresql/slow-query.md 6.1 KB
- references/ops/postgresql/vacuum-blocking.md 4.3 KB
- references/ops/postgresql/wal-backlog.md 4.0 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 218 lines · 196 tokens per session scan A 4b0263f31049
database-skill is a skill published in the GitHub repository bytedance/agentkit-samples (446 stars, last pushed 2d ago), licensed Apache-2.0. It adds 196 tokens to every session and 3,817 once invoked, about $0.0010 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
yida-db-seq-fix
PostgreSQL Sequence 自动修复工具。检测并修复宜搭环境检测自动建表时 Sequence 起始值问题,避免主键冲突。当用户提到"Sequence"、"主键冲突"、"自增ID错误"、"db-seq-fix"时触发。.
database-postgresql
Apply PostgreSQL standards for migrations, indexing, transactions, and ORM boundaries. Use when editing entities, Prisma schema, migrations, RLS, or query-performance work for PostgreSQL.
azure-database-postgresql
Expert knowledge for Azure Database for PostgreSQL development including troubleshooting, best practices, decision making, architecture & design patterns, limits & quotas, security, configuration, integrations & coding patterns, and deployment. Use when using flexible server, replicas, PgBouncer/Query Store, vector…
azure-horizondb
Expert knowledge for Azure Horizondb development including troubleshooting, best practices, decision making, architecture & design patterns, limits & quotas, security, configuration, integrations & coding patterns, and deployment. Use when tuning pgvector, azureai SQL functions, LangChain vector stores, Apache AGE…
postgresql
Skill "postgresql" from dhaupin/vant, covering postgresql, when to use, what to do, 1. connect and 2. common queries.
supabase
Skill "supabase" from dhaupin/vant, covering supabase, when to use, what to do, 1. connect and supabase-js.