awesome-database-audit

awesome-database-audit is a skill for Claude Code from khasky/awesome-agent-skills. It costs 49 tokens per session (3,105 once invoked), scanned A, original, MIT.

A read-only review of a database's structure, queries, data rules, migrations, and operational practices. It looks for design problems that can cause slow queries, data corruption, or failed production changes.

In plain words
What is it for?
Use it to review table design, data types, keys, indexes, query patterns, constraints, transactions, locking, migrations, backups, and connection pooling.
Why use it?
It helps find database defects before they become production incidents. Findings are tied to specific schema files, migrations, queries, or execution plans.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the awesome-agent-skills plugin — 49 skills shipped together

Good fit Use it to review table design, data types, keys, indexes, query patterns, constraints, transactions, locking, migrations, backups, and connection pooling.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/khasky/awesome-agent-skills/awesome-database-audit
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add khasky/awesome-agent-skills --skill awesome-database-audit
Clone the repo
git clone --depth 1 https://github.com/khasky/awesome-agent-skills

Made for: Claude Code.

Or install awesome-agent-skills, the plugin that ships this one along with the rest of its 49 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for awesome-database-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/khasky/awesome-agent-skills/awesome-database-audit/github.svg)](https://agentmods.dev/skills/khasky/awesome-agent-skills/awesome-database-audit)
Your own site
<a href="https://agentmods.dev/skills/khasky/awesome-agent-skills/awesome-database-audit"><img src="https://agentmods.dev/badge/skills/khasky/awesome-agent-skills/awesome-database-audit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for awesome-database-audit

Your own site · 80×15
<a href="https://agentmods.dev/skills/khasky/awesome-agent-skills/awesome-database-audit"><img src="https://agentmods.dev/badge/skills/khasky/awesome-agent-skills/awesome-database-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,105 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00049 $0.03105
Opus 5.5 $0.00020 $0.01242
Sonnet 5.5 $0.00010 $0.00621
Haiku 4.5 $0.00005 $0.00311

Measured 7d ago against content hash a75c8f974281, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

awesome-database-audit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/awesome-database-audit/SKILL.md · 107 lines

How it starts

The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Database Audit

Audit a database layer — schema, queries, migrations, and the operational habits around them — for the design defects that surface as slow queries, silent data corruption, and unrunnable migrations in production. Read-only: it reports findings and a verdict; it never edits schema, data, or code. Works from the repo's schema files, migrations, and query sites; a live connection is optional and read-only when present. An executing plan (EXPLAIN ANALYZE and its equivalents) runs the statement it measures, so on a live database it is used for reads only; a write gets the estimated plan, or its executing plan is prescribed for a disposable copy.

Evidence, not taste. Every finding cites its artifact — a file:line in a migration or model, a query site, a schema definition, an EXPLAIN output if a connection exists. A "smelly" table name is a lead; confirm the defect (the missing constraint, the unindexable predicate) before flagging.

Four audit tracks — run the ones in scope:

  • A. Schema design — types, keys, and the anti-pattern catalog.
  • B. Query patterns and indexes — what the code asks, and whether an index can answer it.
  • C. Integrity and concurrency — constraints, transactions, locking strategy.
  • D. Migrations and operations — evolution, restore path, seeds, pooling.

Scope and method

  1. Establish scope — the whole schema, one domain's tables, or the migration history. Name it; findings without a boundary don't prioritize.
  2. Locate the source of truth — schema files, ORM models, migration directory; note the engine and version (Postgres/MySQL/SQLite behave differently and some findings are engine-specific — say which).
  3. Read the project's own words — its glossary (CONTEXT.md, a domain doc) or the vocabulary its models, tests and API already use, and name every finding in those terms; a table or column that contradicts the glossary's own definition is itself a finding, and a report that renames the domain makes the reader translate before they can act.
  4. Read schema before queries — a table designed wrong makes every query against it a finding; start where the defects multiply.
  5. Grep the query sites — ORM calls and raw SQL both; an anti-pattern that never runs on a hot path is a note, not a FIX. Zero hits is not proof of absence — ripgrep honors .gitignore; re-scan with ignores off before concluding.
  6. With a live connection, start from real load — the top statements by total time (calls × mean) from the engine's statement statistics or slow-query log, each mapped to its call site in code; that list orders Track B. Statistics collection off → the load-based part is NOT ASSESSED, and the missing collection is a Track D finding.
  7. Score, gate, report — see Output.

Read the full file on GitHub · 107 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago Changed a75c8f974281
  2. 17d ago Changed · +6 lines 22f365f137fa
  3. 1mo ago Changed · -85 tokens per session 0dd4738d3b5e
  4. 1mo ago Changed d7f52f31497f
  5. 1mo ago Changed · +3 lines · -62 tokens per session eef8bdbde273
  6. 1mo ago First seen · 98 lines · 196 tokens per session scan A 6f72a462dc90

Subscribe to this mod's changes

awesome-database-audit is a skill published in the GitHub repository khasky/awesome-agent-skills (19 stars, last pushed 7d ago), licensed MIT. It adds 49 tokens to every session and 3,105 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.

Related

Other skills, from other repositories

redis

Expert Redis in-memory data store assistance covering data structures, caching, pub/sub, Lua scripts, Redis Streams, and clustering. Use when building ultra-fast caches, rate limiters, session stores, or message queues.

G1Joshi/Agent-Skills · 45 tokens

dbt

Expert dbt (data build tool) assistance covering SQL modeling, Jinja macros, tests, documentation, and semantic layer. Use when building analytics engineering pipelines on BigQuery, Snowflake, or PostgreSQL.

G1Joshi/Agent-Skills · 45 tokens

event-sourcing

Expert Event Sourcing assistance covering immutable append-only event logs, state reconstruction, snapshotting, event versioning, and temporal queries. Use when building audit-compliant persistence systems, financial ledgers, or historical state tracking.

G1Joshi/Agent-Skills · 48 tokens

arangodb

Expert ArangoDB multi-model database assistance covering AQL, document collections, graphs, and Foxx microservices. Use when querying graph relationships, joining document stores, or designing multi-model schemas.

G1Joshi/Agent-Skills · 42 tokens

bigquery

Expert Google Cloud BigQuery assistance covering standard SQL, partitioning, clustering, cost optimization, and ML. Use when running petabyte analytics queries, designing data warehouse schemas, or optimizing BI workloads.

G1Joshi/Agent-Skills · 42 tokens

cassandra

Expert Apache Cassandra assistance covering CQL, partition keys, clustering columns, tombstone avoidance, and nodetool. Use when designing linear scale data stores, high-write ingestion engines, or tuning consistency levels.

G1Joshi/Agent-Skills · 44 tokens