Agent skill

Database Scout

by zebbern in zebbern/claude-code-guide

Explore SQLite and PostgreSQL databases: list tables, inspect schemas (columns/types/constraints), preview data, generate Mermaid ER diagrams, and run safe read-only queries.

MITAuto-check passedDatabases

Install Database Scout

skills CLI
$ npx skills add zebbern/claude-code-guide --skill database-scout -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install zebbern/claude-code-guide database-scout --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/zebbern/claude-code-guide.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/database-scout .claude/skills/database-scout && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
database-scout
GitHub stars
4.7k
Token cost
~1.1k tokens
SKILL.md length
247 words
Files
3 (incl. scripts)
Skills in repo
46
Repo updated
First seen
Licence
MIT

At a glance

Explore SQLite and PostgreSQL databases: list tables, inspect schemas (columns/types/constraints), preview data, generate Mermaid ER diagrams, and run safe read-only queries.

  • Tasks that involve Diagrams
  • SKILL.md covers Feature Overview, Security Mechanisms, Quick Start and Detailed Usage, plus 2 more sections
  • Runs Python scripts from its folder; calls python3 and pip
  • Tasks that involve SQL

What it does

Database Scout is an agent skill from zebbern/claude-code-guide. Explore SQLite and PostgreSQL databases: list tables, inspect schemas (columns/types/constraints), preview data, generate Mermaid ER diagrams, and run safe read-only queries. Triggered by requests to explore a database, view table structures, describe tables, generate diagrams, or query data, and by keywords like database exploration, schema, ER diagram, or SQL query.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including scripts (for example `scripts/db_explorer.py`).

It sits in Databases, covering Diagrams and SQL. It works with PostgreSQL, Mermaid, SQLite and SQL. The repository describes itself as: Claude Code Guide - Setup, Commands, workflows, agents, skills & tips-n-tricks from beginner to power user! The licence is MIT.

When your agent uses it

  • Tasks that involve Diagrams
  • Tasks that involve SQL

Example prompts

  • “/database-scout”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit e62775c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3
    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Database Scout loads about 1.1k tokens when it runs. Until then it costs about 96 tokens; SKILL.md has 247 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~96
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from zebbern/claude-code-guide at commit e62775c, republished under its MIT licence (© zebbern). 247 words, ~1,130 tokens.

Download SKILL.mdSave it as .claude/skills/database-scout/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
database-scout
description
Explore SQLite and PostgreSQL databases: list tables, inspect schemas (columns/types/constraints), preview data, generate Mermaid ER diagrams, and run safe read-only queries. Triggered by requests to explore a database, view table structures, describe tables, generate diagrams, or query data, and by keywords like database exploration, schema, ER diagram, or SQL query.
license
MIT

database-scout

Read-only exploration tool for SQLite / PostgreSQL databases — inspect table schemas, preview data, generate ER diagrams, and run safe queries.

Feature Overview

FeatureDescription
List all tablesShow tables and views in the database, with row counts
Inspect table schemaColumn names, types, constraints (PK/FK/NOT NULL), indexes, defaults
Data previewView the first N rows of a table
ER diagram generationOutput Mermaid erDiagram syntax, ready to render
Safe read-only queriesOnly SELECT/WITH/EXPLAIN allowed; write operations are blocked

Security Mechanisms

  • Connection-level read-only: SQLite opens with ?mode=ro URI; PostgreSQL uses SET SESSION READ ONLY
  • SQL whitelist: Only statements starting with SELECT / WITH / EXPLAIN / PRAGMA / SHOW are allowed
  • Dangerous keyword blocking: INSERT, UPDATE, DELETE, DROP, ALTER, CREATE, and 30+ other keywords are blocked
  • Multi-statement blocking: Semicolon-separated multiple SQL statements are rejected (prevents injection)
  • Identifier escaping: Table names are double-quote escaped to prevent SQL injection

Quick Start

bash
# List all tables in a SQLite database
python3 scripts/db_explorer.py --db-path data.db list-tables

# Inspect table schema
python3 scripts/db_explorer.py --db-path data.db describe users

# Preview data (default 20 rows)
python3 scripts/db_explorer.py --db-path data.db preview orders --limit 10

# Generate Mermaid ER diagram
python3 scripts/db_explorer.py --db-path data.db er-diagram

# Run a read-only query
python3 scripts/db_explorer.py --db-path data.db query "SELECT name, age FROM users WHERE age > 18 LIMIT 10"
PostgreSQL
bash
# Connect to PostgreSQL
python3 scripts/db_explorer.py --db-type postgres --dsn "host=localhost dbname=mydb user=reader" list-tables

