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.
npx agentmods add skills/kensaurus/cursor-kenji/audit-db-schemanpx skills add kensaurus/cursor-kenji --skill audit-db-schemagit clone --depth 1 https://github.com/kensaurus/cursor-kenjiWrote 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/skills/kensaurus/cursor-kenji/audit-db-schema)<a href="https://agentmods.dev/skills/kensaurus/cursor-kenji/audit-db-schema"><img src="https://agentmods.dev/badge/skills/kensaurus/cursor-kenji/audit-db-schema.svg" alt="Measured on agentmods" 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 | $0.00066 | $0.04098 |
| Opus 5 | $0.00033 | $0.02049 |
| Sonnet 5 | $0.00013 | $0.00820 |
| Haiku 4.5 | $0.00007 | $0.00410 |
Grade A, and why
audit-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 yesterday.
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 — 475 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Database Schema Audit Skill
Degree of freedom: MIXED — Steps 0, 1, 3 [HIGH freedom]; Steps 2 and 4
MCP/SQL probes [LOW freedom — run exactly] (run the query; do not invent a schema).
How to reason
- Observe — quote the column, constraint, advisor row, or query result
- Interpret — what fails at write-time, read-time, or migrate-time?
- Classify — naming / type / constraint / index / RLS / migration / correct
- Severity — missing FK/RLS on public data = P0; type/index drift = P1; naming = P2
Worked example
Observe:
orders.user_idis nullabletext, no FK, no index;rowsecurity = false. Interpret: orphan rows can insert; the client can SELECT every order; lookups seq-scan. Classify: constraint + index + RLS (not a naming nit). Severity: P0 — public table, no RLS, no FK. Finding:orders| RLS+FK | P0 | enable RLS +user_id uuid references users(id)+ index.
Self-critique before reporting [LOW freedom — do not skip]
- Evidenced — query result or advisor URL, not "Postgres usually…"
- Reproducible — same SQL twice; do not cite a stale
list_tables - Severity justified — P0 = data loss, leak, or unconstrained money type
- Right owner — who-can-read-what →
plan-rls-audit; DELETE/TRUNCATE →plan-data-integrity; RPO →plan-backup-dr - No migrations applied — findings only
Step 0: Auto-Detect Database Environment
0a. Detect Database and ORM
| Signal | Technology |
|---|---|
@supabase/supabase-js in package.json |
Supabase (Postgres) |
prisma in devDependencies, prisma/schema.prisma |
Prisma ORM |
drizzle-orm in dependencies, drizzle/ directory |
Drizzle ORM |
sequelize in dependencies |
Sequelize ORM |
sqlalchemy in requirements |
SQLAlchemy (Python) |
supabase/migrations/*.sql directory |
Supabase migrations |
prisma/migrations/ directory |
Prisma migrations |
drizzle/migrations/ or drizzle/*.sql |
Drizzle migrations |
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.
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.
- yesterday First seen · 475 lines · 66 tokens per session scan A b07350c2cc2d
audit-db-schema is a skill published in the GitHub repository kensaurus/cursor-kenji (9 stars, last pushed 7d ago), licensed MIT. It adds 66 tokens to every session and 4,098 once invoked, about $0.0003 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-09-03.
Other skills, from other repositories
firebase-cloud-firestore
Use when setting up Firestore, designing schemas, doing CRUD, creating listeners, paginating queries, configuring indexes, enabling offline persistence, or writing security rules.
firebase-database
Use when syncing real-time data, structuring JSON trees, reading/writing, creating listeners, enabling offline persistence, managing presence, sharding, or writing security rules.
firebase-data-connect
Use when setting up Data Connect, writing GraphQL queries/mutations, configuring generated SDKs, handling offline, or applying security rules.
055-design-parallel-change
Use when a database schema or data-meaning change needs Parallel Change, including expand, migrate, and contract sequencing for column renames, type or data reinterpretation, large-table backfills, relationship-table changes, enum/status transitions, timezone/default changes, and index or uniqueness changes. This…
705-technologies-nosql-mongodb
Use when you need framework-agnostic MongoDB and non-relational database query guidance — document schema design, collection modeling, JSON Schema validation, indexes, aggregation pipelines, query performance, consistency trade-offs, transactions, and operational safety — without choosing Spring Boot, Quarkus, or…
311-frameworks-spring-jdbc
Use when you need to write or review programmatic JDBC with Spring — including JdbcClient (Spring Framework 7+) as the default API, JdbcTemplate only where batch/streaming APIs require JdbcOperations, NamedParameterJdbcTemplate for legacy named-param code, parameterized SQL, RowMapper mapping to records, batch…