migrate-component

migrate-component is a skill for Claude Code from davila7/claude-with-skills. It costs 20 tokens per session (618 once invoked), scanned A, original, MIT.

A procedure for moving a user-interface component from one programming framework to another while keeping its behavior and tests. A component is a reusable piece of an interface, such as a button, form, or navigation panel.

In plain words
What is it for?
Use it when rewriting a component between frameworks and you need to preserve its interface behavior, visual structure, side effects, and test expectations.
Why use it?
It turns the existing component’s inputs, state, events, side effects, appearance, and tests into a specification for the replacement. This reduces the chance of changing how the component works during migration.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: positional $N argument.

Good fit Use it when rewriting a component between frameworks and you need to preserve its interface behavior, visual structure, side effects, and test expectations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/davila7/claude-with-skills/migrate-component
About the project

Claude With Skills is a progressive course that teaches developers to create reusable, portable Agent Skills for Claude Code, from basic SKILL.md files to advanced automation and plugin packaging. It is intended for developers who want repeatable instructions and workflows instead of repeatedly pasting the same guidance. The catalogue contains the course's skills, agents, and instruction.

davila7/claude-with-skills · 11 stars · on GitHub · claude-with-skills.vercel.app

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add davila7/claude-with-skills --skill migrate-component
Clone the repo
git clone --depth 1 https://github.com/davila7/claude-with-skills

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for migrate-component

README.md
[![agentmods](https://agentmods.dev/badge/skills/davila7/claude-with-skills/migrate-component/github.svg)](https://agentmods.dev/skills/davila7/claude-with-skills/migrate-component)
Your own site
<a href="https://agentmods.dev/skills/davila7/claude-with-skills/migrate-component"><img src="https://agentmods.dev/badge/skills/davila7/claude-with-skills/migrate-component/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for migrate-component

Your own site · 80×15
<a href="https://agentmods.dev/skills/davila7/claude-with-skills/migrate-component"><img src="https://agentmods.dev/badge/skills/davila7/claude-with-skills/migrate-component.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 618 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00020 $0.00618
Opus 5 $0.00010 $0.00309
Sonnet 5 $0.00004 $0.00124
Haiku 4.5 $0.00002 $0.00062

Measured 10d ago against content hash bd0431127792, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

migrate-component scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/content/docs/02-intermediate/lesson-04-arguments/examples/migrate-component/SKILL.md · 70 lines

How it starts

The opening of the file, as written. The whole thing — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Migrate component

Migrate the $0 component from $1 to $2.

Step 1: Read the current implementation

Find and read the current $0 component file. Search for it:

  • In src/components/, components/, app/components/, or similar common locations
  • Using grep -r "$0" --include="*.$1*" -l if the framework extension is known (e.g., .vue, .jsx)

Read all files that make up the component:

  • The main component file
  • Any associated style files (.css, .scss, .module.css)
  • Any associated test files (*.test.*, *.spec.*)

If you cannot find the component, stop and ask the user for the file path.

Step 2: Understand props, state, and behavior

Before writing any code, document:

  • All props the component accepts (name, type, default value, whether required)
  • All internal state (what it tracks and how it changes)
  • All events the component emits or callbacks it invokes
  • Side effects (data fetching, subscriptions, DOM manipulation)
  • The rendered structure (what it produces visually or structurally)

This documentation becomes the specification the new implementation must satisfy.

Step 3: Write the equivalent in $2

Write the $0 component in $2, matching the same public API:

  • Same prop names and types
  • Same event names and payloads
  • Same rendered structure (or nearest equivalent in $2)
  • Same behavior for all documented state transitions

Use idiomatic $2 patterns. Do not transliterate $1 patterns directly into $2 if $2 has a better way to express the same thing.

Step 4: Update tests

Rewrite any tests associated with the original component to use $2 testing conventions:

  • Update imports to point to the new component file
  • Update any framework-specific test utilities (e.g., mount from $1 to the $2 equivalent)
  • Preserve all test cases — every behavior tested in $1 must be tested in $2

Step 5: Report what changed and what needs manual review

Produce a brief report:

Changed:

  • List of files created or modified

Preserved:

  • Confirmation that all props, events, and behaviors have equivalents

Read the full file on GitHub · 70 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 70 lines · 20 tokens per session scan A bd0431127792

Subscribe to this mod's changes

migrate-component is a skill published in the GitHub repository davila7/claude-with-skills (11 stars, last pushed 3mo ago), licensed MIT. It adds 20 tokens to every session and 618 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

visual-ralph

Visual Ralph orchestration for frontend UI from generated references, static references, or live URL targets, using $ralph with built-in visual verdict and pixel-diff evidence until the implementation matches and leaves a reproducible design system.

Yeachan-Heo/oh-my-codex · 50 tokens

debug-optimize-lcp

Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…

ChromeDevTools/chrome-devtools-mcp · 99 tokens

repro-admin

Reproduce an EmDash admin UI bug. Attach a container, start the demo dev server, drive the admin with agent-browser using the dev-bypass session, and capture the reproduction as screenshots plus a replayable transcript.

emdash-cms/emdash · 48 tokens

create-site

Creates a new Power Pages code site (SPA) using React, Angular, Vue, or Astro. Guides through the full process from initial concept to deployed site: requirements discovery, scaffolding, component planning, design, implementation, validation, and deployment. Use when the user wants to create, build, or scaffold a new…

microsoft/power-platform-skills · 73 tokens

prototype-web

A clickable, high-fidelity web product prototype with navigation, a hero section, feature cards, steps, social proof, and optional pricing. It is designed to resemble a finished landing page while remaining a prototype.

nexu-io/html-anything · 24 tokens

menu-transitions-rtl

Animate react-horizontal-scrolling-menu scrolling and build right-to-left menus: noPolyfill defaults to true since v8, so transitionDuration (default 500), a custom-easing-function transitionBehavior, and per-call ScrollOptions { duration, boundary } on scrollToItem/scrollNext/scrollPrev are silently ignored unless…

asmyshlyaev177/react-horizontal-scrolling-menu · 137 tokens