tosi-n/deepdive
Overview
This skill, deepdive, turns natural language into database queries, visualizations, and schema diagrams across popular databases. It helps you explore data, inspect table structures, and generate charts and lineage diagrams with safe defaults and learnable corrections. Use it to quickly get insights from PostgreSQL, MySQL, SQLite, BigQuery, Snowflake, or Redshift.
How this skill works
deepdive converts plain-language prompts into validated SQL, executes read queries against your configured database, and returns results as tables or chart-ready data. It can introspect schemas to produce ERD and lineage diagrams, then render Vega-Lite charts or Mermaid diagrams as files for review. The agent stores local corrections to improve future query translations and enforces write protections unless you explicitly allow changes.
When to use it
- You need to answer business questions from a database using natural language.
- You want a quick visualization (line, bar, funnel) from query results without manual charting.
- You need to inspect table columns, foreign keys, or overall schema structure.
- You want safe exploratory analysis with write operations blocked by default.
- You are designing or documenting a data model and need ERD or lineage diagrams.
Best practices
- Store credentials in the local .deepdive/.env file and never hardcode them in scripts.
- Start with read-only prompts; enable safe-mode off only when you understand the write impact.
- Provide concise domain context when asking complex metric or scope-design questions.
- Review generated SQL before executing writes and keep query history for auditing.
- Save and version the generated diagrams and charts files for reproducibility.
Example use cases
- Ask for top customers by revenue and get a SQL query plus a downloadable chart image.
- Visualize the entire database schema as a Mermaid ERD for architecture reviews.
- Explore a single table’s columns and sample rows to plan an analytics workflow.
- Generate a monthly revenue Vega-Lite chart for reporting without writing chart code.
- Design a scope for transactional or subscription business models and export a schema draft.
FAQ
PostgreSQL, MySQL, SQLite, BigQuery, Snowflake, and Redshift are supported with tailored connectors.
How does write protection work?
Writes (INSERT/UPDATE/DELETE) require explicit confirmation by default; safe-mode can be toggled per project.