agentleFS
CodeWithBehnamCodeWithBehnam/cc-docs/skills/migrate/SKILL.md

migrate

Skill2 starsChanged 9 months agoMITView on GitHub

Migrate files or a directory from one framework, library, or pattern to another. Preserves behavior while updating syntax, imports, and idioms. Use when the user says "migrate from X to Y", "convert this to use X", "upgrade from React class components to hooks", or "port this to FastAPI".

39 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use a11y, incident and 7 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • CorentinGCSkill

    a11y

    Accessibilité web — rôles ARIA, navigation clavier, contraste, labels, focus management, semantic HTML. Appliqué automatiquement lors de la création de composants UI.

    Also in 3 projects that use this

  • pvnarpSkill

    incident

    Guides incident response and post-mortem analysis. Covers triage, mitigation, root cause analysis, and prevention. Use when responding to active incidents, writing post-mortems, or improving incident processes.

    Also in 3 projects that use this

  • diego-tobalinaSkill

    logging

    Logging best practices for Java (SLF4J/Logback) and Node.js (Winston/Pino). Use for structured logging, log levels, and avoiding sensitive data exposure.

    Also in 3 projects that use this

  • AnthropicSkill

    tech-debt

    Identify, categorize, and prioritize technical debt. Trigger with "tech debt", "technical debt audit", "what should we refactor", "code health", or when the user asks about code quality, refactoring priorities, or maintenance backlog.

    Also in 3 projects that use this

  • JohnJBorenSkill

    ci-cd

    CI/CD pipeline design, GitHub Actions, testing automation, and deployment strategies

    Also in 3 projects that use this

  • MicrosoftSkill

    scaffold

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. 0 are common, 12 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 32 edited versions we read keep these.

  • 12

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If $ARGUMENTS[0] is a directory, list all files to migrate: find $ARGUMENTS[0] -type f

    line 16
  2. Distinctive:

    If $ARGUMENTS[0] is a single file, focus on it

    line 17
  3. Distinctive:

    If only one argument is given, infer the source from the file content and ask for clarification on the target

    line 18
  4. Distinctive:

    Read the files to identify: the framework/pattern currently in use, idioms, conventions, and structure

    line 21
  5. Distinctive:

    Run the existing test suite to capture a baseline:

    line 28
  6. Distinctive:

    If there are no tests, warn the user before proceeding.

    line 30
  7. Distinctive:

    Update imports and package names

    line 33
  8. Distinctive:

    Update configuration files as needed:

    line 39
  9. Distinctive:

    Run the full test suite

    line 44
  10. Distinctive:

    All baseline tests must still pass

    line 45
  11. Distinctive:

    If the source pattern is not recognized: describe what was found and ask for guidance

    line 59
  12. Distinctive:

    If a construct has no direct equivalent in the target: flag it, propose the closest alternative, and ask before applying

    line 60
  13. Distinctive:

    If tests fail after migration: revert the failing file, report the issue, and continue with other files

    line 61

“Common” is measured: kept by at least 6 in 10 of the 32 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Migrate $ARGUMENTS[0] from its current pattern to $ARGUMENTS[1]:

  1. Understand the scope:
    • If $ARGUMENTS[0] is a directory, list all files to migrate: find $ARGUMENTS[0] -type f
    • If $ARGUMENTS[0] is a single file, focus on it
    • If only one argument is given, infer the source from the file content and ask for clarification on the target
  2. Understand the source:
    • Read the files to identify: the framework/pattern currently in use, idioms, conventions, and structure
    • Note any project-specific customizations that need to be preserved
  3. Understand the target ($ARGUMENTS[1]):
    • Identify the equivalent constructs in the target framework/pattern
    • Build a mapping: source concept -> target concept (e.g., componentDidMount -> useEffect, Flask Blueprint -> FastAPI APIRouter)
  4. Run the existing test suite to capture a baseline:
    • Record all passing tests. The migration must not break them.
    • If there are no tests, warn the user before proceeding.
  5. Migrate files one at a time:
    • Update imports and package names
    • Convert syntax and idioms to target equivalents
    • Preserve all logic - do not change behavior during migration
    • Preserve comments that explain intent
    • For each file, run available tests before moving to the next
  6. Update configuration files as needed:
    • package.json, pyproject.toml, go.mod, etc.
    • Framework config files, build configs, CI configs
  7. Final verification:
    • Run the full test suite
    • All baseline tests must still pass
  8. Report:
    • List every file changed
    • Summarize the key transformations applied
    • Note any items that required manual decisions or could not be automatically migrated

Requirements

  • $ARGUMENTS[0]: path to the file(s) or directory to migrate
  • $ARGUMENTS[1]: target framework or pattern (e.g., "React hooks", "FastAPI", "async/await", "Pydantic v2")

Error Handling

  • If the source pattern is not recognized: describe what was found and ask for guidance
  • If a construct has no direct equivalent in the target: flag it, propose the closest alternative, and ask before applying
  • If tests fail after migration: revert the failing file, report the issue, and continue with other files

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.