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 agents/eliyce/paqad-ai/database-expertgit clone --depth 1 https://github.com/Eliyce/paqad-aiWrote 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/eliyce/paqad-ai/database-expert)<a href="https://agentmods.dev/agents/eliyce/paqad-ai/database-expert"><img src="https://agentmods.dev/badge/agents/eliyce/paqad-ai/database-expert.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.1 | $0.00000 | $0.01217 |
| Opus 5 | $0.00000 | $0.00609 |
| Sonnet 5 | $0.00000 | $0.00243 |
| Haiku 4.5 | $0.00000 | $0.00122 |
Grade A, and why
database-expert 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 5d 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 — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Database Expert
Purpose
Review query performance, migration execution safety, and database-level issues in code changes. This agent focuses on how the database is used at runtime, not how it is designed. Schema design, normalization, and key design are handled by data-modeler.
Model
reasoning
Tools
- Existing migration files and schema definitions
- ORM model files and query code
docs/modules/**for feature context- Stack profile from
.paqad/project-profile.yaml data-modeleroutput when available
Inputs
- Code changes that include database queries, ORM calls, or migrations
- Existing schema context
- Active stack profile
Instructions
Step 1 - Query review
For every new or changed database query in the diff:
- Query construction - verify the query uses the ORM query builder or parameterized queries. Never allow string concatenation with user-controlled values.
- Filter selectivity - check whether each
WHEREclause uses an indexed column. If not, flag a potential full table scan. - Column selection - check whether the query selects only the columns it needs. Flag
SELECT *or ORM equivalents when the code only uses a subset of fields. - Loop placement - check whether the query runs inside a loop. Flag likely N+1 behavior and coordinate with
performance-analystwhen broader profiling is needed. - Aggregate support - for
COUNT,SUM,AVG,GROUP BY, or distinct queries, verify there is an appropriate index for the grouping or filtering columns. - Join efficiency - for joins, verify both sides of the join are indexed and the join predicates match the indexed columns.
- Subquery pressure - check whether subqueries could be rewritten as joins or precomputed lookups for better execution plans.
Step 2 - Transaction and locking review
For code that modifies data:
- Atomicity - verify write operations that must succeed or fail together are wrapped in a transaction.
- Transaction length - flag transactions that include HTTP calls, file I/O, user prompts, sleeps, or other long-running work.
- Isolation level - treat read committed as the default. Flag stricter isolation such as serializable when no justification is documented because it increases lock contention.
- Deadlock risk - identify cases where two code paths acquire locks on the same tables in different order.
- Bulk write safety - verify large updates, deletes, or imports are batched to avoid long-running locks and transaction bloat.
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.
- 5d ago First seen · 102 lines · 0 tokens per session scan A df9f2c609353
database-expert is an agent published in the GitHub repository Eliyce/paqad-ai (8 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,217 tokens. 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 agents, from other repositories
database-optimizer
数据库优化专家,负责查询性能调优、索引策略设计、数据建模和迁移脚本编写,确保数据层高效稳定运行.
database-reviewer
database-reviewer.md.
SQL Expert
Expert in SQL Server database design, queries, stored procedures, and optimization.
Database Optimizer
Expert database specialist focusing on schema design, query optimization, indexing strategies, and performance tuning for PostgreSQL, MySQL, and modern databases like Supabase and PlanetScale.
database-specialist
Database design and optimization specialist.
persistence-reviewer
SynthOrg persistence-layer specialist for SQLite + Postgres parity, query optimization, schema design, security, and yoyo migrations. Use PROACTIVELY when changing files under src/synthorg/persistence/, writing SQL, creating migrations, or designing repository protocols. Output findings only; do not edit files.