# Inspect table schema
python3 scripts/db_explorer.py --db-type postgres --dsn "host=localhost dbname=mydb user=reader" describe orders

Detailed Usage

Parameters
ParameterRequiredDefaultDescription
--db-typeNosqliteDatabase type: sqlite or postgres
--db-pathYes (for SQLite)—Path to the SQLite database file
--dsnYes (for PostgreSQL)—PostgreSQL connection string
Subcommands
CommandDescriptionExample
list-tablesList all tables/viewslist-tables
describe <table>Show detailed table schemadescribe users
preview <table> [--limit N / -n N]Preview the first N rowspreview orders --limit 5
er-diagramGenerate Mermaid ER diagramer-diagram
query "<sql>"Run a read-only SQL queryquery "SELECT count(*) FROM users"

Output Examples

list-tables
json
[
  {"name": "users", "type": "table", "row_count": 1500},
  {"name": "orders", "type": "table", "row_count": 8200},
  {"name": "user_stats", "type": "view", "row_count": 1500}
]
describe
json
{
  "table": "orders",
  "row_count": 8200,
  "columns": [
    {"cid": 0, "name": "id", "type": "INTEGER", "notnull": true, "default": null, "primary_key": true},
    {"cid": 1, "name": "user_id", "type": "INTEGER", "notnull": true, "default": null, "primary_key": false},
    {"cid": 2, "name": "amount", "type": "REAL", "notnull": false, "default": "0.0", "primary_key": false}
  ],
  "foreign_keys": [
    {"from": "user_id", "to_table": "users", "to_column": "id"}
  ],
  "indexes": [
    {"name": "idx_orders_user_id", "unique": false, "columns": ["user_id"]}
  ]
}
er-diagram (Mermaid)
mermaid
erDiagram
    users {
        INTEGER id PK
        TEXT name
        TEXT email
        INTEGER age
    }
    orders {
        INTEGER id PK
        INTEGER user_id FK
        REAL amount
        TEXT created_at
    }
    users ||--o{ orders : "user_id"

Dependencies

  • Python 3.8+ (sqlite3 is a built-in module)
  • PostgreSQL support requires: pip install psycopg2-binary

© zebbern, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (scripts) in skills/database-scout of zebbern/claude-code-guide.

  • SKILL.md
  • LICENSE
  • scripts/db_explorer.py

Open the folder on GitHubat commit e62775c

Compare with similar skills

Database Scout next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Database Scout compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Database Scout this skillzebbern/claude-code-guide4.7k—~1.1kAutomated safety check: PassMIT
Database Inspectorrongxinzy/RongxinAI154—~835Automated safety check: PassMIT
Import ExportAHS12/thoth-blueprint626—~499Automated safety check: PassGPL-3.0
Sql2erystemsrx/sql_to_ER1881 repos~1.1kAutomated safety check: PassAGPL-3.0
SQL Database Support for pRESTprest/prest4.6k—~1.6kAutomated safety check: PassMIT
Squixeduardofuncao/squix273—~784Automated safety check: PassMIT

Similar skills

  • Database Inspector

    rongxinzy/RongxinAI

    探索 SQLite 或 PostgreSQL 数据库,执行安全只读查询,提供表列表、详细表结构(列/类型/约束/索引)、数据预览,并生成 Mermaid ER 图。当用户需要查看数据库架构、探索表关系、预览数据、执行只读查询,或提及 schema、ER 图、SQL 查询、数据预览、describe table、数据库探索等关键词时触发。

    154 GitHub stars~835 tokensUpdated today
    DatabasesAuto-check passed
  • Import Export

    AHS12/thoth-blueprint

    Change SQL, SQLite worker, DBML, JSON, Mermaid, SVG, or database export/import flows while preserving diagram semantics and round trips.

    626 GitHub stars~499 tokensUpdated 1 mo ago
    DatabasesAuto-check passed
  • Sql2er

    ystemsrx/sql_to_ER

    A skill your agent uses when the user wants a Chen-model ER diagram from SQL CREATE TABLE statements or DBML, wants to rearrange or clean up an existing sql2er state, wants a skeleton-only overview…

    188 GitHub starsUsed in 1 repo~1.1k tokens
    DatabasesAuto-check passed
  • Guides classifying, gap-analyzing and scaffolding support for a new SQL database in pREST, from Postgres-compatible variants to entirely new dialects.

    4.6k GitHub stars~1.6k tokensUpdated today
    DatabasesAuto-check passed
  • Squix

    eduardofuncao/squix

    Run SQL queries across databases (Postgres, MySQL, SQLite, etc.) via the squix CLI.

    273 GitHub stars~784 tokensUpdated 16 days ago
    DatabasesAuto-check passed
  • Comprehensive guide for Go database access — parameterized queries, struct scanning, NULLable columns, transactions, isolation levels, SELECT FOR UPDATE, connection pool, batch processing, context…

    241 GitHub starsUsed in 2 repos~2.9k tokens
    DatabasesAuto-check passed

More from zebbern/claude-code-guide

All 46 skills in this repo
  • Code To Diagram

    zebbern/claude-code-guide

    Analyze codebases and automatically generate architecture diagrams, flowcharts, and org charts.

    4.7k GitHub starsUsed in 1 repo~972 tokens
    Auto-check passed
  • Localization Toolkit

    zebbern/claude-code-guide

    This skill should be used when setting up, auditing, or enforcing internationalization/localization in UI codebases (React/TS, i18next or similar, JSON locales), including installing/configuring the…

    4.7k GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed
  • Audit Flow

    zebbern/claude-code-guide

    Interactive system flow tracing across CODE, API, AUTH, DATA, NETWORK layers with SQLite persistence and Mermaid export.

    4.7k GitHub stars~4.2k tokensUpdated today
    Auto-check passed
  • Chart Image

    zebbern/claude-code-guide

    Generate publication-quality PNG chart images from data, supporting line, bar, area, candlestick, pie, and heatmap charts.

    4.7k GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Code Vuln Audit

    zebbern/claude-code-guide

    Scan code for security issues: dependency vulnerabilities (npm/pip audit), secret leaks (regex and entropy analysis), and OWASP anti-patterns like SQL injection, XSS, or command injection.

    4.7k GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Linux Shell Scripting

    zebbern/claude-code-guide

    This skill should be used when the user asks to "create bash scripts", "automate Linux tasks", "monitor system resources", "backup files", "manage users", or "write production shell scripts".

    4.7k GitHub starsUsed in 9 repos~3.1k tokens
    Auto-check: notes

Questions about Database Scout

What does Database Scout do?

Explore SQLite and PostgreSQL databases: list tables, inspect schemas (columns/types/constraints), preview data, generate Mermaid ER diagrams, and run safe read-only queries. Database Scout is an agent skill from zebbern/claude-code-guide. Explore SQLite and PostgreSQL databases: list tables, inspect schemas (columns/types/constraints), preview data, generate Mermaid ER diagrams, and run safe read-only queries.

When should I use Database Scout?

Database Scout fits situations like: tasks that involve Diagrams; tasks that involve SQL.

How do I install Database Scout in Claude Code?

Run `npx skills add zebbern/claude-code-guide --skill database-scout -a claude-code`. Or copy the skill folder (skills/database-scout in zebbern/claude-code-guide) into .claude/skills/database-scout in your project. Claude Code loads it when a task matches its description.

How do I install Database Scout in Codex?

Run `npx skills add zebbern/claude-code-guide --skill database-scout -a codex`. Or copy the skill folder (skills/database-scout in zebbern/claude-code-guide) into .agents/skills/database-scout in your project. Codex loads it when a task matches its description.

Can I use Database Scout in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add zebbern/claude-code-guide --skill database-scout -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/database-scout, .gemini/skills/database-scout, .github/skills/database-scout and .opencode/skills/database-scout in your project.

What does Database Scout need to run?

Going by SKILL.md and its folder, Database Scout needs Python for the scripts in its folder and the command-line tools its instructions call (python3 and pip). Our summary lists: Python 3.

Does Database Scout access the network?

SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Database Scout safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Database Scout use?

Database Scout is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Database Scout use?

About 1.1k tokens (SKILL.md is roughly 4.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Database Scout?

Skills that share tags, products or a category with Database Scout: Database Inspector (rongxinzy/RongxinAI, 154 stars), Import Export (AHS12/thoth-blueprint, 626 stars), Sql2er (ystemsrx/sql_to_ER, 188 stars) and SQL Database Support for pREST (prest/prest, 4.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Database Scout?

zebbern (a GitHub user) maintains it in zebbern/claude-code-guide, which has 4,650 GitHub stars. The repository holds 46 skills in this directory. The repository was last updated on October 8, 2026.

Source: zebbern/claude-code-guide on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.