Install any skill in seconds. Free to start, no credit card required.
Get Started Free →OverKill Hill P³ database cartographer. Reverse-engineers and documents the live structure of Postgres, MySQL/MariaDB, MS SQL Server, SQLite, Oracle, and Microsoft Access databases via SQLAlchemy reflection or the right engine driver, producing a normalized schema inventory, a severity-classified (P1/P2/P3) diff against a locked design spec, and a Mermaid ER diagram handed to okhp3-mermaid-*/mermaid-diagrams for rendering. Use when asked to reverse-engineer, interrogate, document, or audit an ex
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 23% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 268% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 15% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 46% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 85% | 0% |
OverKill Hill P³ · overkillhill.com · github.com/OKHP3
Interrogates a live database of largely unknown or partially-documented structure and turns it into two things: a schema inventory with severity-classified findings against whatever spec you point it at, and a Mermaid ER diagram. It does the surveying and the cartography does not happen in the same tool -- interrogation and diagramming are deliberately decoupled (see "Architecture" below), because the best tool for connecting to a database and the best tool for drawing a diagram are never the same tool.
| In scope | Out of scope | |---|---| | Reflecting live structure from Postgres, MySQL/MariaDB, MSSQL, SQLite, Oracle | Data quality / row-level profiling | | Reflecting MS Access (.accdb/.mdb), flagged as the fragile path | Migration script generation | | Diffing live structure against a locked spec, P1/P2/P3 findings | Firestore/NoSQL (deferred to a future version) | | Generating a Mermaid ER diagram from the reflected schema | Writing to or modifying the target database |
If the task is "does this database's structure match what we documented" or "what does this database actually look like," this is the right skill. If the task is "is the data in this table clean" or "write me a migration," it is not.
Interrogation (engine-specific, produces a normalized schema-inventory) → diagramming (engine-agnostic, produces Mermaid text). Nothing about the diagram-generation step knows or cares which database engine the data came from. This split is why the skill doesn't depend on any single-purpose "database-to-ER-diagram" library -- those libraries (eralchemy2 and similar) couple the two jobs together and inherit the weaker of the two tools' maintenance status. Reflection tooling (SQLAlchemy) is rock solid; diagram-generation tooling that also does DB connections is not. Decoupling means each half can be swapped independently.
Pick the adapter for the target engine. Full driver table, INFORMATION_SCHEMA/sys. fallback queries, and per-engine gotchas: references/engine-adapters.md.
sqlalchemy.inspect(engine) returns tables, columns, types, PK/FK, indexes in one consistent shape regardless of engine. Use sqlacodegen if the deliverable should include generated ORM model code, not just an inventory.pyodbc + the Access ODBC driver on Windows, or COM/DAO automation. Treat this path as fragile -- say so in the output, don't present it with the same confidence as the SQLAlchemy path.Normalize whatever comes back into one shape:
json{ "entities": [ {"name": "TABLE_NAME", "columns": [ {"name": "col", "type": "int", "constraints": ["PK"], "note": "optional annotation"} ]} ], "relationships": [ {"from": "A", "to": "B", "cardinality": "||--o{", "label": "relationship verb"} ] }
This shape is what scripts/schema_to_mermaid.py expects as input. It is also close to what sqlalchemy.inspect() already returns -- the normalization step is thin. Relationships can skip cardinality and supply fk_nullable/fk_unique instead -- the diagram step infers the operator automatically (v1.1.0, see Step 3).
If the user points to a design spec (an ADR, a data dictionary, a migration file, a prior schema-inventory run), compare the live structure against it column by column. Classify every deviation:
Full discipline and worked examples: references/severity-classification.md. This is inherited directly from a proven prior-art audit method -- don't loosen it.
Run the schema-inventory JSON through scripts/schema_to_mermaid.py. It emits Mermaid erDiagram text with no external dependency -- no Graphviz, no ER-diagram-specific library. If a relationship's cardinality wasn't hand-specified, infer_cardinality() derives it from the FK's nullability and uniqueness -- no extra query needed, since that metadata already comes back from inspector.get_columns()/get_unique_constraints() in Step 1. Validate the output (Mermaid Chart tooling, or hand it to okhp3-mermaid-*/mermaid-diagrams for polish and rendering). Full syntax-mapping notes: references/mermaid-handoff.md; how this compares to the wider marketplace (mermerd, SchemaCrawler, and others) and what was learned from it: references/competitive-landscape.md.
This skill connects to live databases, sometimes with real credentials, sometimes against production systems. Before running it:
SELECT-only metadata queries are the entire footprint.pyodbc/COM requires an installed driver and, for COM, an installed Access client -- both carry their own local-machine trust implications. Flag this rather than assuming it's fine.A finished run produces three artifacts: the schema-inventory (JSON, and/or a Markdown table per entity), a findings list (severity-tagged, spec-referenced) if a spec was supplied, and a Mermaid ER diagram. Don't skip the findings list just because nothing was flagged -- "0 deviations found" is itself a useful, citable result, exactly like a clean audit pass.
Built by Jamie Hill · OverKill Hill P³ Published at github.com/OKHP3 Part of the OKHP3/skillz Agent Skill library. MIT License -- free to use, fork, and adapt. A nod to the source is appreciated.
Other measured skills in the registry, with their headline benchmark lift.