Agent skill

DB Ops Sop

by OpenDCAI in OpenDCAI/DataMind

Database operations runbook — backup, recovery, performance tuning, troubleshooting.

Apache-2.0Auto-check passedDatabases

Install DB Ops Sop

skills CLI
$ npx skills add OpenDCAI/DataMind --skill db-ops-sop -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install OpenDCAI/DataMind db-ops-sop --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/OpenDCAI/DataMind.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/db-ops-sop .claude/skills/db-ops-sop && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
db-ops-sop
GitHub stars
451
Token cost
~388 tokens
SKILL.md length
102 words
Files
1
Skills in repo
3
Repo updated
First seen
Licence
Apache-2.0

At a glance

Database operations runbook — backup, recovery, performance tuning, troubleshooting.

  • Works in 5 steps: 停止应用服务 → 确认备份文件完整性 → 执行恢复命令 → …
  • SQLite / MySQL / PostgreSQL ops questions
  • SKILL.md covers 适用场景, 一、数据库备份, 二、数据库恢复 and 三、性能优化, plus 1 more section
  • Calls pg_dump and mysql

What it does

DB Ops Sop is an agent skill from OpenDCAI/DataMind. Database operations runbook — backup, recovery, performance tuning, troubleshooting. Use for SQLite / MySQL / PostgreSQL ops questions, slow-query diagnosis, or outage response.

Its SKILL.md is about 390 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Databases, covering Operations and SOPs, Incident response and Runbooks and postmortems. It works with MySQL, PostgreSQL and SQLite. The repository describes itself as: All-in-one intelligent assistant powered by LlamaIndex — RAG, GraphRAG, NL2SQL, Skills & Memory with multimodal support. The licence is Apache-2.0.

When your agent uses it

  • SQLite / MySQL / PostgreSQL ops questions
  • Slow-query diagnosis
  • Outage response

Example prompts

  • “/db-ops-sop”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. 停止应用服务
  2. 确认备份文件完整性
  3. 执行恢复命令
  4. 验证数据一致性
  5. 重启应用服务

What it can do on your machine

Read from SKILL.md and the folder at commit 61fd482. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pg_dump
    • mysql

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

DB Ops Sop loads about 388 tokens when it runs. Until then it costs about 47 tokens; SKILL.md has 102 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~47
When it runs · the whole SKILL.md, loaded when a task matches
~388

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from OpenDCAI/DataMind at commit 61fd482, republished under its Apache-2.0 licence (© OpenDCAI). 102 words, ~388 tokens.

