plugins/ce/skills/migrating-code/SKILL.md
Safe code migrations with backward compatibility and reversibility. Use when upgrading dependencies, changing database schemas, API versioning, or transitioning between technologies.
npx skillsauth add rileyhilliard/claude-essentials migrating-codeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
- [ ] Pre-Migration: Read changelog, identify breaking changes, ensure test coverage
- [ ] During: Small steps, test each, monitor errors, rollback ready
- [ ] Post: Verify tests, check metrics, remove scaffolding, update docs
| Operation | Pattern | |-----------|---------| | Add column | Add nullable first → backfill → add constraints | | Remove column | Stop writes → deploy code that doesn't read → drop column | | Rename column | Add new → dual-write → backfill → switch reads → drop old | | Change type | New column → dual-write → migrate in batches → switch → drop |
Never: Add NOT NULL without defaults to tables with data.
{
"data": {},
"_warnings": [{
"code": "DEPRECATED_ENDPOINT",
"message": "Use /api/v2/users instead",
"sunset": "2025-06-01"
}]
}
// Wrap library usage
// lib/date.ts
import moment from 'moment';
export const formatDate = (date: Date, format: string) =>
moment(date).format(format);
// Migration: just change the adapter
import { format } from 'date-fns';
export const formatDate = (date: Date, fmt: string) =>
format(date, fmt);
Use feature flags:
if (featureFlags.useNewSystem) {
return newService.process(order);
} else {
return legacyService.process(order);
}
Roll out: 1% → 10% → 50% → 100% → remove flag
Avoid:
Do:
development
Selects and applies professional journalistic story structures (WSJ Formula, Inverted Pyramid, Hourglass, Tick-Tock, etc.) based on the content being written. Use when writing articles, blog posts, features, essays, long-form content, news stories, trend pieces, investigative reports, profiles, or any narrative prose longer than a few paragraphs. Also use when the user asks for help structuring a piece, choosing a story framework, organizing a draft, outlining an article, or wants to know which article format fits their content. Trigger on requests like "help me structure this," "what format should I use," "write a feature about," "draft a blog post on," or any mention of story structure, article architecture, or narrative frameworks. Complements the writer skill (which handles tone and anti-AI rhetoric) by providing the structural blueprint.
testing
Writing style and tone guide for human-sounding content. Use when writing documentation, READMEs, commit messages, PR descriptions, blog posts, LinkedIn posts, social media content, or any user-facing content.
data-ai
Create implementation plans with tasks grouped by subsystem. Related tasks share agent context; groups parallelize across subsystems.
development
Debugging framework that finds root causes before proposing fixes. Use when investigating bugs, errors, unexpected behavior, failed tests, or when previous fixes haven't worked.