agentleFS
NoaiRoxNoaiRox/specialist-agent/skills/migrate-framework/SKILL.md

migrate-framework

Skill2 starsChanged 9 months agoMITView on GitHub

Use when switching a project or component between frameworks - React to Vue, Vue to Svelte, or any supported framework pair.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    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
  1. Distinctive:

    Create target file structure

    line 122
  2. Distinctive:

    Idiomatic code: - Use target framework patterns

    line 163
  3. Distinctive:

    Keep original: - Don't delete source files

    line 165

≈ “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.

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

/migrate-framework - Cross-Framework Migration

Migrate code from one framework to another while preserving functionality.

Arguments: $ARGUMENTS (e.g., "react to vue src/components/Button.tsx")

Supported Migrations

FromToStatus
ReactVue 3Full
ReactSvelteFull
Vue 2Vue 3Full
Vue 3ReactFull
Vue 3SvelteFull
AngularReactPartial
AngularVue 3Partial

Workflow

Phase 1: Analysis

  1. Parse source framework code
  2. Identify:
    • Component structure
    • Props and state
    • Lifecycle hooks
    • Event handlers
    • Computed values
    • Side effects

Phase 2: Mapping

React → Vue 3

ReactVue 3
useStateref() / reactive()
useEffectonMounted, watch
useMemocomputed()
useCallbackRegular function
useContextprovide/inject
propsdefineProps()
children<slot />
classNameclass
onClick@click
// React
function Button({ label, onClick }) {
  const [count, setCount] = useState(0)

  useEffect(() => {
    console.log('mounted')
  }, [])

  return (
    <button className="btn" onClick={() => setCount(c => c + 1)}>
      {label}: {count}
    </button>
  )
}

// Vue 3
<script setup lang="ts">
import { ref, onMounted } from 'vue'

const props = defineProps<{ label: string }>()
const emit = defineEmits<{ click: [] }>()

const count = ref(0)

onMounted(() => {
  console.log('mounted')
})
</script>

<template>
  <button class="btn" @click="count++">
    {{ label }}: {{ count }}
  </button>
</template>

Vue 3 → React

Vue 3React
ref()useState
reactive()useState with object
computed()useMemo
watchuseEffect
onMounteduseEffect(fn, [])
provide/injectuseContext
<slot />children
v-if{condition && ...}
v-for.map()
@clickonClick

React → Svelte

ReactSvelte
useStatelet variable
useEffectonMount, $:
useMemo$: derived
propsexport let
children<slot />
classNameclass
onClickon:click

Phase 3: Migration

  1. Create target file structure
  2. Convert component syntax
  3. Migrate state management
  4. Update imports
  5. Convert templates/JSX
  6. Adapt styling approach

Phase 4: Validation

  1. Check TypeScript types
  2. Verify props match
  3. Test component renders
  4. Compare behavior

Output

──── Migration Complete ────

Source: React (src/components/Button.tsx)
Target: Vue 3 (src/components/Button.vue)

Conversions:
  ✓ useState → ref (2 instances)
  ✓ useEffect → onMounted (1 instance)
  ✓ Props interface → defineProps
  ✓ JSX → Vue template
  ✓ className → class

Manual review needed:
  - Line 15: Complex useEffect dependency array
  - Line 23: Custom hook needs separate migration

Files created:
  - src/components/Button.vue

Rules

  1. Preserve behavior - Functionality must match
  2. Type safety - Maintain TypeScript types
  3. Idiomatic code - Use target framework patterns
  4. Flag manual work - Mark complex conversions
  5. Keep original - Don't delete source files

Limitations

  • Custom hooks require separate migration
  • Third-party component libraries may not have equivalents
  • Some patterns don't translate directly
  • CSS-in-JS needs manual adaptation

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.