database-documentation

Solid

Generate grounded-and-verified, engine-agnostic database documentation that reaches 100% parity with the real schema. Introspects the LIVE database as ground truth and cross-validates it against ORM models, migrations, generated types, seeds, and application queries, then proves completeness by diffing the docs back against the database. Produces ER diagrams (mermaid), per-table data dictionaries, and a machine-readable schema.json. Works with PostgreSQL, MySQL, SQL Server, and SQLite across any ORM (Prisma, TypeORM, Drizzle, Sequelize, Knex, Django, Rails) or raw SQL. Use when asked to document a database, produce an ERD or data dictionary, write db/schema docs, audit schema drift, or refresh existing DB docs.

API & Backend 15 stars 1 forks Updated 1 months ago MIT

Install

View on GitHub

Quality Score: 81/100

Stars 20%
40
Recency 20%
75
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# database-documentation Document a database so completely and accurately that the docs are **provably** the schema, not a plausible guess at it. A half-correct schema doc is worse than none: people trust it and write broken code. ## The one principle: grounded AND verified Every statement in the output must be: - **grounded** — traceable to a concrete source, preferring the **live database** (introspection of the system catalog). ORM models, migrations, generated types, and seeds are *claims about* the database, not the database; the catalog is what actually runs. - **verified** — confirmed by re-introspecting the live database and diffing it against the generated docs until the diff is empty or every remaining difference is explicitly justified. Never write "documentation is complete" — instead make the diff empty and show it. A frontier model left to itself reads the ORM, writes confident prose, and ships an **incomplete and partly hallucinated** schema (missed check-constraint enums, wrong `ON DELETE`, omitted legacy tables, invented columns). This skill exists to defeat exactly that. Two mechanisms do it: (1) the live DB is the oracle, and (2) judgment is never one agent's call — independent adversaries hunt for what one pass misses. ## Scope (v1): relational/SQL only Targets PostgreSQL, MySQL, SQL Server, SQLite. If you detect a document store (MongoDB) or graph database, **say so and stop on that store** — do not emit relational docs for it (silent mis-do...

Details

Author
a-tokyo
Repository
a-tokyo/agent-skills
Created
4 months ago
Last Updated
1 months ago
Language
JavaScript
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category

Data & Documents Listed

doc-this-data-master

Use as an optional Discovery agent that documents the legacy database completely — tables, columns, relationships, constraints, indexes, AND the DB-resident business logic legacy systems hide: views, stored procedures, functions, triggers, rules, computed columns, non-trivial DEFAULTs, DB-side scheduled jobs (pg_cron, SQL Server Agent). Branches on database_ownership: owned → schema + business-logic + migrations-timeline docs; external → external-contract.md treating consumed objects as frozen interfaces, emits kind:database entries with visibility:external_dependency for Architect's external-surface.json; mixed → both with per-object ownership; none → skipped. Profiles actual data (enum values vs code, null rates, orphans, rows-per-state) into data-profile.md when read access exists. Triggers: '/doc-this-data-master', 'analyze database', 'extract DB logic'. NOT a generic SQL formatter.

0 Updated 2 days ago
wagneripjr
Data & Documents Solid

database-design-document

Design a production database schema including ERD, table definitions, data dictionary, indexing strategy, normalization decisions, and migration plan. Use when designing a new database, adding major entities, or documenting an existing schema.

6 Updated 6 days ago
fattain-naime
Code & Development Listed

db-architecture-review

Document a project's PostgreSQL schema and rigorously review its logical and physical design in one pass — wrong cardinality, unenforced natural keys, junction tables that allow duplicates, tenant-isolation gaps, enum-ish columns with no CHECK, soft-delete/UNIQUE collisions, polymorphic references, and the places where the next feature will hurt. Use this whenever the user asks to review, audit, document, or sanity-check a database schema, data model, ERD, migrations, or "our tables"; when they ask whether a data model will scale or what an extension would break; or when a PR touches schema.sql / migrations and they want a design opinion, not just a syntax check. Also use it when asked to generate database documentation — the docs and the review come from the same run.

1 Updated 6 days ago
greenstevester