SQL Optimization Patterns
ynulihao/AgentSkillOS
Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries.
Database specialist for SQL, NoSQL, and vector database modeling, schema design, normalization, indexing, transactions, integrity, concurrency control, backup, capacity planning, data standards…
$ npx skills add first-fluke/oh-my-agent --skill oma-db -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install first-fluke/oh-my-agent oma-db --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/first-fluke/oh-my-agent.git skills-src && mkdir -p .claude/skills && cp -r skills-src/benchmarks/runs/oma/.agents/skills/oma-db .claude/skills/oma-db && 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 "oma-db" agent skill from https://github.com/first-fluke/oh-my-agent/tree/main/benchmarks/runs/oma/.agents/skills/oma-db into .claude/skills/oma-db/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "oma-db", 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/first-fluke/oh-my-agent/tree/main/benchmarks/runs/oma/.agents/skills/oma-dbType 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 first-fluke/oh-my-agent --skill oma-db -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install first-fluke/oh-my-agent oma-db --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/first-fluke/oh-my-agent.git skills-src && mkdir -p .agents/skills && cp -r skills-src/benchmarks/runs/oma/.agents/skills/oma-db .agents/skills/oma-db && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "oma-db" agent skill from https://github.com/first-fluke/oh-my-agent/tree/main/benchmarks/runs/oma/.agents/skills/oma-db into .agents/skills/oma-db/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "oma-db", 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 first-fluke/oh-my-agent --skill oma-db -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install first-fluke/oh-my-agent oma-db --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/first-fluke/oh-my-agent.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/benchmarks/runs/oma/.agents/skills/oma-db .cursor/skills/oma-db && 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 "oma-db" agent skill from https://github.com/first-fluke/oh-my-agent/tree/main/benchmarks/runs/oma/.agents/skills/oma-db into .cursor/skills/oma-db/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "oma-db", 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/first-fluke/oh-my-agent.git --path benchmarks/runs/oma/.agents/skills/oma-db--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 first-fluke/oh-my-agent --skill oma-db -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install first-fluke/oh-my-agent oma-db --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/first-fluke/oh-my-agent.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/benchmarks/runs/oma/.agents/skills/oma-db .gemini/skills/oma-db && 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 "oma-db" agent skill from https://github.com/first-fluke/oh-my-agent/tree/main/benchmarks/runs/oma/.agents/skills/oma-db into .gemini/skills/oma-db/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "oma-db", 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 first-fluke/oh-my-agent oma-dbInstalls 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 first-fluke/oh-my-agent --skill oma-db -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/first-fluke/oh-my-agent.git skills-src && mkdir -p .github/skills && cp -r skills-src/benchmarks/runs/oma/.agents/skills/oma-db .github/skills/oma-db && 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 "oma-db" agent skill from https://github.com/first-fluke/oh-my-agent/tree/main/benchmarks/runs/oma/.agents/skills/oma-db into .github/skills/oma-db/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "oma-db", 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 first-fluke/oh-my-agent --skill oma-db -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install first-fluke/oh-my-agent oma-db --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/first-fluke/oh-my-agent.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/benchmarks/runs/oma/.agents/skills/oma-db .opencode/skills/oma-db && 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 "oma-db" agent skill from https://github.com/first-fluke/oh-my-agent/tree/main/benchmarks/runs/oma/.agents/skills/oma-db into .opencode/skills/oma-db/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "oma-db", 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.
oma-dbDatabase specialist for SQL, NoSQL, and vector database modeling, schema design, normalization, indexing, transactions, integrity, concurrency control, backup, capacity planning, data standards…
Oma DB is an agent skill from first-fluke/oh-my-agent. Database specialist for SQL, NoSQL, and vector database modeling, schema design, normalization, indexing, transactions, integrity, concurrency control, backup, capacity planning, data standards, anti-pattern review, and compliance-aware database design. Use for database, schema, ERD, table design, document model, vector index design, RAG retrieval architecture, migration, query tuning, glossary, capacity estimation, backup strategy, database anti-pattern remediation work, and ISO 27001, ISO 27002, or ISO…
Its SKILL.md is about 3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files (for example `resources/anti-patterns.md`, `resources/checklist.md` and `resources/document-templates.md`).
It sits in Databases, covering Database schema design. It works with SQL. The repository describes itself as: Mechanical verification for AI coding agents — skills pack or full harness (stop-hook gates, artifact checks, independent judges). The licence is MIT.
3 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit b364119. 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.
Shell commands in SKILL.md call:
rgFrom 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.
Oma DB loads about 3k tokens when it runs. Until then it costs about 139 tokens; SKILL.md has 1,264 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 first-fluke/oh-my-agent at commit b364119, republished under its MIT licence (© first-fluke). 1,264 words, ~3,032 tokens.
.claude/skills/oma-db/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.Design, review, optimize, and document SQL, NoSQL, vector, and retrieval-oriented data systems with explicit schema layers, integrity rules, transaction behavior, capacity assumptions, and audit-aware tradeoffs.
resources/document-templates.md, resources/anti-patterns.md, resources/vector-db.md, and resources/iso-controls.md| Action | SSL primitive | Evidence |
|---|---|---|
| Classify workload and model | SELECT | SQL, NoSQL, vector, cache, search, mixed |
| Read schema/query evidence | READ | Migrations, ERDs, query patterns |
| Compare design alternatives | COMPARE | Engine/model/index tradeoffs |
| Infer integrity and capacity risks | INFER | Constraints, transactions, growth assumptions |
| Validate anti-patterns | VALIDATE | Checklist and anti-pattern guide |
| Write schema docs or changes | WRITE | Deliverables, migrations, query/index changes |
| Report recommendation | NOTIFY | Final database guidance |
rg --files -g '*.sql' -g '*prisma*' -g '*schema*' -g '*migration*'
rg "CREATE TABLE|model |index|foreign key|transaction|embedding|vector" .Then run the project's migration, query-plan, or retrieval-quality commands only after identifying the database engine and migration tool.
| Scope | Resource target |
|---|---|
CODEBASE | Schema, migration, query, ORM, and retrieval files |
LOCAL_FS | Database design artifacts and result documents |
PROCESS | Migration, query, lint, or validation commands |
USER_DATA | Domain data definitions, retention rules, and sample access patterns |
Follow resources/execution-protocol.md step by step.
See resources/examples.md for input/output examples.
Use resources/document-templates.md when you need concrete deliverable structure.
Use resources/anti-patterns.md when reviewing or remediating logical, physical, query, and application-facing DB issues.
Use resources/vector-db.md when the task involves vector databases, ANN tuning, semantic search, or RAG retrieval.
Use resources/iso-controls.md when the user needs security-control, continuity, or audit-oriented DB recommendations.
Before submitting, run resources/checklist.md.
Vendor-specific execution protocols are injected automatically by oh-my-agent agent:spawn.
Source files live under ../_shared/runtime/execution-protocols/{vendor}.md.
resources/execution-protocol.mdresources/checklist.mdresources/examples.mdresources/document-templates.mdresources/anti-patterns.mdresources/vector-db.mdresources/iso-controls.mdresources/error-playbook.md../_shared/core/context-loading.md../_shared/core/reasoning-templates.md../_shared/core/clarification-protocol.md../_shared/core/context-budget.md../_shared/core/lessons-learned.md© first-fluke, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 8 other files in benchmarks/runs/oma/.agents/skills/oma-db of first-fluke/oh-my-agent.
Open the folder on GitHubat commit b364119
Oma DB 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 |
|---|---|---|---|---|---|---|
| Oma DB this skillfirst-fluke/oh-my-agent | 1.3k | — | ~3k | Automated safety check: Pass | MIT | |
| SQL Optimization Patternsynulihao/AgentSkillOS | 617 | 11 repos | ~3.3k | Automated safety check: Pass | None | |
| DB Migrationskurealnum/dotfiles | 290 | — | ~820 | Automated safety check: Pass | None | |
| Database DesignCloudAI-X/claude-workflow-v2 | 1.4k | — | ~2.8k | Automated safety check: Pass | MIT | |
| SQL Prodavila7/claude-code-templates | 32k | 9 repos | ~1.9k | Automated safety check: Pass | MIT | |
| Optimizing Ef Core Queriesdotnet/skills | 5.6k | 1 repos | ~2.7k | Automated safety check: Pass | MIT |
ynulihao/AgentSkillOS
Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries.
kurealnum/dotfiles
A skill your agent uses when generating or regenerating Drizzle migration files, changing database schema tables or columns, resolving migration sequence conflicts after rebase, reviewing migration…
CloudAI-X/claude-workflow-v2
Designs database schemas, indexing strategies, query optimization, and migration patterns for SQL and NoSQL databases.
davila7/claude-code-templates
Master modern SQL with cloud-native databases, OLTP/OLAP optimization, and advanced query techniques.
dotnet/skills
Optimize and improve the performance of slow Entity Framework Core (EF Core) queries: make them generate less SQL, make fewer database round-trips, and return results faster.
kortix-ai/suna
How to change the database schema in this repo. An agent skill from kortix-ai/suna.
first-fluke/oh-my-agent
Decomposes a complex feature into tasks, dispatches parallel specialist agents with durable state, and supervises verification, QA review and retries.
first-fluke/oh-my-agent
Splits a complex feature into prioritized tasks, spawns specialist CLI subagents in parallel, tracks them through shared memory and verifies each result.
first-fluke/oh-my-agent
Evaluates system boundaries and tradeoffs and writes architecture recommendations, option comparisons or ADRs, with a Mermaid diagram when structure changes.
first-fluke/oh-my-agent
Backend specialist for APIs, database work, authentication and migrations that follows clean architecture with router, service and repository layers.
first-fluke/oh-my-agent
Installs or checks the oma CLI and its runtimes (bun, uv, serena) in a fresh workspace so that oma-* skills can run their commands.
first-fluke/oh-my-agent
Explores intent, constraints and alternative approaches before any planning, working through questions one at a time and saving an approved design for later steps.
Works with
Categories
Database specialist for SQL, NoSQL, and vector database modeling, schema design, normalization, indexing, transactions, integrity, concurrency control, backup, capacity planning, data standards…. Oma DB is an agent skill from first-fluke/oh-my-agent. Database specialist for SQL, NoSQL, and vector database modeling, schema design, normalization, indexing, transactions, integrity, concurrency control, backup, capacity planning, data standards, anti-pattern review, and compliance-aware database design.
Oma DB fits situations like: vector index design; RAG retrieval architecture; capacity estimation; backup strategy.
Run `npx skills add first-fluke/oh-my-agent --skill oma-db -a claude-code`. Or copy the skill folder (benchmarks/runs/oma/.agents/skills/oma-db in first-fluke/oh-my-agent) into .claude/skills/oma-db in your project. Claude Code loads it when a task matches its description.
Run `npx skills add first-fluke/oh-my-agent --skill oma-db -a codex`. Or copy the skill folder (benchmarks/runs/oma/.agents/skills/oma-db in first-fluke/oh-my-agent) into .agents/skills/oma-db 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 first-fluke/oh-my-agent --skill oma-db -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/oma-db, .gemini/skills/oma-db, .github/skills/oma-db and .opencode/skills/oma-db in your project.
Going by SKILL.md and its folder, Oma DB needs the command-line tools its instructions call (rg).
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.
Oma DB is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3k tokens (SKILL.md is roughly 12k 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 Oma DB: SQL Optimization Patterns (ynulihao/AgentSkillOS, 617 stars), DB Migrations (kurealnum/dotfiles, 290 stars), Database Design (CloudAI-X/claude-workflow-v2, 1.4k stars) and SQL Pro (davila7/claude-code-templates, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
first-fluke (a GitHub organization) maintains it in first-fluke/oh-my-agent, which has 1,338 GitHub stars. The repository holds 57 skills in this directory. The repository was last updated on October 9, 2026.
Source: first-fluke/oh-my-agent on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.