# Review Database Design Safely

Database changes can create slow queries, data loss, and unsafe migrations. This skill guides Claude, Codex, and Claude Code through schema, query, index, ORM, and migration reviews.

## Install

```bash
npx skillstore add danielpodolsky/database-fundamentals
```

## Metadata

- Status: approved
- Slug: danielpodolsky-database-fundamentals
- Skillstore revision: r1
- Version status: missing
- Tree hash: d49d780a871b65d99237cfd88f97ca7efbe3ea1a7f9bfb74abb39ff6448dd272
- Author: DanielPodolsky
- GitHub username: DanielPodolsky
- License: MIT
- Repository: https://github.com/DanielPodolsky/mentor-spec/tree/main/.claude/skills/fundamentals/database
- Ref: 34f316ba14ef36c7a620fc09f2676d2429997a77
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands
- Quality score: 78
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/danielpodolsky-database-fundamentals
- Manifest: https://skillstore.pages.dev/api/skills/danielpodolsky-database-fundamentals/manifest

## Capabilities

- Reviews schema designs for normalization, keys, data types, and relationship constraints.
- Checks index coverage for filters, joins, sorting, uniqueness, and write cost.
- Flags query issues such as N\+1 access, SELECT \*, missing pagination, and string concatenation.
- Guides migration review for rollback plans, data preservation, testing, and incremental rollout.
- Provides Socratic questions for mentoring junior developers during database reviews.

## Use Cases

- Review a migration plan: Check whether schema changes are reversible, incremental, tested, and safe for existing data.
- Mentor a junior developer: Use focused questions to teach database tradeoffs without simply giving answers.
- Audit ORM query patterns: Find N\+1 access, broad field selection, missing pagination, and unsafe raw query construction.

## Prompt Templates

### Check my schema basics

```
Review this database schema for primary keys, foreign keys, data types, normalization, and obvious missing constraints.
```

### Review this query change

```
Review this query or ORM change for N+1 access, SELECT *, missing pagination, parameterization, and index needs.
```

### Plan a safer migration

```
Evaluate this migration plan for rollback safety, data preservation, incremental rollout, test coverage, and deployment risk.
```

### Evaluate a database-heavy pull request

```
Review this pull request using database fundamentals. Prioritize correctness, performance, migration safety, and questions I should ask the author.
```

## Limitations

- Does not connect to a database or run queries on its own.
- Does not replace load testing, EXPLAIN analysis, or production monitoring.
- Examples are general SQL and ORM patterns, not engine-specific tuning guidance.
- Migration advice must be adapted to the team database, ORM, and deployment process.

## Best Practices

- Provide the schema, query intent, expected data size, and database engine when asking for review.
- Ask for risks and reviewer questions before asking for a final recommendation.
- Pair this skill with real query plans and production metrics for performance decisions.

## Anti Patterns

- Do not ask it to approve destructive migrations without rollback and data verification details.
- Do not treat general index advice as a substitute for measuring real query plans.
- Do not paste secrets, production credentials, or private customer data into review prompts.

## Security Audit

- Audited at: 2026-07-06T10:39:23.89\+00:00
- Summary: I found no executable behavior in the skill. All static command and reconnaissance alerts are false positives caused by Markdown code fences, inline SQL examples, and educational ORM snippets; no prompt injection or data exfiltration intent was found.

## Stats

- Views: 251
- Downloads: 9
- Favorites: 0
- Popularity score: 0
