schema-exploration

A guide for examining a database's tables, columns, relationships, and business meaning.

In plain words
What is it for?
It helps answer questions about what a database tracks, how tables connect, and what rules or common mistakes apply to its data.
Why use it?
It turns a technical database structure into an explanation of what the stored information represents, including relationships that may not be explicitly declared.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/deepsqlai/deepsql/schema-exploration
Any agent
npx skills add DeepSQLAI/deepsql --skill schema-exploration
Clone the repo
git clone --depth 1 https://github.com/DeepSQLAI/deepsql

Made for: Claude Code, Codex.

Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 470 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00033 $0.00470
Opus 5 $0.00016 $0.00235
Sonnet 5 $0.00007 $0.00094
Haiku 4.5 $0.00003 $0.00047

Measured yesterday against content hash ff3b62a5f073, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

schema-exploration scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agent/skills/schema-exploration/SKILL.md · 33 lines

What it actually says

Schema Exploration

Use when the user wants to understand the database itself ("what does this DB track?", "what tables exist?", "how are orders and customers related?", "describe the bookings table").

Procedure

  1. Resolve the connection (list_connections → UUID) if you don't have it.

  2. Get the shape. get_schema(connectionId) for tables, columns, types, declared FKs. get_database_objects(connectionId) when you also need views/functions/procedures, not just columns. The schema is cached and authoritative — trust it over the codebase.

  3. Get the meaning. get_brain_context(connectionId, "<what the user is asking about>") for the domain layer: what the tables mean, business terms, documentation. This is what turns "a list of tables" into "what the database tracks."

  4. Fill relationship gaps. Many real databases lack declared foreign keys. get_relationships(connectionId) returns inferred + validated FKs with a confidence score and validationStatus. Report the confidence — a 0.95 inferred FK is reliable; a 0.4 one is a guess.

  5. Surface the rules and traps. list_business_rules(connectionId) and get_anti_patterns(connectionId, kind="table") so the user learns the conventions and known schema smells, not just the structure.

Reporting

  • Lead with what the database is for, then the largest/most central tables, then notable relationships.
  • For "largest tables," use the row counts from get_schema (don't run COUNT(*) across every table).
  • Flag anti-patterns and low-confidence inferred FKs explicitly — they're the things a user most needs to know and least expects.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 33 lines · 33 tokens per session scan A ff3b62a5f073

Subscribe to this mod's changes

schema-exploration is a skill published in the GitHub repository DeepSQLAI/deepsql (23 stars, last pushed 2d ago), licensed Apache-2.0. It adds 33 tokens to every session and 470 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

configure-nightwatch

Configures Laravel Nightwatch data collection, sampling rates, filtering rules, and redaction policies. Use when setting up Nightwatch, managing data volume, protecting sensitive data (PII), or optimizing event collection for production workloads.

coollabsio/coolify · 49 tokens

laravel-actions

Build, refactor, and troubleshoot Laravel Actions using lorisleiva/laravel-actions. Use when implementing reusable action classes (object/controller/job/listener/command), converting service classes/controllers/jobs into actions, orchestrating workflows via faked actions, or debugging action entrypoints and wiring.

coollabsio/coolify · 62 tokens

debugging-output-and-previewing-html-using-ray

Use when user says "send to Ray," "show in Ray," "debug in Ray," "log to Ray," "display in Ray," or wants to visualize data, debug output, or show diagrams in the Ray desktop application.

coollabsio/coolify · 58 tokens

fortify-development

ACTIVATE when the user works on authentication in Laravel. This includes login, registration, password reset, email verification, two-factor authentication (2FA/TOTP/QR codes/recovery codes), passkeys, profile updates, password confirmation, or any auth-related routes and controllers. Activate when the user mentions…

coollabsio/coolify · 199 tokens

pest-testing

Use this skill for Pest PHP testing in Laravel projects only. Trigger whenever any test is being written, edited, fixed, or refactored — including fixing tests that broke after a code change, adding assertions, converting PHPUnit to Pest, adding datasets, and TDD workflows. Always activate when the user asks how to…

coollabsio/coolify · 171 tokens

configuring-horizon

Use this skill whenever the user mentions Horizon by name in a Laravel context. Covers the full Horizon lifecycle: installing Horizon (horizon:install, Sail setup), configuring config/horizon.php (supervisor blocks, queue assignments, balancing strategies, minProcesses/maxProcesses), fixing the dashboard…

coollabsio/coolify · 137 tokens