Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Orchestrator-only workflow for migrating/rewriting codebases with full TDD and agent delegation
.claude/skills/tdd-migration-pipeline/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | 31% | 0% |
| case-08 | ✗→✓ | ▲ Improved | -17% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 129% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 32% | 0% |
| case-10 | ✗→✓ | ▲ Improved | -16% | 0% |
Orchestrator-only workflow for migrating or rewriting codebases. You do NOT read files, write code, or validate anything yourself. You only instruct agents and pipe context (paths, not contents).
qlty and tldr skillsInstruct spec-agent (use scout or architect):
- Analyze {source_path} using tldr-skill
- Output: spec.md with behavioral contracts, types, edge casesAgent prompt template:
Analyze the codebase at {source_path} using tldr commands (tldr structure, tldr extract, tldr calls).
Create spec.md with:
- All behavioral contracts (what each function/class promises)
- Input/output types
- Edge cases and invariants
- Dependencies between components
Write to: {target_dir}/spec.mdInstruct test-agent (use arbiter):
- Read spec.md
- Write failing tests in {target_dir}/tests/
- Tests should define expected behavior before implementation
Instruct review-agent (use critic):
- Validate tests cover spec completely
- No gaps in behavioral coverageInstruct premortem-agent (use premortem skill):
- Review spec + tests
- Identify failure modes, race conditions, edge cases
- DO NOT ASK - just add mitigations directly to spec
- Run 3 passes with fresh perspective each timeKey: Each pass should find NEW issues, not repeat previous ones.
Instruct planner-agent (use architect or plan-agent):
- Input: spec.md + tests + mitigations
- Output: phased-plan.yaml
- Requirements:
- Dependency-ordered phases
- Each phase = one testable unit
- Clear inputs/outputs per phaseFor each phase in phased-plan.yaml:
Instruct builder-agent (use kraken or spark):
- Write code to pass tests for this phase
- Use qlty for quality checks
- Run tests after each change
Instruct review-agent (use critic or judge):
- Validate implementation matches spec
- Check for regressions in previous phases
- Verify no breaking changesInstruct integration-agent (use atlas or validator):
- Use tldr to diff against {reference_repo}
- Check for:
- No race conditions
- No hangs or deadlocks
- No breaking changes vs original
- All behavioral contracts preserved
- Output: validation-report.mdWhen invoking this workflow, specify:
yamlSOURCE: {path to source code} TARGET_DIR: {new folder for migrated code} TARGET_LANG: {typescript|python|go|rust|etc} REFERENCE_REPO: {url or path for final diff comparison} SKILLS: [tldr-code, qlty-check, {domain-specific}]
| Phase | Agent Type | Subagent | |-------|-----------|----------| | Spec | research | scout or architect | | Tests | validate | arbiter | | Review | review | critic or judge | | Premortem | review | premortem skill | | Plan | plan | architect or plan-agent | | Build | implement | kraken (large) or spark (small) | | Integration | validate | atlas or validator |
# Phase 1
Task(scout): "Analyze /src/old-system using tldr structure and tldr extract.
Create spec.md at /migration/spec.md with all behavioral contracts."
# Phase 2
Task(arbiter): "Read /migration/spec.md. Write failing tests to /migration/tests/
that define expected behavior."
Task(critic): "Review /migration/spec.md vs /migration/tests/.
Report any behavioral gaps."
# Phase 3 (x3)
Task(premortem): "Review /migration/spec.md and /migration/tests/.
Identify failure modes. Add mitigations directly to spec. Pass 1/3."
[repeat with "Pass 2/3", "Pass 3/3"]
# Phase 4
Task(architect): "From /migration/spec.md and /migration/tests/,
create /migration/phased-plan.yaml with dependency-ordered phases."
# Phase 5 (loop)
Task(kraken): "Implement phase 1 from /migration/phased-plan.yaml.
Code goes in /migration/src/. Run tests after."
Task(critic): "Review /migration/src/ against /migration/spec.md.
Check for spec compliance and regressions."
[repeat for each phase]
# Phase 6
Task(atlas): "Run full integration tests on /migration/src/.
Use tldr to diff against /src/old-system.
Output /migration/validation-report.md."| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-03 | fail→pass | 13,196 | 10,114 | -23% | 1 | 1 | 0% | 2,428 | 3,192 | +31% | 0 | 0 | — |
case-08 | fail→pass | 22,584 | 10,537 | -53% | 1 | 1 | 0% | 3,999 | 3,302 | -17% | 0 | 0 | — |
case-02 | fail→fail | 14,643 | 4,271 | -71% | 1 | 1 | 0% | 2,846 | 2,302 | -19% | 0 | 0 | — |
case-01 | fail→fail | 8,405 | 3,866 | -54% | 1 | 1 | 0% | 1,161 | 2,240 | +93% | 0 | 0 | — |
case-04 | fail→fail | 2,093 | 11,140 | +432% | 1 | 1 | 0% | 210 | 3,581 | +1605% | 0 | 0 | — |
case-05 | pass→fail | 10,685 | 4,805 | -55% | 1 | 1 | 0% | 2,442 | 2,369 | -3% | 0 | 0 | — |
case-06 | pass→fail | 5,766 | 9,358 | +62% | 1 | 1 | 0% | 1,158 | 3,188 | +175% | 0 | 0 | — |
case-07 | fail→pass | 32,293 | 4,713 | -85% | 1 | 1 | 0% | 1,016 | 2,326 | +129% | 0 | 0 | — |
case-09 | fail→pass | 7,787 | 2,299 | -70% | 1 | 1 | 0% | 1,433 | 1,893 | +32% | 0 | 0 | — |
case-10 | fail→pass | 11,316 | 1,985 | -82% | 1 | 1 | 0% | 2,103 | 1,771 | -16% | 0 | 0 | — |
case-11 | pass→pass | 11,252 | 6,900 | -39% | 1 | 1 | 0% | 1,873 | 2,620 | +40% | 0 | 0 | — |
case-12 | fail→pass | 6,151 | 2,511 | -59% | 1 | 1 | 0% | 1,057 | 1,965 | +86% | 0 | 0 | — |
case-13 | fail→pass | 8,568 | 3,168 | -63% | 1 | 1 | 0% | 1,314 | 1,916 | +46% | 0 | 0 | — |
case-14 | fail→pass | 10,635 | 5,088 | -52% | 1 | 1 | 0% | 1,929 | 2,455 | +27% | 0 | 0 | — |
case-15 | pass→pass | 7,917 | 2,667 | -66% | 1 | 1 | 0% | 1,184 | 1,959 | +65% | 0 | 0 | — |
case-16 | fail→pass | 5,198 | 2,626 | -49% | 1 | 1 | 0% | 1,052 | 1,958 | +86% | 0 | 0 | — |
case-17 | fail→pass | 8,664 | 3,506 | -60% | 1 | 1 | 0% | 1,432 | 2,046 | +43% | 0 | 0 | — |
case-18 | fail→pass | 9,268 | 1,803 | -81% | 1 | 1 | 0% | 1,503 | 1,757 | +17% | 0 | 0 | — |
case-19 | fail→pass | 6,000 | 2,154 | -64% | 1 | 1 | 0% | 1,021 | 1,839 | +80% | 0 | 0 | — |
case-20 | pass→pass | 10,216 | 5,677 | -44% | 1 | 1 | 0% | 1,640 | 2,436 | +49% | 0 | 0 | — |
case-21 | pass→pass | 9,118 | 4,700 | -48% | 1 | 1 | 0% | 1,491 | 2,294 | +54% | 0 | 0 | — |
case-22 | pass→pass | 5,630 | 1,520 | -73% | 1 | 1 | 0% | 860 | 1,701 | +98% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 21 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +45 percentage points is the difference between those two pass rates over the 21 comparable cases. 3 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
| Model | Method | Date | Lift |
|---|---|---|---|
| gemini-3.6-flash | verified | 7/29/2026 | +65% |
Other measured skills in the registry, with their headline benchmark lift.