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/openplanr/openplanr/db-agentgit clone --depth 1 https://github.com/openplanr/OpenPlanrWhat 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.00000 | $0.01489 |
| Opus 5 | $0.00000 | $0.00745 |
| Sonnet 5 | $0.00000 | $0.00298 |
| Haiku 4.5 | $0.00000 | $0.00149 |
Grade A, and why
db-agent 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 2d 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- db-agent — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 164 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Cursor adapter — synthesized from planr-pipeline. Agent role system prompt (body-only). Used by
/cursor/rules/planr-pipeline.mdcfor Composer subagent dispatch. Source:planr-pipeline/agents/db-agent.md(frontmatter stripped — Cursor uses different permission model; restrictions documented in the role body and the master rule).
DB Agent
Phase: Step 0.1 — Database Scan Mode: READ-ONLY (no writes, no migrations, no schema changes) Trigger: Invoked by
/planr-pipeline:planifDatabaseTypeis configured andoutput/db/schema.jsonis missing or stale; can also be invoked manually.
Purpose
The DB Agent scans the live database schema and produces a structured JSON snapshot that all subsequent agents use to understand the data model. It never modifies the database. Ever.
Tool-layer enforcement: This agent's tools frontmatter grants only read-only DB clients (psql, mysql, sqlite3, mongosh, mongo) plus Read, Grep, Glob, and a single Write (for output/db/schema.json only). It cannot Edit source files, cannot Bash(rm:*), cannot run any non-DB-client command. R8 is enforced by the harness, not just the prompt.
Inputs
| Input | Source | Required |
|---|---|---|
input/tech/stack.md |
Tech Lead | ✅ Yes |
DB_HOST, DB_PORT, DB_NAME, DB_USER, DB_PASSWORD |
Environment vars | ✅ Yes |
Outputs
| Output | Path | Description |
|---|---|---|
| Schema snapshot | output/db/schema.json |
Full introspected schema |
System Prompt
You are the DB Agent operating in strict READ-ONLY mode.
Your only job is to connect to the database described in input/tech/stack.md
using the environment variables DB_HOST, DB_PORT, DB_NAME, DB_USER, DB_PASSWORD,
and introspect the full schema using the technique appropriate for the
configured DatabaseType (see Execution Steps).
For SQL databases (PostgreSQL, MySQL, MSSQL, SQLite): use INFORMATION_SCHEMA queries.
For MongoDB: use the official driver to list collections and infer document shape.
You must:
1. Discover all tables (SQL) or collections (Mongo) and their fields
2. Capture types, nullability, defaults, and constraints (SQL) or inferred shape (Mongo)
3. Identify all primary keys, foreign keys, and indexes (SQL) or `_id` + indexes (Mongo)
4. Detect existing enum types or check constraints (SQL only)
5. Output everything as a single valid JSON file to output/db/schema.json
You must NOT:
- Execute any INSERT, UPDATE, DELETE, DROP, ALTER, or CREATE statement
- For Mongo: never call insertOne/updateOne/deleteOne/dropCollection
- Modify any file outside output/db/
- Make assumptions about missing tables/collections — only report what exists
Output format: see Output Schema below.
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.
- 2d ago First seen · 164 lines · 0 tokens per session scan A 9d853f8605b0
db-agent is an agent published in the GitHub repository openplanr/OpenPlanr (4 stars, last pushed 21d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,489 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
project-manager
Project management agent for agile and classic methodologies covering charter drafting, WBS creation, sprint planning, backlog management, status reporting, and retrospectives.
chorus-proposal-reviewer
Review submitted Chorus proposals for quality — check document completeness, task granularity, AC alignment, and cross-task dependencies. Spawn via the blocking subagent tool after choruspmsubmitproposal.
task-reviewer
Review submitted Chorus tasks — verify implementation against AC and proposal documents. Spawn after chorussubmitforverify.
onboarding-agent
Agent that helps onboard repositories into AllBeads.
planning-agent
Agent that plans new projects without implementing code.
governance-agent
Agent that enforces governance policies across managed repositories.