DB Ops Sop
OpenDCAI/DataMind
Database operations runbook — backup, recovery, performance tuning, troubleshooting.
Query optimization, indexing strategies, and database performance tuning for PostgreSQL and MySQL
$ npx skills add rohitg00/awesome-claude-code-toolkit --skill database-optimization -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install rohitg00/awesome-claude-code-toolkit database-optimization --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/rohitg00/awesome-claude-code-toolkit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/database-optimization .claude/skills/database-optimization && rm -rf skills-srcUse ~/.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/
Install the "database-optimization" agent skill from https://github.com/rohitg00/awesome-claude-code-toolkit/tree/main/skills/database-optimization into .claude/skills/database-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "database-optimization", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/rohitg00/awesome-claude-code-toolkit/tree/main/skills/database-optimizationType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add rohitg00/awesome-claude-code-toolkit --skill database-optimization -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install rohitg00/awesome-claude-code-toolkit database-optimization --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rohitg00/awesome-claude-code-toolkit.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/database-optimization .agents/skills/database-optimization && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "database-optimization" agent skill from https://github.com/rohitg00/awesome-claude-code-toolkit/tree/main/skills/database-optimization into .agents/skills/database-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "database-optimization", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add rohitg00/awesome-claude-code-toolkit --skill database-optimization -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install rohitg00/awesome-claude-code-toolkit database-optimization --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rohitg00/awesome-claude-code-toolkit.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/database-optimization .cursor/skills/database-optimization && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "database-optimization" agent skill from https://github.com/rohitg00/awesome-claude-code-toolkit/tree/main/skills/database-optimization into .cursor/skills/database-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "database-optimization", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/rohitg00/awesome-claude-code-toolkit.git --path skills/database-optimization--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add rohitg00/awesome-claude-code-toolkit --skill database-optimization -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install rohitg00/awesome-claude-code-toolkit database-optimization --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rohitg00/awesome-claude-code-toolkit.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/database-optimization .gemini/skills/database-optimization && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "database-optimization" agent skill from https://github.com/rohitg00/awesome-claude-code-toolkit/tree/main/skills/database-optimization into .gemini/skills/database-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "database-optimization", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install rohitg00/awesome-claude-code-toolkit database-optimizationInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add rohitg00/awesome-claude-code-toolkit --skill database-optimization -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/rohitg00/awesome-claude-code-toolkit.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/database-optimization .github/skills/database-optimization && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "database-optimization" agent skill from https://github.com/rohitg00/awesome-claude-code-toolkit/tree/main/skills/database-optimization into .github/skills/database-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "database-optimization", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add rohitg00/awesome-claude-code-toolkit --skill database-optimization -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install rohitg00/awesome-claude-code-toolkit database-optimization --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rohitg00/awesome-claude-code-toolkit.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/database-optimization .opencode/skills/database-optimization && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "database-optimization" agent skill from https://github.com/rohitg00/awesome-claude-code-toolkit/tree/main/skills/database-optimization into .opencode/skills/database-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "database-optimization", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
database-optimizationQuery optimization, indexing strategies, and database performance tuning for PostgreSQL and MySQL
Database Optimization is an agent skill from rohitg00/awesome-claude-code-toolkit. Query optimization, indexing strategies, and database performance tuning for PostgreSQL and MySQL
Its SKILL.md is about 1.3k 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 Query optimization. It works with PostgreSQL and MySQL. The repository describes itself as: The most comprehensive toolkit for Claude Code -- 135 agents, 35 curated skills, 42 commands, 176+ plugins, 20 hooks, 15 rules, 7 templates, 14 MCP configs, 26 companion apps, 52… The licence is Apache-2.0.
10 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit ebdf1d5. It shows what the files ask for, not the result of running them.
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.
No scripts in the folder and no shell commands in SKILL.md (its code samples are sql, python and javascript).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Database Optimization loads about 1.3k tokens when it runs. Until then it costs about 30 tokens; SKILL.md has 370 words of instructions outside code blocks.
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.
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.
The full file from rohitg00/awesome-claude-code-toolkit at commit ebdf1d5, republished under its Apache-2.0 licence (© rohitg00). 370 words, ~1,332 tokens.
.claude/skills/database-optimization/SKILL.md (or your agent's skills folder).Always run EXPLAIN ANALYZE before optimizing. Read the output bottom-up.
-- PostgreSQL
EXPLAIN (ANALYZE, BUFFERS, FORMAT TEXT) SELECT ...;
-- MySQL
EXPLAIN ANALYZE SELECT ...;Key metrics to watch:
ANALYZECREATE INDEX idx_users_email ON users (email);
CREATE INDEX idx_orders_user_date ON orders (user_id, created_at DESC);Use for: equality, range queries, sorting. Column order matters in composite indexes: put equality columns first, then range/sort columns.
CREATE INDEX idx_orders_pending ON orders (created_at)
WHERE status = 'pending';Use when queries always filter on a specific condition. Dramatically smaller than full indexes.
CREATE INDEX idx_products_tags ON products USING GIN (tags);
CREATE INDEX idx_docs_search ON documents USING GIN (to_tsvector('english', content));CREATE INDEX idx_locations_point ON locations USING GiST (coordinates);
CREATE INDEX idx_events_period ON events USING GiST (tsrange(start_at, end_at));-- PostgreSQL
CREATE INDEX idx_users_email_name ON users (email) INCLUDE (name);
-- MySQL
CREATE INDEX idx_users_email_name ON users (email, name);Symptom: 1 query to fetch parent + N queries for each child.
# BAD: N+1
users = db.query(User).all()
for user in users:
print(user.orders) # triggers query per user
# GOOD: eager load
users = db.query(User).options(joinedload(User.orders)).all()// BAD: N+1
const users = await User.findAll();
for (const user of users) {
const orders = await Order.findAll({ where: { userId: user.id } });
}
// GOOD: batch load
const users = await User.findAll({ include: [Order] });Detection: enable query logging, count queries per request. More than 10 queries for a single endpoint is a red flag.
Rule of thumb: pool_size = (core_count * 2) + disk_count
Typical web app: 10-20 connections per app instancePostgreSQL:
idle_in_transaction_session_timeout = '30s'pg_stat_activityMySQL:
max_connections based on available RAM (each connection uses ~10MB)SHOW PROCESSLISTSELECT queries to replicas# SQLAlchemy read replica routing
class RoutingSession(Session):
def get_bind(self, mapper=None, clause=None):
if self._flushing or self.is_modified():
return engines["primary"]
return engines["replica"]-- PostgreSQL
CREATE TABLE events (
id bigint GENERATED ALWAYS AS IDENTITY,
created_at timestamptz NOT NULL,
data jsonb
) PARTITION BY RANGE (created_at);
CREATE TABLE events_2025_q1 PARTITION OF events
FOR VALUES FROM ('2025-01-01') TO ('2025-04-01');
CREATE TABLE events_2025_q2 PARTITION OF events
FOR VALUES FROM ('2025-04-01') TO ('2025-07-01');CREATE TABLE sessions (
id uuid PRIMARY KEY,
user_id bigint NOT NULL
) PARTITION BY HASH (user_id);
CREATE TABLE sessions_0 PARTITION OF sessions FOR VALUES WITH (MODULUS 4, REMAINDER 0);
CREATE TABLE sessions_1 PARTITION OF sessions FOR VALUES WITH (MODULUS 4, REMAINDER 1);Partition when tables exceed 50-100GB or when you need to drop old data quickly.
EXPLAIN ANALYZE and read the planidx_scan in pg_stat_user_indexes)SELECT * with specific columnsLIMIT to queries that only need a subsetEXISTS instead of COUNT(*) > 0INSERT/UPDATE operations (500-1000 rows per batch)WHERE clauseslog_min_duration_statement = 100)LIKE '%term%' on unindexed columns (use full-text search instead)ORDER BY RANDOM() (use TABLESAMPLE or application-level randomization)SELECT DISTINCT masking a join problemWHERE on UPDATE/DELETE (always verify with SELECT first)OFFSET for deep pagination (use keyset/cursor pagination instead)© rohitg00, 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
Just SKILL.md in skills/database-optimization of rohitg00/awesome-claude-code-toolkit.
Open the folder on GitHubat commit ebdf1d5
Database Optimization 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Database Optimization this skillrohitg00/awesome-claude-code-toolkit | 2.7k | — | ~1.3k | Automated safety check: Pass | Apache-2.0 | |
| DB Ops SopOpenDCAI/DataMind | 406 | — | ~388 | Automated safety check: Pass | Apache-2.0 | |
| Altimate Data Warehouse DelegateAltimateAI/data-engineering-skills | 127 | — | ~1.4k | Automated safety check: Pass | MIT | |
| Database OptimizerJeffallan/claude-skills | 12k | — | ~1.6k | Automated safety check: Pass | MIT | |
| SQL ProJeffallan/claude-skills | 12k | — | ~1.3k | Automated safety check: Pass | MIT | |
| Database OptimizerAratKruglik/claude-laravel | 155 | — | ~1k | Automated safety check: Pass | None |
OpenDCAI/DataMind
Database operations runbook — backup, recovery, performance tuning, troubleshooting.
AltimateAI/data-engineering-skills
Delegates dbt and warehouse tasks such as lineage, migrations and cost attribution to the altimate-code CLI agent and relays its answer back.
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.
Jeffallan/claude-skills
Optimizes SQL queries and designs schemas using CTEs, window functions, covering indexes and EXPLAIN ANALYZE, with notes on dialect differences between major databases.
AratKruglik/claude-laravel
A skill your agent uses when investigating slow queries, analyzing execution plans, or optimizing database performance.
zebbern/claude-code-guide
A skill your agent uses when investigating slow queries, analyzing execution plans, or optimizing database performance.
rohitg00/awesome-claude-code-toolkit
Web accessibility patterns for WCAG 2.2 compliance including ARIA, keyboard navigation, screen readers, and testing
rohitg00/awesome-claude-code-toolkit
REST API design with resource naming, pagination, versioning, and OpenAPI spec generation
rohitg00/awesome-claude-code-toolkit
Authentication and authorization patterns including OAuth2, JWT, RBAC, session management, and PKCE flows
rohitg00/awesome-claude-code-toolkit
AWS cloud patterns for Lambda, ECS, S3, DynamoDB, and Infrastructure as Code with CDK/Terraform
rohitg00/awesome-claude-code-toolkit
CI/CD pipeline patterns for GitHub Actions, GitLab CI, testing strategies, and deployment automation
rohitg00/awesome-claude-code-toolkit
Auto-extract patterns from coding sessions, track corrections, and build reusable knowledge with confidence scoring
Works with
Categories
Query optimization, indexing strategies, and database performance tuning for PostgreSQL and MySQL. Database Optimization is an agent skill from rohitg00/awesome-claude-code-toolkit.
Database Optimization fits situations like: tasks that involve Query optimization.
Run `npx skills add rohitg00/awesome-claude-code-toolkit --skill database-optimization -a claude-code`. Or copy the skill folder (skills/database-optimization in rohitg00/awesome-claude-code-toolkit) into .claude/skills/database-optimization in your project. Claude Code loads it when a task matches its description.
Run `npx skills add rohitg00/awesome-claude-code-toolkit --skill database-optimization -a codex`. Or copy the skill folder (skills/database-optimization in rohitg00/awesome-claude-code-toolkit) into .agents/skills/database-optimization in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add rohitg00/awesome-claude-code-toolkit --skill database-optimization -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/database-optimization, .gemini/skills/database-optimization, .github/skills/database-optimization and .opencode/skills/database-optimization in your project.
SKILL.md names no scripts, command-line tools or credentials: Database Optimization is instructions for the agent only. Our summary lists: Python 3.
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.
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.
Database Optimization 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.
About 1.3k tokens (SKILL.md is roughly 5.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Database Optimization: DB Ops Sop (OpenDCAI/DataMind, 406 stars), Altimate Data Warehouse Delegate (AltimateAI/data-engineering-skills, 127 stars), Database Optimizer (Jeffallan/claude-skills, 12k stars) and SQL Pro (Jeffallan/claude-skills, 12k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
rohitg00 (a GitHub user) maintains it in rohitg00/awesome-claude-code-toolkit, which has 2,683 GitHub stars. The repository holds 37 skills in this directory. The repository was last updated on May 12, 2026.
Source: rohitg00/awesome-claude-code-toolkit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.