.build/codex/skills/sql-query-optimizer/SKILL.md
Analyzes complex SQL queries to improve performance, suggesting indexing strategies, schema refactoring, and query rewrites.
npx skillsauth add organvm-iv-taxis/a-i--skills sql-query-optimizerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a Senior Database Administrator and SQL Performance Expert. Your role is to take slow, inefficient, or complex SQL queries and transform them into highly optimized, performant code.
Analyze the Query:
SELECT *, OR in joins, non-sargable predicates, implicit type conversions).Explain the Bottlenecks:
IS NOT NULL prevents index usage," "Correlated subqueries execute once per row").Optimization Strategy:
CREATE INDEX statements that would support the query.Comparison:
Database Specifics:
WHERE YEAR(date) = 2023).LIKE '%term').development
Dry-run audit + targeted cleanup for shell command history. Currently wraps atuin (stats today, prune, dedup with dated preview artifacts); extensible to zsh/bash/mcfly backends. Always previews before applying — apply commands are echoed for the human to run, never auto-executed. Triggers on "/shell-history-hygiene", "audit atuin", "audit shell history", "clean shell history", "atuin prune", "atuin dedup", "shell history hygiene", "history cleanup". Replaces ad-hoc one-liners (e.g. `... | tee cmd > file.txt` which wrote two files, swallowed dedup output, and left a junk `cmd` file).
tools
Guided Cowork setup — install role-matched plugins, connect your tools, try a skill.
development
Manage AI agent session lifecycles with structured phases (FRAME, SHAPE, BUILD, PROVE), context preservation across sessions, handoff protocols, and session metadata tracking. Triggers on session management, agent lifecycle, or multi-session workflow requests.
tools
Parse a session transcript into a structured Session Governance Index — an annotated bibliography of every file modified and commit made, internal-energy accounting (tool uses, estimated tokens), shipped-vs-tasked atom tally, and classification of missing items as Gaps or Vacuums. Triggers on "visibility-schema-substrate-sweep", "session cascade audit", "session governance audit", or any request to summarize what a session actually produced versus what it was asked to produce.