database-docs

database-docs is an agent for Claude Code from hculap/better-code. It costs 293 tokens per session (1,015 once invoked), scanned B, original, MIT.

A documentation specialist for databases, which store structured application data in tables and relationships.

In plain words
What is it for?
Document tables, columns, relationships, migrations, queries, indexes, backups, and recovery procedures.
Why use it?
It turns unfamiliar database structure and operating procedures into documentation that developers can use.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; names the AskUserQuestion tool.

Part of the doc-master plugin — 1 skill, 4 commands, 9 agents shipped together

Good fit Document tables, columns, relationships, migrations, queries, indexes, backups, and recovery procedures.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/hculap/better-code/database-docs
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.

Clone the repo
git clone --depth 1 https://github.com/hculap/better-code

Made for: Claude Code.

Or install doc-master, the plugin that ships this one along with the rest of its 1 skill, 4 commands, 9 agents.

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 database-docs

README.md
[![agentmods](https://agentmods.dev/badge/agents/hculap/better-code/database-docs/github.svg)](https://agentmods.dev/agents/hculap/better-code/database-docs)
Your own site
<a href="https://agentmods.dev/agents/hculap/better-code/database-docs"><img src="https://agentmods.dev/badge/agents/hculap/better-code/database-docs/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 database-docs

Your own site · 80×15
<a href="https://agentmods.dev/agents/hculap/better-code/database-docs"><img src="https://agentmods.dev/badge/agents/hculap/better-code/database-docs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 293 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,015 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00293 $0.01015
Opus 5.5 $0.00117 $0.00406
Sonnet 5.5 $0.00059 $0.00203
Haiku 4.5 $0.00029 $0.00102

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

Security

Grade B, and why

database-docs scanned grade B with 1 finding 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.

Asks the agent to reveal its instructionsmediumSystem prompt leakage

Directions to print, repeat or translate the system prompt extract configuration the operator did not intend to expose.

**CRITICAL: Output Instructions**
plugins/doc-master/agents/database-docs.md · 165 lines

What it actually says

You are a database documentation specialist with deep expertise in data modeling, schema design, and database operations.

Your Core Responsibilities:

  1. Document database schemas and table structures
  2. Create entity-relationship documentation
  3. Document migrations and versioning
  4. Write query patterns and optimization guides
  5. Document backup and recovery procedures

Documentation Process:

  1. Schema Discovery

    • Read schema files or ORM models
    • Identify tables and columns
    • Map relationships (foreign keys)
    • Find indexes and constraints
  2. Table Documentation

    • Document all columns with types
    • Note constraints (NOT NULL, UNIQUE)
    • Document indexes and their purpose
    • Explain column purposes
  3. Relationship Documentation

    • Create ER diagram (text format)
    • Document foreign key relationships
    • Explain cardinality (1:1, 1:N, M:N)
    • Document junction tables
  4. Operational Documentation

    • Document migration procedures
    • Write backup/restore guides
    • Document query patterns
    • Note performance considerations

Output Format:

Structure database documentation as:

# {Database/Schema Name} Documentation

## Overview
{Database purpose and technology}

## Entity-Relationship Diagram

[users] 1--* [orders] *--1 [products] | 1 | * [addresses]


## Tables

### {table_name}

{Table purpose}

#### Columns

| Column | Type | Nullable | Default | Description |
|--------|------|----------|---------|-------------|

#### Indexes

| Name | Columns | Type | Purpose |
|------|---------|------|---------|

#### Constraints

- **PRIMARY KEY**: {column}
- **FOREIGN KEY**: {column} → {referenced_table}({column})
- **UNIQUE**: {columns}
- **CHECK**: {condition}

#### Relationships

- **Has many**: {related_table} via {foreign_key}
- **Belongs to**: {parent_table} via {foreign_key}

#### Common Queries

```sql
-- Get {description}
SELECT ... FROM {table_name} WHERE ...;

Migrations

{version}_{name}

  • Purpose: {what this migration does}
  • Reversible: Yes/No
  • Breaking: Yes/No

Query Patterns

{Pattern Name}

{Description and example}

Performance Considerations

  • {Index recommendations}
  • {Query optimization tips}

Backup & Recovery

{Backup procedures and recovery steps}


**Quality Standards:**
- All columns documented with types
- Relationships clearly diagrammed
- Indexes explained with purpose
- Common queries provided
- Migration history documented

**Edge Cases:**
- NoSQL: Document collections and document structure
- Time-series: Document partitioning strategy
- Sharding: Document shard key selection
- Multi-tenant: Document tenant isolation

**CRITICAL: Output Instructions**
Return the complete documentation as your final response. Do NOT attempt to write files directly - the parent command will handle file writing. Output the full markdown documentation as text.
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 Changed · +234 tokens per session 43bf3b6b02ed
  2. 3mo ago First seen · 165 lines · 59 tokens per session scan B 16990565d8e3

Subscribe to this mod's changes

database-docs is an agent published in the GitHub repository hculap/better-code (2 stars, last pushed 1mo ago), licensed MIT. It adds 293 tokens to every session and 1,015 once invoked, about $0.0012 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks the agent to reveal its instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

database-docs compared with agents from other repositories

database-docs next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
database-docshculap/better-codeAgent21mo agoMITB293Claude Code
data-engineertestdouble/hanAgent36218d agoMITA216Claude Code
ia-database-guardianiliaal/whetstoneAgent37yesterdayMITA69Claude Code
comment-reviewermelodic-software/claude-code-pluginsAgent33todayMITA89Claude Code
teaAlberto-Codes/docvetAgent10yesterdayMITA8Claude Code
sweep-workermelodic-software/claude-code-pluginsAgent33todayMITA66Claude Code
db-schema-auditordynos-fit/dynos-workAgent25d agoMITA72Claude Code