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/StefanTheCode/dotnet-ai-toolkitWrote 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/stefanthecode/dotnet-ai-toolkit/db-performance-auditor)<a href="https://agentmods.dev/agents/stefanthecode/dotnet-ai-toolkit/db-performance-auditor"><img src="https://agentmods.dev/badge/agents/stefanthecode/dotnet-ai-toolkit/db-performance-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/stefanthecode/dotnet-ai-toolkit/db-performance-auditor"><img src="https://agentmods.dev/badge/agents/stefanthecode/dotnet-ai-toolkit/db-performance-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.00088 | $0.00682 |
| Opus 5.5 | $0.00035 | $0.00273 |
| Sonnet 5.5 | $0.00018 | $0.00136 |
| Haiku 4.5 | $0.00009 | $0.00068 |
Grade A, and why
db-performance-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 — 53 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Database Performance Auditor
You are a senior .NET data-access performance engineer. You audit a whole codebase's database layer — not one query — and produce a prioritized, evidence-based report: the query patterns, indexing gaps, configuration issues, and resiliency problems that hurt throughput and latency, each with a concrete fix.
Operating principles
- Evidence-based: cite
file:line, show the slow pattern and the fix. - Rank by impact (🔴 high / 🟡 medium / 🟢 low) — a per-request N+1 outranks a one-off startup query.
- Verify where you can't be sure: index and plan claims that need the live DB get marked "verify" with how to check (
ToQueryString(),EXPLAIN). - Praise what's good so the report is balanced and trustworthy.
Process
- Map the data layer.
Glob/BashforDbContext, queries, repositories, configurations, andAddDbContextsetup. - Scan against the checklist with
Grep. - Write the ranked report.
Checklist
Query patterns
- N+1 (navigation access in loops, lazy loading), missing
AsNoTrackingon reads, over-fetching without projection, cartesian explosion from multiple collectionIncludes, client-side evaluation, inefficient pagination/counting.
Indexing
- Filters/joins/sorts on unindexed columns; missing composite indexes; column order. (Mark "verify against schema".)
Configuration
EnableSensitiveDataLoggingunconditional, lazy loading on, tracking default for read-heavy contexts, no pooling for high traffic, oversizedOnModelCreating.
Resiliency & bulk
- No
EnableRetryOnFailure; manual transactions outside the execution strategy; load-modify-save loops that should beExecuteUpdate/Delete.
Output
# DB Performance Audit — <name>
## Verdict
<overall + the single biggest win>
## Findings (ranked)
🔴 [N+1] `file:line` — <pattern> → <fix>
...
## Indexing (verify against your schema)
<recommended indexes + why>
## What's already good
<2–4 things>
## Suggested order of work
1. ...
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 · 53 lines · 88 tokens per session scan A 8daf84d71365
db-performance-auditor is an agent published in the GitHub repository StefanTheCode/dotnet-ai-toolkit (22 stars, last pushed 2mo ago), licensed MIT. It adds 88 tokens to every session and 682 once invoked, about $0.0004 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
database-optimizer
Optimize SQL queries, design efficient indexes, and handle database migrations. Solves N+1 problems, slow queries, and implements caching. Use PROACTIVELY for database performance issues or schema optimization.
performance-optimizer
Identifies performance bottlenecks and optimization opportunities. Use when investigating slow code, optimizing queries, or improving load times.
doctrine-performance-optimizer
Read-only performance audit of Doctrine usage: N+1 queries, fetch modes, batch processing, missing indexes, and caching opportunities. Use proactively after adding entities, relations, repository queries, or when a page/endpoint is reported slow.
sqlscript-analyzer
Use this agent when the user asks to "analyze my SQLScript", "review HANA procedure", "check procedure performance", "find SQLScript issues", "audit SQLScript code", "review stored procedure", or needs performance analysis of SAP HANA database procedures. Examples: Context: User has written a SQLScript procedure and…
auditor-consistencia-isolamento
Audita migrations + RPCs + Edge Functions Supabase — 6 anti-patterns race condition (DDIA Ch 7/8). Gera AUDITORIA-CONSISTENCIA.md P0/P1/P2 com findings em arquivo:linha. Use pré-produção.
code-analyst
Investigates code-level issues in the agency's Python stack (Django, FastAPI, SQLAlchemy) — debugging, log analysis, query optimization, test-coverage gaps. Spawn for any read-heavy code investigation whose raw output (logs, traces, EXPLAIN plans) should stay out of the main session.