Db Ops
yudao-skill-pro 的数据库操作技能:通过解析 application.yaml 自动获取数据库凭证, 本地直连或经 badseal/ssh-skill 中转到 dev/prod 环境执行 SQL,最后通过 SQL 自检验证程序成果。 触发场景: - 用户提出"执行 SQL"、"建表"、"插入数据"、"查询数据"等 - 用户要求"验证程序成果"、"确认表结构"、"对比数据" - 任何涉及 yudao 项目数据库修改、查询、DDL、DML 的请求 实现机制: - 本技能本身不包含可执行脚本,agent 直接调用系统命令(mysql/psql/sqlplus 等) - 远程环境委托给 badseal/ssh-skill(agent 自动检测/安装)
Install
npx skills add cilangzzz/yudao-skill-pro --skill db-opsgit clone --depth 1 https://github.com/cilangzzz/yudao-skill-pro.git /tmp/yudao-skill-pro
mkdir -p ~/.claude/skills
cp -r /tmp/yudao-skill-pro/skills/db-ops ~/.claude/skills/db-opsPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# 数据库操作技能 (db-ops)
> 本技能提供一套**安全的工作流**让 agent 在 yudao 项目中执行数据库操作。技能本身只是文档与流程指引,**真正的执行依赖**:
> - 本地环境:DB 客户端(mysql / psql / sqlplus / sqlcmd 等)
> - 远程环境:[badseal/ssh-skill](https://github.com/badseal/ssh-skill)(首次使用前会自动检测与安装)
---
## 快速上手
### 这是什么
一个**轻量级指引技能**,让 Claude Code 在 yudao 项目里安全地执行数据库操作。它本身**不包含可执行脚本**,而是:
- **约定工作流**:解析 yaml → 选择连接方式 → dry-run → 执行 → 自检
- **委托底层操作**:本地 DB 客户端、远程 [badseal/ssh-skill](https://github.com/badseal/ssh-skill)
### 何时触发
agent 看到以下意图时会自动调用本技能:
- "帮我跑一下 SQL"、"建表"、"插入测试数据"
- "验证一下表结构"、"对比数据"
- 任何涉及 yudao 数据库的 DDL / DML / DQL
### 首次使用
agent 会自动检查以下 3 件事:
| 检查 | 缺失时 agent 行为 |
|-----|-----------------|
| `.claude/skills/ssh-skill/` 是否存在 | 提示运行 `npx skills add https://github.com/badseal/ssh-skill --skill ssh-skill` |
| `mysql` / `psql` / `sqlplus` 等客户端是否安装 | 询问用户安装方式 |
| 当前激活的 profile 与 SSH 别名 | 询问用户 |
用户需提前配置:
```bash
# ~/.ssh/config 中预先添加(如需远程连接)
Host yudao-dev-db
HostName dev-db.internal
User op
IdentityFile ~/.ssh/id_rsa
```
### 故障排查
| 症状 | 可能原因 | 处理 |
|-----|---------|-----|
| `ssh-skill not found` | 未安装 | `npx skills add ...` |
| `mysql: command not found` | 客户端缺失 | 安装 mysql-client |
| `permission denied` | DB 用户权限不足 | 切换有权限的 profile 或申请授权 |
| `connection refused` | host/port 错 / SSH 别名错 | 核对 application-{profile}.yaml 与 ~/.ssh/config |
| `YES-DESTRUCTIVE required` | prod DDL 未带 token | 重新执行并显式输入 token |
---
## 0. 前置检查(每次对话首次使用时)
agent 必须先做以下 4 项检查,并在结果汇总后再继续:
### 0.1 检测 badseal/ssh-skill 是否已安装Details
- Skill name
db-ops- Repository
- cilangzzz/yudao-skill-pro
- Path
skills/db-ops/SKILL.md- License
- MIT
- Repo updated
- 9 November 2026
FAQ
What does the Db Ops skill do?
yudao-skill-pro 的数据库操作技能:通过解析 application.yaml 自动获取数据库凭证, 本地直连或经 badseal/ssh-skill 中转到 dev/prod 环境执行 SQL,最后通过 SQL 自检验证程序成果。 触发场景: - 用户提出"执行 SQL"、"建表"、"插入数据"、"查询数据"等 - 用户要求"验证程序成果"、"确认表结构"、"对比数据" - 任何涉及 yudao 项目数据库修改、查询、DDL、DML 的请求 实现机制: - 本技能本身不包含可执行脚本,agent 直接调用系统命令(mysql/psql/sqlplus 等) - 远程环境委托给 badseal/ssh-skill(agent 自动检测/安装)
How do I install the Db Ops skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add cilangzzz/yudao-skill-pro --skill db-ops. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Db Ops popular?
It lives in cilangzzz/yudao-skill-pro, which has 43 GitHub stars and 10 forks.
Related skills
Supabase Postgres Best Practices
107Dimon94/skills
Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and scheduled jobs (pg_cron, pgmq), vector/semantic search (pgvector), and restoring dumps (pg_restore) or importing data. Also load it when diagnosing slow queries, high CPU, timeouts, EXPLAIN plans, connection
Database Schema Visualizer
100adriannoes/awesome-agentic-ai
Generate database schema visualizer operations. Auto-activating skill for Visual Content. Triggers on: database schema visualizer, database schema visualizer Part of the Visual Content skill category. Use when working with database schema visualizer functionality. Trigger with phrases like "database schema visualizer", "database visualizer", "database".
Dolphindb Skill
36hugo2046/dolphindb_skill
DolphinDB/DolphinScript 的数据库、SQL、流计算、回测与排障技能。用户提到 DolphinDB,或仓库/代码出现 dfs://、createPartitionedTable、context by、streamTable、subscribeTable、createTimeSeriesEngine、DStream::、Backtest:: 等专有线索时调用;已有 DolphinDB 上下文时,即使本轮只说“分区表”“实时 K 线”“回测报错”也要使用。用于按目标 Server/插件版本核对官方 API、选择 OLAP/TSDB/PKEY/IOT,并生成可验证的代码与方案。明确只涉及其他技术栈且无 DolphinDB 上下文时不调用。
Quarterly Database Cleanup
81TomGranot/hubspot-admin-skills
Run a comprehensive quarterly CRM audit covering list health, bounce monitoring, data quality, scoring calibration, engagement metrics, and property cleanup. Produces a health report with quarter-over-quarter trend comparison.
Drupal Ddev
84grasmash/drupal-claude-skills
Provides DDEV local development patterns for Drupal - ddev commands, .ddev/config.yaml, database import/export and snapshots, Drush and Composer through ddev, Xdebug, local Solr, Mutagen performance, and recovery from Docker, Mutagen and router failures. Use when running ddev start/restart/exec/drush/composer, editing .ddev/config.yaml, importing or snapshotting a database, debugging slow or hung DDEV containers, or recovering a local environment after a Docker crash.
GCP Cloud SQL
213TerminalSkills/skills
Provision and manage Cloud SQL instances on Google Cloud for MySQL, PostgreSQL, and SQL Server. Configure high availability, read replicas, automated backups, IAM database authentication, the Cloud SQL Auth Proxy, and Terraform deployments. Use for managed relational databases on GCP.
Browse the most popular Claude skills, all databases skills, or write your own with the skills generator.