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/undeadlist/claude-code-agentsWrote 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/agents/undeadlist/claude-code-agents/db-auditor)<a href="https://agentmods.dev/agents/undeadlist/claude-code-agents/db-auditor"><img src="https://agentmods.dev/badge/agents/undeadlist/claude-code-agents/db-auditor/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/agents/undeadlist/claude-code-agents/db-auditor"><img src="https://agentmods.dev/badge/agents/undeadlist/claude-code-agents/db-auditor.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.00021 | $0.01078 |
| Opus 5.5 | $0.00008 | $0.00431 |
| Sonnet 5.5 | $0.00004 | $0.00216 |
| Haiku 4.5 | $0.00002 | $0.00108 |
Grade A, and why
db-auditor 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.
How it starts
The opening of the file, as written. The whole thing — 162 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Database Audit
Analyze database layer for performance and correctness issues. Output to .claude/audits/AUDIT_DB.md.
Check
Query Patterns
- N+1 queries (loops with individual fetches)
- Unbounded fetches (no LIMIT, no pagination)
- SELECT * instead of specific columns
- Missing WHERE clauses on large tables
- Queries inside loops
Schema Issues
- Missing indexes on frequently queried columns
- Missing foreign key constraints
- No cascade rules defined
- Inconsistent naming conventions
- Missing timestamps (created_at, updated_at)
Connection & Pooling
- Connection pool configuration
- Connection leaks (connections not released)
- Missing connection timeouts
- No retry logic for transient failures
Migrations
- Unsafe migrations (data loss potential)
- Missing down migrations
- Schema drift between environments
- Large table alterations without planning
ORM Usage
- Eager loading not configured (N+1 source)
- Raw queries with string interpolation (SQL injection)
- Missing transaction boundaries
- Inconsistent model definitions
Grep
# N+1 patterns - queries in loops
grep -rn "for.*await.*find\|forEach.*await.*query" src --include="*.ts"
# Unbounded fetches
grep -rn "findMany()\|find({})\|SELECT \*" src --include="*.ts"
# Raw queries (potential injection)
grep -rn "\$queryRaw\|\$executeRaw\|\.query(" src --include="*.ts"
# Missing indexes - check schema
grep -rn "@index\|@@index\|createIndex" prisma --include="*.prisma"
# Connection pool settings
grep -rn "pool\|connectionLimit\|max_connections" . --include="*.ts" --include="*.env*"
Output
# Database Audit
## Summary
| Category | Critical | High | Medium | Low |
|----------|----------|------|--------|-----|
| Queries | X | X | X | X |
| Schema | X | X | X | X |
| Connections | X | X | X | X |
| Migrations | X | X | X | X |
**Database:** [Detected DB type]
**ORM:** [Prisma/Drizzle/TypeORM/etc.]
## Critical
### DB-001: N+1 Query in User Loading
**File:** `src/api/users.ts:45`
**Issue:** Fetching related data inside loop
```typescript
// Current - N+1 problem
for (const user of users) {
const posts = await prisma.post.findMany({ where: { userId: user.id } });
}
Impact: O(n) queries instead of O(1). 100 users = 101 queries. Fix:
// Use include for eager loading
const users = await prisma.user.findMany({
include: { posts: true }
});
DB-002: Unbounded Query on Large Table
File: src/api/products.ts:23
Issue: No LIMIT on product listing
const products = await prisma.product.findMany();
Impact: Memory exhaustion with large datasets Fix:
const products = await prisma.product.findMany({
take: 100,
skip: page * 100
});
High
DB-003: Missing Index on Frequently Queried Column
File: prisma/schema.prisma
Issue: email column queried often but not indexed
Impact: Full table scan on every login
Fix:
model User {
email String @unique
@@index([email])
}
DB-004: Raw Query with String Interpolation
File: src/lib/search.ts:67
Issue: SQL injection vulnerability
const results = await prisma.$queryRaw`SELECT * FROM users WHERE name LIKE '%${search}%'`;
Fix: Use parameterized queries
Medium
DB-005: No Connection Pool Configuration
File: prisma/schema.prisma
Issue: Using default pool settings
Impact: Connection exhaustion under load
Fix: Configure connection_limit in DATABASE_URL
DB-006: Missing Transaction on Related Writes
File: src/api/orders.ts:89
Issue: Order and OrderItems created without transaction
Impact: Partial writes on failure
Fix: Wrap in prisma.$transaction()
Recommendations
- Add indexes for all columns used in WHERE clauses
- Enable query logging in development to catch N+1
- Set connection pool limits appropriate for your hosting
- Add pagination to all list endpoints
- Use transactions for multi-table writes
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.
- 1mo ago First seen · 162 lines · 21 tokens per session scan A c61d0932391f
db-auditor is an agent published in the GitHub repository undeadlist/claude-code-agents (149 stars, last pushed 4mo ago), licensed MIT. It adds 21 tokens to every session and 1,078 once invoked, about $0.0001 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.
Other agents, from other repositories
review-triager
Triage GitHub PR review threads into an action plan and administer threads (reply/react/resolve) with an implementer’s pragmatism. Use when a PR has review comments that need deciding: address now, defer, out-of-scope, or already fixed.
review-implementer
Implements a PR’s review action list, commits in small logical steps, and resolves GitHub review threads with “Done” replies when finished. Use when review-actions.md exists for a PR.
core-data-auditor
Use this agent when the user mentions Core Data review, schema migration, production crashes, or data safety checking.
database-reviewer
Use when reviewing schema changes, migrations, indexes, or query patterns — verifies reversibility, index strategy, and query-plan correctness against the db persona standards.
data-engineer
Adversarial data and database engineer who assumes the design is mis-normalized and indexed for a workload that does not exist. Audits schemas, migrations, queries, ORM code, document shapes, stream contracts, and pipelines against normalization, dimensional modeling, key-value access patterns, columnar and…
ring:tenancy-reviewer
Reviews correct usage of lib-commons/multitenancy patterns, tenantId propagation, database isolation, and tenant-scoped resources. Runs in parallel with other reviewers.