Безопасное исследование структуры баз данных

★ 6.6 · data

database-scout is a Claude Code skill that provides safe, read-only exploration of SQLite and PostgreSQL databases — listing tables with row counts, inspecting schemas (column names, types, PK/FK/NOT NULL constraints, indexes, defaults), previewing data, and generating Mermaid ER diagrams. Security is enforced at multiple levels: SQLite opens with the `?mode=ro` URI flag, PostgreSQL sessions run with `SET SESSION READ ONLY`, and a SQL whitelist permits only SELECT, WITH, EXPLAIN, PRAGMA, and SHOW — INSERT, UPDATE, DELETE, DROP, ALTER, CREATE, and 30+ other keywords are blocked, and semicolon-separated multi-statement queries are rejected to prevent injection. The skill runs via `scripts/db_explorer.py` with subcommands `list-tables`, `describe`, `preview`, `er-diagram`, and `query`; PostgreSQL support requires `psycopg2-binary`, while SQLite uses Python's built-in module. It's the right tool for developers and analysts who need to quickly understand an unfamiliar database structure or produce schema documentation without any risk of modifying data.