db-check

db-check is a skill for Claude Code from faizkhairi/claude-code-blueprint. It costs 12 tokens per session (248 once invoked), scanned A, original, MIT.

A review of a project's database structure and the code that accesses it. A database stores application data in organised tables, while an ORM lets code work with those tables through models.

In plain words
What is it for?
Use it to check schema coverage, query safety, relationship rules, date handling, and migration risks.
Why use it?
It can reveal missing indexes, unsafe queries, broken relationships, inefficient repeated queries, and risky schema changes.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions CLAUDE.md.

Good fit Use it to check schema coverage, query safety, relationship rules, date handling, and migration risks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/faizkhairi/claude-code-blueprint/db-check
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 faizkhairi/claude-code-blueprint --skill db-check
Clone the repo
git clone --depth 1 https://github.com/faizkhairi/claude-code-blueprint

Made for: Claude Code.

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 db-check

README.md
[![agentmods](https://agentmods.dev/badge/skills/faizkhairi/claude-code-blueprint/db-check/github.svg)](https://agentmods.dev/skills/faizkhairi/claude-code-blueprint/db-check)
Your own site
<a href="https://agentmods.dev/skills/faizkhairi/claude-code-blueprint/db-check"><img src="https://agentmods.dev/badge/skills/faizkhairi/claude-code-blueprint/db-check/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 db-check

Your own site · 80×15
<a href="https://agentmods.dev/skills/faizkhairi/claude-code-blueprint/db-check"><img src="https://agentmods.dev/badge/skills/faizkhairi/claude-code-blueprint/db-check.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 248 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.00012 $0.00248
Opus 5.5 $0.00005 $0.00099
Sonnet 5.5 $0.00002 $0.00050
Haiku 4.5 $0.00001 $0.00025

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

Security

Grade A, and why

db-check 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 1mo 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/db-check/SKILL.md · 20 lines

What it actually says

Database health check for the current project:

  1. Read the ORM schema file (e.g., prisma/schema.prisma, drizzle/schema.ts, SQLAlchemy models, ActiveRecord schema, Entity Framework DbContext, GORM structs, or equivalent) and analyze all models
  2. CRITICAL: Check all database tables have ORM models (unmodeled tables may be dropped on schema sync, e.g. Prisma db push; know whether your ORM's sync command is destructive)
  3. Check for missing indexes on foreign keys and frequently queried columns
  4. Scan services for N+1 query patterns (missing eager loading / includes in queries)
  5. Verify undefined vs null usage in all ORM create/update operations
  6. Check raw SQL queries for injection vulnerabilities (parameterized queries required)
  7. Verify referential integrity (cascade rules, orphan prevention)
  8. Check for date handling issues (check CLAUDE.md for system-specific date formats)
  9. Review migration history for risky operations

Report findings with severity: CRITICAL / HIGH / MEDIUM / LOW.

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. 1mo ago First seen · 20 lines · 12 tokens per session scan A f0be02b62fdb

Subscribe to this mod's changes

db-check is a skill published in the GitHub repository faizkhairi/claude-code-blueprint (73 stars, last pushed 29d ago), licensed MIT. It adds 12 tokens to every session and 248 once invoked, about $0.0000 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-08-30.

Related

Other skills, from other repositories

building-agents

Use when building or restructuring an LLM agent — provider adapter, tool calling, structured output, RAG, agent loop, eval gate, cost routing, tracing, MCP server — model-agnostic across OpenAI/Anthropic/Gemini/OSS so a model swap is a config change. NOT vector-store SQL alone (that is postgresdb) or service…

ericrisco/rsc-harness · 85 tokens

database-expert

Advanced database design and administration for PostgreSQL, MongoDB, and Redis. Use when designing schemas, optimizing queries, managing database performance, or implementing data patterns.

travisjneuman/.claude · 36 tokens

generic-fullstack-feature-developer

Guide feature development for full-stack applications with architecture focus. Covers Next.js App Router patterns, NestJS backend services, database models, data workflows, and seamless integration. Use when adding new features, refactoring existing code, or planning major changes.

travisjneuman/.claude · 56 tokens

agent-database-expert

Specialist subagent: Expert database architect and engineer for PostgreSQL, MongoDB, Redis, and all major databases. Use when designing schemas, optimizing queries, planning migrations, implementing caching, or troubleshooting database performance.

travisjneuman/.claude · 49 tokens

sql-correctness

SQL evaluation criteria for Databricks. Load when the trace contains executesql tool calls or SQL code in responses. Covers syntax validity, Unity Catalog patterns, and Databricks-specific SQL features.

databricks-solutions/ai-dev-kit · 44 tokens

db-context-postgres

Validate that a non-Supabase Postgres database (Cloud SQL, RDS, self-hosted) is reachable, introspect a scoped subset of its schema, and persist it as DBCONTEXT.md. Read-only, opt-in. Use when work touches that database and planning needs verified schema, or DBCONTEXT.md is stale. Do not use without a task (run…

Mozurok/fhorja.dev · 113 tokens