Download SKILL.mdSave it as .claude/skills/db-ops-sop/SKILL.md (or your agent's skills folder).
name
db-ops-sop
description
Database operations runbook — backup, recovery, performance tuning, troubleshooting. Use for SQLite / MySQL / PostgreSQL ops questions, slow-query diagnosis, or outage response.
keywords
database, 数据库, backup, restore, SOP, MySQL, PostgreSQL, SQLite, 备份, 恢复, 运维

数据库运维 SOP

适用场景

当用户咨询数据库备份、恢复、性能优化、故障排查等运维相关问题时,参考本指南进行回答。

一、数据库备份

1.1 全量备份
bash
# SQLite 备份(直接复制文件)
cp /path/to/database.db /path/to/backup/database_$(date +%Y%m%d).db

# MySQL 全量备份
mysqldump -u root -p --all-databases > full_backup_$(date +%Y%m%d).sql

# PostgreSQL 全量备份
pg_dump -U postgres -F c dbname > backup_$(date +%Y%m%d).dump
1.2 增量备份
  • MySQL: 使用 binlog 进行增量备份
  • PostgreSQL: 使用 WAL 归档进行增量备份
  • 建议每日全量 + 每小时增量
1.3 备份策略建议
频率类型保留时间
每日全量备份30 天
每小时增量备份7 天
每周异地备份90 天

二、数据库恢复

2.1 恢复步骤
  1. 停止应用服务
  2. 确认备份文件完整性
  3. 执行恢复命令
  4. 验证数据一致性
  5. 重启应用服务
2.2 恢复命令
bash
# SQLite 恢复
cp /path/to/backup/database_20240101.db /path/to/database.db

# MySQL 恢复
mysql -u root -p < full_backup_20240101.sql

# PostgreSQL 恢复
pg_restore -U postgres -d dbname backup_20240101.dump

三、性能优化

3.1 慢查询排查
  1. 开启慢查询日志
  2. 分析 TOP 10 慢查询
  3. 使用 EXPLAIN 分析执行计划
  4. 添加必要索引
  5. 优化 SQL 语句
3.2 常见优化手段
  • 索引优化: 为高频查询字段添加索引,避免全表扫描
  • 查询优化: 避免 SELECT *,减少子查询,使用 JOIN 替代
  • 连接池: 使用连接池管理数据库连接,避免频繁创建/销毁
  • 读写分离: 大流量场景下主库写、从库读
  • 缓存: 热点数据使用 Redis 缓存

四、故障排查清单

  1. 检查数据库服务是否运行
  2. 检查磁盘空间是否充足
  3. 检查连接数是否达到上限
  4. 检查慢查询是否阻塞
  5. 检查主从同步状态
  6. 检查锁等待情况

© OpenDCAI, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/db-ops-sop of OpenDCAI/DataMind.

Open the folder on GitHubat commit 61fd482

Compare with similar skills

DB Ops Sop next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

DB Ops Sop compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
DB Ops Sop this skillOpenDCAI/DataMind451—~388Automated safety check: PassApache-2.0
Database Expertcin12211/orca-q224—~2.8kAutomated safety check: PassMIT
Database OptimizerJeffallan/claude-skills12k—~1.6kAutomated safety check: PassMIT
Automating Database Backupsjeremylongshore/tons-of-skills-marketplace2.8k—~1.5kAutomated safety check: PassMIT
Matlab Use Databasematlab/matlab-agentic-toolkit1.1k—~3.1kAutomated safety check: PassCustom licence
SQL Expertaiskillstore/marketplace433—~3.4kAutomated safety check: PassNone

Similar skills

  • Database Expert

    cin12211/orca-q

    Database performance optimization, schema design, query analysis, and connection management across PostgreSQL, MySQL, MongoDB, and SQLite with ORM integration.

    224 GitHub stars~2.8k tokensUpdated 18 days ago
    DatabasesAuto-check passed
  • Database Optimizer

    Jeffallan/claude-skills

    Tunes PostgreSQL and MySQL performance by analyzing slow queries and execution plans, designing indexes, rewriting queries and adjusting configuration, one validated change at a time.

    12k GitHub stars~1.6k tokensUpdated 6 days ago
    DatabasesAuto-check passed
  • Automating Database Backups

    jeremylongshore/tons-of-skills-marketplace

    Automate database backup processes with scheduling, compression, and encryption.

    2.8k GitHub stars~1.5k tokensUpdated today
    DatabasesAuto-check passed
  • Matlab Use Database

    matlab/matlab-agentic-toolkit

    Reads from, writes to, and manages relational databases using MATLAB Database Toolbox.

    1.1k GitHub stars~3.1k tokensUpdated yesterday
    DatabasesAuto-check passed
  • SQL Expert

    aiskillstore/marketplace

    Expert SQL query writing, optimization, and database schema design with support for PostgreSQL, MySQL, SQLite, and SQL Server.

    433 GitHub stars~3.4k tokensUpdated today
    DatabasesAuto-check passed
  • SQL Toolkit

    LeoYeAI/openclaw-master-skills

    Query, design, migrate, and optimize SQL databases. An agent skill from LeoYeAI/openclaw-master-skills.

    2.2k GitHub stars~3k tokensUpdated 2 mo ago
    DatabasesAuto-check passed

More from OpenDCAI/DataMind

  • Code Review

    OpenDCAI/DataMind

    Comprehensive code review guidance — process, checklist, feedback conventions.

    451 GitHub stars~340 tokensUpdated 20 days ago
    Auto-check passed
  • Datamind Context

    OpenDCAI/DataMind

    Use DataMind from Codex to ingest local files, query RAG or graph knowledge, store facts, and inspect profiles.

    451 GitHub stars~528 tokensUpdated 20 days ago
    Auto-check passed

Questions about DB Ops Sop

What does DB Ops Sop do?

Database operations runbook — backup, recovery, performance tuning, troubleshooting. DB Ops Sop is an agent skill from OpenDCAI/DataMind. Database operations runbook — backup, recovery, performance tuning, troubleshooting.

When should I use DB Ops Sop?

DB Ops Sop fits situations like: SQLite / MySQL / PostgreSQL ops questions; slow-query diagnosis; outage response.

How do I install DB Ops Sop in Claude Code?

Run `npx skills add OpenDCAI/DataMind --skill db-ops-sop -a claude-code`. Or copy the skill folder (.claude/skills/db-ops-sop in OpenDCAI/DataMind) into .claude/skills/db-ops-sop in your project. Claude Code loads it when a task matches its description.

How do I install DB Ops Sop in Codex?

Run `npx skills add OpenDCAI/DataMind --skill db-ops-sop -a codex`. Or copy the skill folder (.claude/skills/db-ops-sop in OpenDCAI/DataMind) into .agents/skills/db-ops-sop in your project. Codex loads it when a task matches its description.

Can I use DB Ops Sop in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add OpenDCAI/DataMind --skill db-ops-sop -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/db-ops-sop, .gemini/skills/db-ops-sop, .github/skills/db-ops-sop and .opencode/skills/db-ops-sop in your project.

What does DB Ops Sop need to run?

Going by SKILL.md and its folder, DB Ops Sop needs the command-line tools its instructions call (pg_dump and mysql).

Does DB Ops Sop access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is DB Ops Sop safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does DB Ops Sop use?

DB Ops Sop is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does DB Ops Sop use?

About 388 tokens (SKILL.md is roughly 1.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to DB Ops Sop?

Skills that share tags, products or a category with DB Ops Sop: Database Expert (cin12211/orca-q, 224 stars), Database Optimizer (Jeffallan/claude-skills, 12k stars), Automating Database Backups (jeremylongshore/tons-of-skills-marketplace, 2.8k stars) and Matlab Use Database (matlab/matlab-agentic-toolkit, 1.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains DB Ops Sop?

OpenDCAI (a GitHub organization) maintains it in OpenDCAI/DataMind, which has 451 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on September 20, 2026.

Source: OpenDCAI/DataMind on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.