db-schema-scan
Read-only inspection of database schema via migration files and schema SQL.
Skill by ernesto2108
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/ernesto2108-db-schema-scan
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/db-schema-scan
What's inside
- Skill name
db-schema-scan- Description
- Read-only inspection of database schema via migration files and schema SQL. Use when user says "check the schema", "show tables", "inspect migrations", "what columns does X have", or needs to understand the database structure before writing queries.
- License
- MIT
- Instructions
- 86 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Database Schema Scan
> Read-only inspection of the current database schema. Prerequisite for DBA work and query optimization.
## When to Use
- Before any DBA migration work (understand current state)
- Before developer writes repository queries (verify table/column names)
- When user asks "what columns does X have", "show me the schema", "check the tables"
- As prerequisite for `/db-optimize`
## Workflow
### Step 1 — Find Migration Files
Search for migration files in common locations:
```
migrations/*.sql
db/migrations/*.sql
sql/migrations/*.sql
database/migrations/*.sql
**/migrate/*.sql
```
Also check for schema dumps: `schema.sql`, `init.sql`, `db/schema.sql`
### Step 2 — Parse Schema
Read migration files in order (by number/timestamp) and build a mental model of:
1. **Tables** — name, columns, types, constraints
2. **Relationships** — foreign keys, join tables
3. **Indexes** — name, columns, unique/partial
4. **Enums/Types** — custom types defined
5. **RLS Policies** — if multi-tenant
6. **Triggers** — if any exist
### Step 3 — Produce Schema Summary
Output a structured summary:
```markdown
## Schema Summary — <project>
### Tables (<count>)
#### <table_name>
| Column | Type | Nullable | Default | Constraint |
|--------|------|----------|---------|------------|
| id | UUID | NO | uuid_generate_v7() | PK |
| email | VARCHAR(255) | NO | — | UNIQUE |
| tenant_id | UUID | YES | — | FK → tenants(id) |
| created_at | TIMESTAMP | YES | CURRENT_TIMESTAMP | — |
**Indexes:** idx_users_email, idx_users_tenant_id
**RLS:** tenant_id = current_setting('app.tenant_id')
### Relationships
- users.tenant_id → tenants.id
- user_roles.user_id → users.id
- user_roles.role_id → roles.id
### Migration Count: <N> (latest: <filename>)
### Potential Issues
- [ ] Table X has no tenant_id (multi-tenant gap)
- [ ] Table Y has no index on frequently queried column Z
- [ ] Column A is VARCHAR(255) but only stores short codes
```
### Step 4 — Check for Schema/Code Mismatches (optional)
If the orchestrator asks, compare schema against repository query files:
- Columns referenced in queries that don't exist in schema
- Tables in schema that have no corresponding repository
- Type mismatches (schema says UUID, code scans as string)
## Rules
- **READ-ONLY** — never modify schema or migration files
- **Report, don't fix** — flag issues for the DBA agent to handle
- **Order matters** — read migrations in sequence to understand evolution
- **Check rollbacks** — note migrations that have `.up.sql` but no `.down.sql`From ernesto2108/forge, MIT.
More from ernesto2108/forge
- 0.409score
devops-conventions
ernesto2108
DevOps/Infrastructure conventions and best practices.
SkillDFreshness: DClaude Code +9 - 0.409score
db-optimize
ernesto2108
Identify slow queries and suggest schema, index, or query optimizations.
SkillDFreshness: DClaude Code +9 - 0.409score
design-review
ernesto2108
Review existing designs for quality, visual hierarchy, and anti-AI patterns.
SkillDFreshness: DClaude Code +9 - 0.409score
architecture-boundary-guardrails
ernesto2108
Prevent architectural drift by enforcing bounded contexts and use-case-per-file structure.
SkillDFreshness: DClaude Code +9 - 0.409score
document-architecture
ernesto2108
Document the architecture of a frontend or backend service.
SkillDFreshness: DClaude Code +9 - 0.409score
domain-entity-guardrails
ernesto2108
Enforce strict typing and explicit optionality in domain entities and value objects.
SkillDFreshness: DClaude Code +9 - 0.409score
cross-service-dev
ernesto2108
Orchestrate agents across multiple microservice repos in a single session.
SkillDFreshness: DClaude Code +9 - 0.409score
astro-conventions
ernesto2108
Astro framework conventions and coding standards for static and content-driven sites.
SkillDFreshness: DClaude Code +9 - 0.409score
design-project
ernesto2108
Quick entry point for resuming or starting design projects.
SkillDFreshness: DClaude Code +9 - 0.409score
design-recipes
ernesto2108
Reusable design patterns for efficient screen building in Pencil or Figma.
SkillDFreshness: DClaude Code +9 - 0.409score
design-system
ernesto2108
Create and maintain design system foundations — variables, collections, modes, color palettes, typography, spacing, reusable components with variants, and…
SkillDFreshness: DClaude Code +9 - 0.409score
design-to-code
ernesto2108
Translate approved designs to production code.
SkillDFreshness: DClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Apr 3, 2026 (6 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/ernesto2108/forge
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from ernesto2108
- 0.409score
design-recipes
ernesto2108
Reusable design patterns for efficient screen building in Pencil or Figma.
SkillDFreshness: DClaude Code +9 - 0.409score
astro-conventions
ernesto2108
Astro framework conventions and coding standards for static and content-driven sites.
SkillDFreshness: DClaude Code +9 - 0.409score
architecture-boundary-guardrails
ernesto2108
Prevent architectural drift by enforcing bounded contexts and use-case-per-file structure.
SkillDFreshness: DClaude Code +9 - 0.409score
design-project
ernesto2108
Quick entry point for resuming or starting design projects.
SkillDFreshness: DClaude Code +9 - 0.409score
cross-service-dev
ernesto2108
Orchestrate agents across multiple microservice repos in a single session.
SkillDFreshness: DClaude Code +9 - 0.409score
design-system
ernesto2108
Create and maintain design system foundations — variables, collections, modes, color palettes, typography, spacing, reusable components with variants, and…
SkillDFreshness: DClaude Code +9
Cite this page
db-schema-scan skill. Agent Mart. https://agentmart.dev/skills/ernesto2108-db-schema-scan (last updated 2026-10-24)