pwp-migrate

pwp-migrate is a skill for Claude Code, Codex from shandar/pwp-plugin. It costs 97 tokens per session (758 once invoked), scanned A, original, MIT.

A procedure for planning and carrying out database, data, platform, and major dependency migrations. A migration is a controlled change from one schema, data format, system, or software version to another.

In plain words
What is it for?
Adding database columns, changing schemas, transforming data, moving platforms, switching databases, or upgrading major dependencies.
Why use it?
It reduces the risk of lost data or broken systems by requiring a plan, realistic testing, a rollback path, and explicit impact assessment.

Skill for Claude CodeCodex

Part of the pwp plugin — 11 skills shipped together

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/shandar/pwp-plugin/pwp-migrate
Any agent
npx skills add shandar/pwp-plugin --skill pwp-migrate
Clone the repo
git clone --depth 1 https://github.com/shandar/pwp-plugin

Made for: Claude Code, Codex.

Or install pwp, the plugin that ships this one along with the rest of its 11 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 pwp-migrate

README.md
[![agentmods](https://agentmods.dev/badge/skills/shandar/pwp-plugin/pwp-migrate.svg)](https://agentmods.dev/skills/shandar/pwp-plugin/pwp-migrate)
Your own site
<a href="https://agentmods.dev/skills/shandar/pwp-plugin/pwp-migrate"><img src="https://agentmods.dev/badge/skills/shandar/pwp-plugin/pwp-migrate.svg" alt="Measured on agentmods" height="20"></a>
Per session 97 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 758 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.00097 $0.00758
Opus 5 $0.00048 $0.00379
Sonnet 5 $0.00019 $0.00152
Haiku 4.5 $0.00010 $0.00076

Measured 3d ago against content hash 5dd960635e8f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pwp-migrate 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 3d 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.

skills/pwp-migrate/SKILL.md · 83 lines

How it starts

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

Migration Skill

This skill defines how to plan and execute migrations — database schema changes, data transformations, system upgrades, and platform moves. Migrations are the highest-risk operations in software delivery.

Migration Mindset

  • Migrations are not features. They have their own lifecycle and risks. Never mix migration code with application code in the same deploy.
  • Reversibility is mandatory. Every up must have a down. If you can't undo it, you're not ready to do it.
  • Test on realistic data. An empty database is not a test.
  • Communicate risk. Every migration has a blast radius. Make it explicit.

Migration Types

Type Examples Risk Level
Schema Add column, create table, add index Medium
Data Backfill values, transform formats High
Platform Change hosting, switch databases Very High
Dependency Major version upgrade Medium-High

Migration Protocol

Step 1: Plan

  • Document what changes and why
  • Identify all affected systems, tables, and services
  • Estimate duration, define rollback strategy

Step 2: Write Migration

Naming: {YYYYMMDD}_{sequence}_{description}.{direction}.sql

  • Each migration is atomic
  • Separate schema changes from data changes
  • Never modify an already-applied migration

Step 3: Test

  1. Test on empty database (syntax)
  2. Test on seed data (existing data)
  3. Test on production-shaped data (realistic volume)
  4. Test the rollback
  5. Test the application with both old and new schema

Step 4: Execute

  1. Backup the database
  2. Deploy to staging first
  3. Deploy to production during low-traffic window
  4. Monitor for errors
  5. Verify data integrity

Step 5: Verify

  • Migration applied successfully
  • Data integrity checks pass
  • Application functions correctly
  • Rollback tested and verified
  • Performance acceptable

Safe Schema Change Patterns

Adding a Column: Add as nullable → deploy writes → backfill → add constraint Removing a Column: Stop reading → stop writing → drop column Renaming a Column: Add new → write both → backfill → read new → write new → drop old Adding an Index: Use CREATE INDEX CONCURRENTLY for large tables

Read the full file on GitHub · 83 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. 3d ago First seen · 83 lines · 97 tokens per session scan A 5dd960635e8f

Subscribe to this mod's changes

pwp-migrate is a skill published in the GitHub repository shandar/pwp-plugin (1 stars, last pushed 6mo ago), licensed MIT. It adds 97 tokens to every session and 758 once invoked, about $0.0005 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-31.

Related

Other skills, from other repositories

authentication-patterns

Authentication patterns: session vs JWT vs OAuth comparison, provider selection (NextAuth, Clerk, Supabase Auth), security checklist, and common mistakes. Use when implementing auth, reviewing auth flows, or choosing auth providers.

zebbern/claude-code-guide · 47 tokens

code-vuln-audit

Scan code for security issues: dependency vulnerabilities (npm/pip audit), secret leaks (regex and entropy analysis), and OWASP anti-patterns like SQL injection, XSS, or command injection. Use when the user mentions security scans, vulnerability detection, secret leaks, API keys, OWASP, npm audit, pip-audit, hardcoded…

zebbern/claude-code-guide · 82 tokens

database-scout

Explore SQLite and PostgreSQL databases: list tables, inspect schemas (columns/types/constraints), preview data, generate Mermaid ER diagrams, and run safe read-only queries. Triggered by requests to explore a database, view table structures, describe tables, generate diagrams, or query data, and by keywords like…

zebbern/claude-code-guide · 76 tokens

golang-database

Comprehensive guide for Go database access — parameterized queries, struct scanning, NULLable columns, transactions, isolation levels, SELECT FOR UPDATE, connection pool, batch processing, context propagation, and migration tooling. Use when writing, reviewing, or debugging Golang code that interacts with PostgreSQL…

samber/cc-skills-golang · 99 tokens

golang-samber-hot

In-memory caching in Golang using samber/hot — eviction algorithms (LRU, LFU, TinyLFU, W-TinyLFU, S3FIFO, ARC, TwoQueue, SIEVE, FIFO), TTL, cache loaders, sharding, stale-while-revalidate, missing key caching, and Prometheus metrics. Apply when using or adopting samber/hot, when the codebase imports…

samber/cc-skills-golang · 122 tokens

database-optimizer

Use when investigating slow queries, analyzing execution plans, or optimizing database performance. Invoke for index design, query rewrites, configuration tuning, partitioning strategies, lock contention resolution.

zebbern/claude-code-guide · 39 tokens