shadow-db
Skill1 starsChanged yesterdayMITView on GitHub
Live Database Inspection, ERD & Data Warehousing. Use when inspecting live DBs via shadow_db MCP, running read-only SQL diagnostics, generating DBML/Mermaid ERDs, diffing schemas, or building Star Schema DW and Pentaho (.ktr/.kjb) ETL jobs.
- Reads credentials
In this repository51 other files it gives its agents.
- antislop-codeSkill
- antislop-copywritingSkill
- antislop-humanSkill
- antislop-layoutmobileSkill
- antislopSkill
- antislop-uiSkill
- context7Skill
- handoffSkill
- shadow-accessibilitySkill
- shadow-apiSkill
- shadow-architectSkill
- shadow-authSkill
- shadow-bootstrapSkill
- shadow-browserSkill
- shadow-cacheSkill
- shadow-compatSkill
- shadow-concurrencySkill
- shadow-dataSkill
- shadow-debugSkill
- shadow-designSkill
- shadow-discoverySkill
- shadow-docSkill
- shadow-domainSkill
- shadow-eaSkill
- shadow-evalSkill
- shadow-finopsSkill
- shadow-gitSkill
- shadow-grcSkill
- shadow-handoverSkill
- shadow-integrateSkill
- shadow-maintainSkill
- shadow-mobileSkill
- shadow-modernizeSkill
- shadow-monarchSkill
- shadow-observeSkill
- shadow-opsSkill
- shadow-perfSkill
- shadow-planSkill
- shadow-pmoSkill
- shadow-presalesSkill
- shadow-privacySkill
- shadow-qualitySkill
- shadow-realtimeSkill
- shadow-refactorSkill
- shadow-releaseSkill
- shadow-resilienceSkill
- shadow-searchSkill
- shadow-secSkill
- shadow-supplychainSkill
- shadow-testSkill
- shadow-uatSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use this skill whenever the Monarch invokes /shadow-db or works on database inspection, query performance (EXPLAIN ANALYZE), zero-downtime …
- Very specific: line 44
Always inspect estimated vs actual row counts (EXPLAIN (ANALYZE, BUFFERS) on non-mutating SELECT or rolled-back test BEGIN ...
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/shadow-db — Multi-Engine Database Inspector, Schema Diff, Auto-ERD, Migration Safety & Data Warehouse Generator
Use this skill whenever the Monarch invokes /shadow-db or works on database inspection, query performance (EXPLAIN ANALYZE), zero-downtime schema evolution, cross-database migration (e.g. MySQL ↔ PostgreSQL ↔ SQL Server), or ETL / Data Warehouse Star Schema (dim_* / fact_*) + Pentaho PDI (.ktr/.kjb) design.
Connects to the shadow_db MCP server (inspect_database_schema, run_readonly_query, generate_dbml_and_erd, compare_database_schemas, generate_cross_db_etl_and_warehouse) and pairs with /shadow-data (data lifecycle & migrations) and /shadow-resilience (backup restore compatibility).
1. Supported Engines (Auto-Detected from .env or DSN)
- PostgreSQL / Supabase / Neon / TimescaleDB / CockroachDB / Redshift (
postgres://) - MySQL / MariaDB / TiDB / SingleStore (
mysql://,mariadb://) - Microsoft SQL Server / Azure SQL (
mssql://,sqlserver://) - MongoDB (
mongodb://,mongodb+srv://) - SQLite (
sqlite://,.db,.sqlite)
2. Core Capabilities & Workflow
- Read-Only by Default Inspection (
inspect_database_schema,run_readonly_query):- Automatically reads
DATABASE_URLorDB_*from<projectPath>/.env. - Enforces a strict Read-Only SQL Gate (
SELECT,EXPLAIN,SHOW,PRAGMAonly). Any schema mutation or data deletion requires explicit confirmation from the Monarch.
- Automatically reads
- Auto-Generate ERD (
generate_dbml_and_erd):- Generates
docs/db/schema.dbml(dbdiagram.io) anddocs/db/ERD.md(MermaiderDiagram) from the live database.
- Generates
- Cross-Database Schema Drift & Compatibility Check (
compare_database_schemas):- Compares two live databases (e.g. Local vs Staging/Production, or MySQL vs PostgreSQL) and identifies missing tables, missing columns, and type mismatches before deployment.
- Migration Safety & Restore Compatibility (Integrated with
/shadow-data):- Audits pending migrations to prevent table-locking operations (
DROP COLUMN,RENAME COLUMN, or unindexed foreign keys on large tables) and ensures backup restore compatibility with/shadow-resilience.
- Audits pending migrations to prevent table-locking operations (
- Cross-DB Migration, Data Warehouse Star Schema, Pentaho PDI & Cron (
generate_cross_db_etl_and_warehouse):- Generates 6 production-ready artifacts in
docs/db/etl/:01_target_ddl_<engine>.sql(translated DDL forpostgres,mysql,mssql,clickhouse, orbigquery)02_star_schema_warehouse_<engine>.sql(dim_*&fact_*Star Schema with surrogate keys and audit timestamps)03_etl_migration_blueprint.md(batch chunking, watermark strategy, and idempotent upsert patterns)04_pentaho_sync_transformation.ktr(Pentaho Spoon Transformation XML with parameterized connections)05_pentaho_master_job.kjb(Pentaho Master Job XML with DB pre-check and failure alert hops)06_cron_and_airflow_orchestrator.py(Python Cron runner with anti-overlap file lock + Apache Airflow DAG)
- Generates 6 production-ready artifacts in
- Planner Cardinality, MVCC & Lock Wait Diagnostics (Read-Only
EXPLAIN):- Always inspect estimated vs actual row counts (
EXPLAIN (ANALYZE, BUFFERS)on non-mutatingSELECTor rolled-back testBEGIN ... EXPLAIN ANALYZE ... ROLLBACK) before adding indexes; check composite index column selectivity (high-selectivity equality filters before range filters). - Monitor MVCC dead tuples/autovacuum lag and inspect
pg_locks/pg_stat_activitywait chains when diagnosing slow queries or deadlocks (pair with/shadow-debug).
- Always inspect estimated vs actual row counts (
- Execution Approval & Target Environment Boundary (
L0–L4):- Unknown DB hosts/environments fail closed (
BLOCKED_UNKNOWN_ENVIRONMENT). Read-onlySELECT/EXPLAINdiagnostics on verified local/dev DBs areL0/L1; any DDL/data mutation or staging/production access isL4: HIGH_IMPACTrequiring explicit Monarch approval (shadow-monarch/scripts/execution_approval_gate.py).
- Unknown DB hosts/environments fail closed (
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

