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.
git clone --depth 1 https://github.com/mertjane/awesome-claude-commandsWrote 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.
[](https://agentmods.dev/commands/mertjane/awesome-claude-commands/db-schema)<a href="https://agentmods.dev/commands/mertjane/awesome-claude-commands/db-schema"><img src="https://agentmods.dev/badge/commands/mertjane/awesome-claude-commands/db-schema/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.
<a href="https://agentmods.dev/commands/mertjane/awesome-claude-commands/db-schema"><img src="https://agentmods.dev/badge/commands/mertjane/awesome-claude-commands/db-schema.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00041 | $0.01234 |
| Opus 5 | $0.00020 | $0.00617 |
| Sonnet 5 | $0.00008 | $0.00247 |
| Haiku 4.5 | $0.00004 | $0.00123 |
Grade A, and why
db-schema 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 10d 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.
How it starts
The opening of the file, as written. The whole thing — 172 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Generate Database ERD Diagram
Analyze the project's database models and schema files, then produce a Mermaid erDiagram saved to docs/schema.md (or the path in $ARGUMENTS if provided).
Step 1 — Detect ORM
Search for known config and schema files in this order:
Prisma:
Glob: **/*.prisma (exclude node_modules)
If found → ORM is Prisma.
Drizzle:
Glob: {src,db,database,lib}/**/{schema,drizzle}.{ts,js}
Check for imports of drizzle-orm, pgTable, mysqlTable, sqliteTable → ORM is Drizzle.
TypeORM:
Glob: {src,lib}/**/*.entity.{ts,js}
Check for @Entity() decorator → ORM is TypeORM.
Sequelize:
Glob: {src,lib,models}/**/*.{ts,js}
Check for DataTypes, Model.init, sequelize.define → ORM is Sequelize.
Mongoose:
Glob: {src,lib,models}/**/*.{ts,js}
Check for new Schema(, mongoose.model( → ORM is Mongoose.
Raw SQL:
Glob: **/*.{sql,migration.ts,migration.js}
If CREATE TABLE statements found → parse SQL directly.
If multiple ORMs detected, list all and process each.
Step 2 — Extract Models and Fields
Prisma
Read each .prisma file. For every model block extract:
- Model name
- Fields: name, type (
String,Int,Boolean,DateTime,Float,Json) - Relations:
@relationfields — extractfields,references - Optional (
?) vs required fields @id,@unique,@@uniqueconstraints
Drizzle
Read schema files. For every table definition extract:
- Table name (first argument to
pgTable/mysqlTable/sqliteTable) - Columns: name and type (
varchar,integer,boolean,timestamp,text,json) .primaryKey(),.notNull(),.unique()modifiersreferences(() => otherTable.column)for foreign keys
TypeORM
Read each .entity.ts file. Extract:
- Class name (model name)
@Column()fields with type@PrimaryGeneratedColumn()or@PrimaryColumn()@OneToMany,@ManyToOne,@OneToOne,@ManyToManyrelations and their targets
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.
- 10d ago First seen · 172 lines · 41 tokens per session scan A 0aa39d214547
db-schema is a command published in the GitHub repository mertjane/awesome-claude-commands (2 stars, last pushed 6mo ago), licensed MIT. It adds 41 tokens to every session and 1,234 once invoked, about $0.0002 per session on Opus 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-08-31.
Other commands, from other repositories
psql-query
Run ad-hoc PostgreSQL analytics queries against dev/test database.
new-migration
Scaffold a new database migration file pair (up + down) with auto-detection of migration tool and numbering.
budget
Marks the cheapest Claude model and effort that still clears this task with high confidence. Still shows the full Budget, Optimal, and Splurge spread.
data-models-block
When this command is used, use the following block. Acknowledge your understanding and then await the user's request.
db-audit
Audit database schema and queries for performance and design issues.
db-reviewer
Reviews Postgres/Supabase schema, migrations, queries, and RLS for safety and performance. Use when DB code changes, before applying a migration, or inside /...