schema-evolution

schema-evolution is a skill for Claude Code from sethdford/claude-skills. It costs 35 tokens per session (613 once invoked), scanned A, original, MIT.

A guide for changing database tables and fields while keeping older application code working. It covers migration steps, compatibility between old and new data shapes, and deployments without planned downtime.

In plain words
What is it for?
Use it to plan production schema changes, add or rename fields safely, run staged migrations, temporarily write to old and new fields, and move reads to the new structure.
Why use it?
It reduces the risk that a database change will break deployed services, clients, or rollback procedures.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the data-architecture plugin — 8 skills shipped together

Good fit Use it to plan production schema changes, add or rename fields safely…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sethdford/claude-skills/schema-evolution
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.

Any agent
npx skills add sethdford/claude-skills --skill schema-evolution
Clone the repo
git clone --depth 1 https://github.com/sethdford/claude-skills

Made for: Claude Code.

Or install data-architecture, the plugin that ships this one along with the rest of its 8 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for schema-evolution

README.md
[![agentmods](https://agentmods.dev/badge/skills/sethdford/claude-skills/schema-evolution.svg)](https://agentmods.dev/skills/sethdford/claude-skills/schema-evolution)
Your own site
<a href="https://agentmods.dev/skills/sethdford/claude-skills/schema-evolution"><img src="https://agentmods.dev/badge/skills/sethdford/claude-skills/schema-evolution.svg" alt="Measured on agentmods" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 613 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00035 $0.00613
Opus 5 $0.00017 $0.00307
Sonnet 5 $0.00007 $0.00123
Haiku 4.5 $0.00003 $0.00061

Measured 7d ago against content hash 6b4351ff2243, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

schema-evolution 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 7d ago.

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.

architect/data-architecture/skills/schema-evolution/SKILL.md · 48 lines

How it starts

The opening of the file, as written. The whole thing — 48 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Schema Evolution

Evolve database schemas safely while maintaining backwards compatibility and minimizing downtime.

Context

You are planning schema changes in production systems. Design migrations that don't break deployed clients or services. Read current schemas, deployment frequency, and rollback requirements.

Domain Context

Based on production database migration best practices:

  • Backwards Compatibility: Old code continues working with new schema; new code works with both
  • Forwards Compatibility: New code can read old data; gracefully handles missing fields
  • Zero-Downtime Deployment: Database changes don't require application downtime
  • Additive Changes: Adding columns/tables is safe; dropping/renaming requires care
  • Dual-Write Pattern: Write to both old and new schema during migration; switch reads

Instructions

  1. Plan Phase 1 (Additive): Add new columns/tables. Code ignores new columns for now. Deploy database changes. All existing code still works.

  2. Plan Phase 2 (Dual Write): Update application code to write to both old and new schema. Reads can use either. Let data double-write for period (hours to days).

  3. Plan Phase 3 (Migrate Data): Background job migrates existing data to new schema. Backfill new fields from old data via transformation.

  4. Plan Phase 4 (Code Switch): Update code to read from new schema, write to both. Gradually shift reads: 10% new, 90% old → 50/50 → 100% new.

  5. Plan Phase 5 (Cleanup): Once all code reads new schema, remove old schema if safe. Keep removal as separate deployment after week of monitoring.

Anti-Patterns

  • Big-Bang Migration: Deploy schema and code changes simultaneously. Result: downtime, hard rollback. Guard: Separate database and application deployments; deploy database first.
  • Dropping Columns Without Wrapping Code: Assume all code updated. Result: errors in production. Guard: Wait 1+ releases before drop; deploy code removal first, schema cleanup second.
  • No Rollback Plan: Assume migrations succeed. Result: stuck in bad state. Guard: Practice rollbacks; keep old schema for period; verify data integrity.
  • Ignoring Hot Data: Migrate huge table in single pass. Result: locks, downtime. Guard: Use online migration tools (pt-online-schema-change, pg-repack); batch smaller tables.

Read the full file on GitHub · 48 lines

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. 7d ago First seen · 48 lines · 35 tokens per session scan A 6b4351ff2243

Subscribe to this mod's changes

schema-evolution is a skill published in the GitHub repository sethdford/claude-skills (38 stars, last pushed 5mo ago), licensed MIT. It adds 35 tokens to every session and 613 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.