Agent skill

Data Contract Migrations

by majiayu000 in majiayu000/spellbook

Design and verify data contracts, schema changes, migrations, rollbacks, backfills, compatibility windows, tenant isolation, and API-to-database field mapping.

MITAuto-check passedData & Analytics

Install Data Contract Migrations

skills CLI
$ npx skills add majiayu000/spellbook --skill data-contract-migrations -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install majiayu000/spellbook data-contract-migrations --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/majiayu000/spellbook.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/data-contract-migrations .claude/skills/data-contract-migrations && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
data-contract-migrations
GitHub stars
287
Token cost
~602 tokens
SKILL.md length
251 words
Files
2
Skills in repo
97
Repo updated
First seen
Licence
MIT

At a glance

Design and verify data contracts, schema changes, migrations, rollbacks, backfills, compatibility windows, tenant isolation, and API-to-database field mapping.

  • Works in 6 steps: Current schema, models, serializers, API… → Writers and readers of each field. → Migration tool and rollback support. → …
  • Changing database schema
  • SKILL.md covers Purpose, Preflight, Migration Design and Required Checks, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Data Contract Migrations is an agent skill from majiayu000/spellbook. Design and verify data contracts, schema changes, migrations, rollbacks, backfills, compatibility windows, tenant isolation, and API-to-database field mapping. Use when changing database schema, event payloads, persisted documents, analytics tables, multi-tenant data boundaries, or any user-visible data contract where silent fallback or undeclared fields would be dangerous.

Its SKILL.md is about 600 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in Data & Analytics, covering Data governance and Multi-tenancy. The repository describes itself as: Cross-runtime skills for Claude Code, Codex, and multi-agent workflows. The licence is MIT.

When your agent uses it

  • Changing database schema
  • Persisted documents
  • Analytics tables
  • Multi-tenant data boundaries

Example prompts

  • “/data-contract-migrations”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Current schema, models, serializers, API contracts, and persisted samples.
  2. Writers and readers of each field.
  3. Migration tool and rollback support.
  4. Data volume, tenant boundaries, and backfill cost.
  5. Required zero-downtime or maintenance-window constraints.
  6. Existing tests or fixtures that prove compatibility.

What it can do on your machine

Read from SKILL.md and the folder at commit ed52af7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Data Contract Migrations loads about 602 tokens when it runs. Until then it costs about 100 tokens; SKILL.md has 251 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~100
When it runs · the whole SKILL.md, loaded when a task matches
~602

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from majiayu000/spellbook at commit ed52af7, republished under its MIT licence (© majiayu000). 251 words, ~602 tokens.

Download SKILL.mdSave it as .claude/skills/data-contract-migrations/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
data-contract-migrations
description
Design and verify data contracts, schema changes, migrations, rollbacks, backfills, compatibility windows, tenant isolation, and API-to-database field mapping. Use when changing database schema, event payloads, persisted documents, analytics tables, multi-tenant data boundaries, or any user-visible data contract where silent fallback or undeclared fields would be dangerous.

Data Contract Migrations

Purpose

Use this skill when data shape changes can break reads, writes, reports, tenants, or integrations. The goal is an explicit compatibility and migration plan, not just a SQL diff.

Preflight

Gather these facts before proposing changes:

  1. Current schema, models, serializers, API contracts, and persisted samples.
  2. Writers and readers of each field.
  3. Migration tool and rollback support.
  4. Data volume, tenant boundaries, and backfill cost.
  5. Required zero-downtime or maintenance-window constraints.
  6. Existing tests or fixtures that prove compatibility.

If the current data does not contain a field, treat it as absent. Do not invent fallback fields.

Migration Design

Use expand-migrate-contract for production systems:

  1. Expand: add nullable columns, new tables, new enum values, or versioned payloads without breaking old readers.
  2. Dual-write or adapter: write both old and new forms when needed.
  3. Backfill: migrate historical data with batching, checkpoints, and retry behavior.
  4. Read switch: move readers to the new contract after verification.
  5. Contract: remove old fields only after the compatibility window and rollback risk pass.

For small systems, a direct migration is acceptable only when downtime, rollback, and data loss risks are explicitly low.

Required Checks

Every plan must include:

  • Forward migration command.
  • Rollback or roll-forward recovery command.
  • Backfill idempotency and resume behavior.
  • Data validation query before and after.
  • Tenant isolation check when tenants exist.
  • API/serializer compatibility test.
  • Observability for migration progress and failure.

Output Shape

text
contract_change:
affected_readers_writers:
migration_strategy:
backfill_plan:
rollback_or_recovery:
tenant_and_security_checks:
verification_queries:
test_commands:
release_gate:

Raise errors for missing critical data rather than warning and falling back to incomplete output.

© majiayu000, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/data-contract-migrations of majiayu000/spellbook.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit ed52af7

Compare with similar skills

Data Contract Migrations next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Data Contract Migrations compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Data Contract Migrations this skillmajiayu000/spellbook287—~602Automated safety check: PassMIT
Datalineage Summarygoogle/skills21k—~1.7kAutomated safety check: PassApache-2.0
Sap Btp Master Data Integrationsecondsky/sap-skills462—~2.7kAutomated safety check: PassGPL-3.0
Modeling Warehouse FoundationsPostHog/posthog40k—~2.1kAutomated safety check: PassCustom licence
Quicknode Core Workflow Bjeremylongshore/tons-of-skills-marketplace2.8k—~1.1kAutomated safety check: PassMIT
Segment CdpbenjaminasterA/antigravity-awesome-skills3751 repos~361Automated safety check: PassMIT

