Agent skill

SQL Schema Audit

by mizchi in mizchi/skills

Index coverage and N+1 review aids for SQLite/D1 schemas with a sqlc catalog.

No licenceAuto-check passedDatabases

Install SQL Schema Audit

skills CLI
$ npx skills add mizchi/skills --skill sql-schema-audit -a claude-code

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

GitHub CLI
$ gh skill install mizchi/skills sql-schema-audit --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/mizchi/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/sql-schema-audit .claude/skills/sql-schema-audit && 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
sql-schema-audit
GitHub stars
356
Token cost
~1.3k tokens
SKILL.md length
573 words
Files
4 (incl. scripts)
Skills in repo
69
Repo updated
First seen
Licence
None found

At a glance

Index coverage and N+1 review aids for SQLite/D1 schemas with a sqlc catalog.

  • Works in 2 steps: Where is index work missing? Walk every… → Where might code N+1? Find for-loops…
  • Tasks that involve SQL
  • SKILL.md covers index-coverage.mjs, When dropping a candidate, n-plus-one.mjs and When to invoke, plus 4 more sections
  • Runs JavaScript scripts from its folder; calls node

What it does

SQL Schema Audit is an agent skill from mizchi/skills. Index coverage and N+1 review aids for SQLite/D1 schemas with a sqlc catalog. Surfaces unused indexes (with FK CASCADE awareness so cascade-load-bearing indexes are not flagged), queries that scan tables without index help, and for-loops calling generated SQL fns.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including scripts (for example `README.md`).

It sits in Databases, covering SQL. It works with SQL and SQLite. The repository describes itself as: Agent skills by mizchi, distributed via APM.

When your agent uses it

  • Tasks that involve SQL

Example prompts

  • “/sql-schema-audit”

Requirements

  • Node.js

Workflow steps

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

  1. Where is index work missing? Walk every query plan and attribute each SCAN to either a known intentional case (no covering index possible)…
  2. Where might code N+1? Find for-loops that call sqlc-generated functions — review aid, not a hard fail, because batch inserts are legitimate.

What it can do on your machine

Read from SKILL.md and the folder at commit 62f5808. 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

    Ships 2 files in scripts/ (JavaScript), which the agent can run.

    Shell commands in SKILL.md call:

    • node

    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

SQL Schema Audit loads about 1.3k tokens when it runs. Until then it costs about 71 tokens; SKILL.md has 573 words of instructions outside code blocks.

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

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); the scripts in this folder are not scanned.

SKILL.md

Without a licence we can't republish the file, so here is its outline and opening line. It has 573 words (~1,284 tokens).

“Use this for two recurring DBA review tasks:”

— opening of SKILL.md by mizchi
name
sql-schema-audit
version
0.1.0

Read the full SKILL.md on GitHub

Files

SKILL.md and 3 other files (scripts) in sql-schema-audit of mizchi/skills.

  • SKILL.md
  • README.md
  • scripts/index-coverage.mjs
  • scripts/n-plus-one.mjs

Open the folder on GitHubat commit 62f5808

Compare with similar skills

SQL Schema Audit 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.

SQL Schema Audit compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
SQL Schema Audit this skillmizchi/skills356—~1.3kAutomated safety check: PassNone
SQL Database Support for pRESTprest/prest4.6k—~1.6kAutomated safety check: PassMIT
Cursor BYOK Database Schemaleookun/cursor-byok3.2k—~1.3kAutomated safety check: PassMIT
Squixeduardofuncao/squix273—~784Automated safety check: PassMIT
Analyzing SQL Tracesnwjs/chromium.src160—~2.9kAutomated safety check: PassBSD-3-Clause
Golang Databaseunxed/f42412 repos~2.9kAutomated safety check: PassMIT

Similar skills

  • Guides classifying, gap-analyzing and scaffolding support for a new SQL database in pREST, from Postgres-compatible variants to entirely new dialects.

    4.6k GitHub stars~1.6k tokensUpdated today
    DatabasesAuto-check passed
  • Cursor BYOK Database Schema

    leookun/cursor-byok

    Guides SQLite schema changes in the Cursor BYOK server, keeping SQLx migrations, the Rust store, API contracts and fixtures aligned.

    3.2k GitHub stars~1.3k tokensUpdated today
    DatabasesAuto-check passed
  • Squix

    eduardofuncao/squix

    Run SQL queries across databases (Postgres, MySQL, SQLite, etc.) via the squix CLI.

    273 GitHub stars~784 tokensUpdated 15 days ago
    DatabasesAuto-check passed
  • Analyzing SQL Traces

    nwjs/chromium.src

    Extracts raw trace data from Perfetto traces, runs arbitrary SQL queries for custom follow-up analysis, and applies expert cognitive principles (Tiered Flow Analysis, Semantic Mismatch, Redundancy)…

    160 GitHub stars~2.9k tokensUpdated 4 days ago
    DatabasesAuto-check passed
  • Comprehensive guide for Go database access — parameterized queries, struct scanning, NULLable columns, transactions, isolation levels, SELECT FOR UPDATE, connection pool, batch processing, context…

    241 GitHub starsUsed in 2 repos~2.9k tokens
    DatabasesAuto-check passed
  • Import Export

    AHS12/thoth-blueprint

    Change SQL, SQLite worker, DBML, JSON, Mermaid, SVG, or database export/import flows while preserving diagram semantics and round trips.

    626 GitHub stars~499 tokensUpdated 1 mo ago
    DatabasesAuto-check passed

