incremental-migration
Skill6 starsChanged 4 months agoApache-2.0View on GitHub
Use when migrating APIs, libraries, or patterns across a large codebase and a single mega-commit would be too risky to review or merge.
In this repository116 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- skills/graphify/references/CLAUDE.mdCLAUDE.md
- agent-config-security-auditSkill
- agent-harness-designSkill
- agent-readable-docsSkill
- agent-runtime-patternsSkill
- agent-session-forensicsSkill
- ai-regression-testingSkill
- ai-slop-cleanerSkill
- api-doc-reviewSkill
- architecture-decision-recordsSkill
- architecture-simplificationSkill
- ask-claudeSkill
- ask-codexSkill
- ask-geminiSkill
- autonomous-delivery-pipelineSkill
- baseline-comparison-reviewSkill
- bigquery-cost-auditSkill
- brainstormingSkill
- browser-automation-safetySkill
- bug-huntSkill
- build-fix-minimal-diffSkill
- canonical-advisor-routingSkill
- change-impact-checkSkill
- changelog-generatorSkill
- ci-failure-readoutSkill
- codebase-migration-batchesSkill
- context-compressionSkill
- context-docsSkill
- context-minimizationSkill
- context-retrieval-loopSkill
- data-qualitySkill
- dataset-split-reviewSkill
- dbt-incremental-strategy-auditSkill
- dbt-preflightSkill
- dbt-strategySkill
- dead-code-removalSkill
- defuddleSkill
- dependency-cleanupSkill
- deploy-pipeline-runbookSkill
- dispatching-parallel-agentsSkill
- doc-consistency-checkSkill
- environment-doctorSkill
- experiment-tracking-reviewSkill
- failure-triageSkill
- filesystem-mcp-guardrailsSkill
- finishing-a-development-branchSkill
- flaky-test-investigationSkill
- gh-address-commentsSkill
- github-ci-failure-triageSkill
- graphifySkill
- handoff-disciplineSkill
- hard-won-skill-extractorSkill
- hook-safety-reviewSkill
- incident-readoutSkill
- json-canvasSkill
- local-rag-mcpSkill
- log-driven-diagnosisSkill
- managed-codebase-contextSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Never attempt to migrate an entire codebase in a single step.
- Distinctive: line 32
Implement side-by-side: Create the "New Way" implementation alongside the old one.
- Distinctive: line 44
Test and commit: Verify the slice works. Commit this step.
- Distinctive: line 48
Deprecate and remove: Only once all usages of the "Old Way" are gone (inventory at zero) can you safely delete the old implementation.
- Distinctive: line 50
If a migration is too large for a single session, leave a clear handoff document summarizing progress and the next files to migrate.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Purpose
Never attempt to migrate an entire codebase in a single step. Mega-commits are impossible to review and dangerous to merge. Migrate in verified, committed slices, tracking the remaining inventory to zero.
When to Use
- Replacing an API, library, or pattern with many call sites
- A framework or major-version upgrade touches a wide surface area
- A previous big-bang migration attempt stalled or was reverted
Inputs
- The "Old Way" and "New Way" definitions
- The repo's test command
Workflow
- Define the target pattern. Clearly establish the "Old Way" and the "New Way".
Build the inventory. Make the migration measurable:
git grep -ln "oldApiCall(" -- "src/" # files still on the Old Way git grep -c "oldApiCall(" -- "src/" | sort -t: -k2 -nr # hotspots first- Implement side-by-side. Create the "New Way" implementation alongside the old one. Do not delete the old one yet.
Migrate one vertical slice. Pick exactly one feature, route, or component; update it to use the new pattern. Mechanical rewrites can be scripted per slice:
# codemod sketch — scoped to one slice; review the diff before committing git grep -l "oldApiCall(" -- "src/feature-x/" | xargs sed -i "s/oldApiCall(/newApiCall(/g" git diff --stat # confirm the change stayed inside the slice(For syntax-aware rewrites, AST codemod tools such as jscodeshift or comby are safer than sed, when available.)
- Test and commit. Verify the slice works. Commit this step.
- Repeat. Move to the next slice, re-running the inventory to watch the count fall.
- Deprecate and remove. Only once all usages of the "Old Way" are gone (inventory at zero) can you safely delete the old implementation.
If a migration is too large for a single session, leave a clear handoff document summarizing progress and the next files to migrate.
Output
- A series of slice-sized commits, each tested
- The shrinking inventory count per slice
- A handoff document if the migration spans sessions
Verification
- Old Way and New Way explicitly defined before any edit
- Inventory command run before and after each slice
- Each slice committed separately with tests green
- Old implementation deleted only at inventory zero
- Handoff document written if work remains
Failure Modes
- Mega-commit relapse — batching "just a few more files" until the diff is unreviewable.
- Deleting the Old Way early — half-migrated code with the old path gone cannot merge safely.
- Unscoped codemods — repo-wide sed instead of per-slice; always diff-check the blast radius.
- No inventory — without a count, "almost done" is a feeling, not a fact.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