Similar skills

  • Datalineage Summary

    google/skills

    Official

    Summarizes data lineage graphs on Google Cloud to help users debug data quality issues and understand data provenance for BigQuery and Cloud Storage.

    21k GitHub stars~1.7k tokensUpdated today
    Data & AnalyticsAuto-check passed
  • Configures and integrates SAP Master Data Integration (MDI) service on SAP Business Technology Platform.

    462 GitHub stars~2.7k tokensUpdated 4 days ago
    Data & AnalyticsAuto-check passed
  • Official

    Shared foundations for building reusable data models in PostHog, on either of two stacks: PostHog-native data-warehouse views / materialized views (HogQL, via the view- MCP tools), or an external…

    40k GitHub stars~2.1k tokensUpdated today
    Data & AnalyticsAuto-check passed
  • Quicknode Core Workflow B

    jeremylongshore/tons-of-skills-marketplace

    Analyze and specify a chain-data contract for QuickNode across network identity, API family, historical retention, archive access, pagination, and add-ons.

    2.8k GitHub stars~1.1k tokensUpdated today
    Data & AnalyticsAuto-check passed
  • Segment Cdp

    benjaminasterA/antigravity-awesome-skills

    Expert patterns for Segment Customer Data Platform including Analytics.js, server-side tracking, tracking plans with Protocols, identity resolution, destinations configuration, and data governance ...

    375 GitHub starsUsed in 1 repo~361 tokens
    Data & AnalyticsAuto-check passed
  • Basin

    cloudflare/skills

    Official

    Build and troubleshoot Cloudflare Basin analytics workflows with Basin Pipelines, Basin Catalog, and Basin SQL.

    3k GitHub starsUsed in 2 repos~684 tokens
    DatabasesAuto-check passed

More from majiayu000/spellbook

All 97 skills in this repo
  • Skill Ecosystem Doctor

    majiayu000/spellbook

    Audits and repairs how coding-agent Skills are owned, copied and exposed across runtimes, from canonical sources to quarantine and retirement.

    287 GitHub stars~3k tokensUpdated yesterday
    Auto-check passed
  • AGENTS.md Scaffold

    majiayu000/spellbook

    Scans a repository for real evidence and proposes, or on request writes, a small stack of root and scoped AGENTS.md files with validation commands and generated-file boundaries.

    287 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed
  • Product Demo Builder

    majiayu000/spellbook

    Plans, produces or diagnoses evidence-backed product demo videos: script, capture plan, pacing checks and verified final media built on real product behavior.

    287 GitHub stars~3.3k tokensUpdated yesterday
    Auto-check passed
  • Flowguard Task Guard

    majiayu000/spellbook

    Single entry point that routes long or ambiguous agent tasks, checks live state, bounds autonomous loops and leaves a resumable handoff.

    287 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed
  • npm Supply Chain Check

    majiayu000/spellbook

    Scans a repository, its lockfiles and node_modules for known malicious npm package versions and install-time indicators, using a read-only Python scanner.

    287 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed
  • Product Manager Toolkit

    majiayu000/spellbook

    Product management helpers: a RICE scoring script, an interview transcript analyzer and PRD templates for prioritizing features, synthesizing research and writing requirements.

    287 GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed

Questions about Data Contract Migrations

What does Data Contract Migrations do?

Design and verify data contracts, schema changes, migrations, rollbacks, backfills, compatibility windows, tenant isolation, and API-to-database field mapping. Data Contract Migrations is an agent skill from majiayu000/spellbook. Design and verify data contracts, schema changes, migrations, rollbacks, backfills, compatibility windows, tenant isolation, and API-to-database field mapping.

When should I use Data Contract Migrations?

Data Contract Migrations fits situations like: changing database schema; persisted documents; analytics tables; multi-tenant data boundaries.

How do I install Data Contract Migrations in Claude Code?

Run `npx skills add majiayu000/spellbook --skill data-contract-migrations -a claude-code`. Or copy the skill folder (skills/data-contract-migrations in majiayu000/spellbook) into .claude/skills/data-contract-migrations in your project. Claude Code loads it when a task matches its description.

How do I install Data Contract Migrations in Codex?

Run `npx skills add majiayu000/spellbook --skill data-contract-migrations -a codex`. Or copy the skill folder (skills/data-contract-migrations in majiayu000/spellbook) into .agents/skills/data-contract-migrations in your project. Codex loads it when a task matches its description.

Can I use Data Contract Migrations in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add majiayu000/spellbook --skill data-contract-migrations -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/data-contract-migrations, .gemini/skills/data-contract-migrations, .github/skills/data-contract-migrations and .opencode/skills/data-contract-migrations in your project.

What does Data Contract Migrations need to run?

SKILL.md names no scripts, command-line tools or credentials: Data Contract Migrations is instructions for the agent only.

Does Data Contract Migrations access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Data Contract Migrations safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Data Contract Migrations use?

Data Contract Migrations is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Data Contract Migrations use?

About 602 tokens (SKILL.md is roughly 2.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Data Contract Migrations?

Skills that share tags, products or a category with Data Contract Migrations: Datalineage Summary (google/skills, 21k stars), Sap Btp Master Data Integration (secondsky/sap-skills, 462 stars), Modeling Warehouse Foundations (PostHog/posthog, 40k stars) and Quicknode Core Workflow B (jeremylongshore/tons-of-skills-marketplace, 2.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Data Contract Migrations?

majiayu000 (a GitHub user) maintains it in majiayu000/spellbook, which has 287 GitHub stars. The repository holds 97 skills in this directory. The repository was last updated on October 8, 2026.

Source: majiayu000/spellbook on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.