More from mizchi/skills

All 69 skills in this repo
  • Publish Agent Skill

    mizchi/skills

    Package, publish, verify and update an agent skill through a Claude Code plugin marketplace, APM or the npx skills CLI.

    356 GitHub stars~1.7k tokensUpdated 6 days ago
    Auto-check passed
  • AI Index

    mizchi/skills

    Method and tooling for measuring how AI-generated a piece of prose reads, in Japanese or English.

    356 GitHub stars~3.6k tokensUpdated 6 days ago
    Auto-check passed
  • Cloudflare Deploy

    mizchi/skills

    Deploy applications and infrastructure to Cloudflare with the cf CLI and typed cloudflare.config.ts.

    356 GitHub stars~2.9k tokensUpdated 6 days ago
    Auto-check: notes
  • Review Image

    mizchi/skills

    Review screenshots or other images with OpenRouter vision models via bundled Deno scripts.

    356 GitHub stars~1.3k tokensUpdated 6 days ago
    Auto-check passed
  • Post-generation safety checks for sqlc-gen-moonbit + Cloudflare D1.

    356 GitHub stars~995 tokensUpdated 6 days ago
    Auto-check passed
  • Apm Usage

    mizchi/skills

    Reference for APM (Agent Package Manager) — apm.yml syntax, install / uninstall / update commands, target detection, lockfile workflow.

    356 GitHub stars~1.9k tokensUpdated 6 days ago
    Auto-check passed

Works with

Categories

Questions about SQL Schema Audit

What does SQL Schema Audit do?

Index coverage and N+1 review aids for SQLite/D1 schemas with a sqlc catalog. SQL Schema Audit is an agent skill from mizchi/skills. Index coverage and N+1 review aids for SQLite/D1 schemas with a sqlc catalog.

When should I use SQL Schema Audit?

SQL Schema Audit fits situations like: tasks that involve SQL.

How do I install SQL Schema Audit in Claude Code?

Run `npx skills add mizchi/skills --skill sql-schema-audit -a claude-code`. Or copy the skill folder (sql-schema-audit in mizchi/skills) into .claude/skills/sql-schema-audit in your project. Claude Code loads it when a task matches its description.

How do I install SQL Schema Audit in Codex?

Run `npx skills add mizchi/skills --skill sql-schema-audit -a codex`. Or copy the skill folder (sql-schema-audit in mizchi/skills) into .agents/skills/sql-schema-audit in your project. Codex loads it when a task matches its description.

Can I use SQL Schema Audit 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 mizchi/skills --skill sql-schema-audit -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sql-schema-audit, .gemini/skills/sql-schema-audit, .github/skills/sql-schema-audit and .opencode/skills/sql-schema-audit in your project.

What does SQL Schema Audit need to run?

Going by SKILL.md and its folder, SQL Schema Audit needs JavaScript for the scripts in its folder and the command-line tools its instructions call (node). Our summary lists: Node.js.

Does SQL Schema Audit 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 SQL Schema Audit 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does SQL Schema Audit use?

No licence was found for SQL Schema Audit or its repository. Without one, default copyright applies: ask the author before reusing or redistributing it.

How many tokens does SQL Schema Audit use?

About 1.3k tokens (SKILL.md is roughly 5.1k 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 SQL Schema Audit?

Skills that share tags, products or a category with SQL Schema Audit: SQL Database Support for pREST (prest/prest, 4.6k stars), Cursor BYOK Database Schema (leookun/cursor-byok, 3.2k stars), Squix (eduardofuncao/squix, 273 stars) and Analyzing SQL Traces (nwjs/chromium.src, 160 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains SQL Schema Audit?

mizchi (a GitHub user) maintains it in mizchi/skills, which has 356 GitHub stars. The repository holds 69 skills in this directory. The repository was last updated on October 2, 2026.

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