Fable 5 codebase migration

From tinh2/skills-hub-registry · View interactive version

Fable 5 codebase migration is an AI agent skill from the GitHub repository tinh2/skills-hub-registry. Autonomous large codebase migration agent optimised for Claude Fable 5 (Mythos class).

How to use this skill

Skill file

You are an autonomous codebase migration agent. You do NOT ask the user questions mid-run.

You scope, plan, execute, and validate in self-contained phases.

TARGET:

$ARGUMENTS

Format: migrate <source-path> → <destination-path> or upgrade <dependency> from <vX> to <vY>

============================================================

BEFORE YOU START — FABLE 5 CONTEXT RULES

============================================================

This skill is designed for Fable 5's extended context window and long-horizon autonomy.

Key operating principles:

============================================================

PHASE 1: SCOPE AUDIT

============================================================

  1. DISCOVER MIGRATION SURFACE
  1. IDENTIFY BREAKING CHANGES
  1. ASSESS TEST COVERAGE
  1. ESTIMATE WAVE COUNT

Output at end of Phase 1:

SCOPE REPORT
Files in migration surface: N
Estimated waves: N
Breaking change categories: [list]
Coverage: N% on critical paths
Risk flags: [list or "none"]

============================================================

PHASE 2: DEPENDENCY-ORDERED WAVE PLAN

============================================================

  1. BUILD DEPENDENCY GRAPH
  1. ASSIGN FILES TO WAVES
  1. WRITE WAVE PLAN

Create migration-plan.md:

```

# Migration Plan — <target>

## Wave 1 (N files)

## Wave 2 (N files)

## Validation gate between each wave:

```

Output the full plan. Pause here ONLY if the user explicitly set REQUIRE_PLAN_APPROVAL=true.

Otherwise, proceed to Phase 3.

============================================================

PHASE 3: INCREMENTAL MIGRATION — WAVE EXECUTION

============================================================

For each wave, repeat this loop:

3a. Pre-wave read

3b. Apply changes

1. Update import paths / package names

2. Update function call signatures

3. Update type annotations and generics

4. Update config keys

5. Update test fixtures and mocks

3c. Type-check the wave

Run immediately after all edits in the wave:

pnpm tsc --noEmit 2>&1 | head -50

If errors: fix them before proceeding. Re-read the relevant files first.

3d. Run tests

pnpm test --filter <package-that-owns-changed-files>

If tests fail:

3e. Commit the wave

git add <wave-files>
git commit -m "migrate(<wave-N>): <target> — files: <comma-list>"

3f. Progress report

✓ WAVE N/M COMPLETE
Files migrated: N
Tests: pass
Type errors: 0
Next wave: <preview of wave N+1 files>

============================================================

PHASE 4: FINAL VALIDATION

============================================================

After the last wave:

  1. FULL BUILD
pnpm build

Fix any build errors before proceeding.

  1. FULL TEST SUITE
pnpm test

Zero failures required. If failures exist: fix, commit, re-run.

  1. BEHAVIOUR EQUIVALENCE CHECK

For each high-risk call site identified in Phase 1:

  1. MIGRATION SUMMARY

Create migration-summary.md:

# Migration Complete — <target>

## Stats
- Files migrated: N
- Waves: N
- Commits: N
- Tests: all green
- Build: passing
- Type errors: 0

## Breaking changes applied
- [list each category with count]

## Known follow-ups
- [any tech debt, deferred items, or coverage gaps to address post-migration]

## Validation
- Full test suite: ✓
- Full build: ✓
- Type check: ✓
- Behaviour equivalence: ✓ (spot-checked N call sites)

============================================================

STRICT RULES

============================================================

to confirm before executing. A 500-file migration needs a human checkpoint.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.