ds-component-migration

Migrates legacy component implementations to canonical design system components in five gated phases.

Updated Jun 17, 2026
One-click install
npx skills add https://github.com/RickOBrian/aid --skill ds-component-migration-rickobrian
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ds-component-migration
Source: https://github.com/RickOBrian/aid/tree/main/skills/ds-component-migration
Command: npx skills add https://github.com/RickOBrian/aid --skill ds-component-migration-rickobrian

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Replacing legacy markup with an approved design system component across a repository is risky when done as a bulk refactor: ambiguous matches get silently rewritten, JS-generated markup breaks, and there is no audit trail. This Skill structures the migration into five controlled phases (discovery, mapping, pilot, batch rollout, cleanup) with explicit human confirmation at every gate. ## Core Features & Use Cases - Phased migration workflow: Discovery groups legacy marker matches into exact/similar/ambiguous buckets, Mapping builds a props/slot table from the canonical component spec, Pilot migrates only 1-2 files, and Batch Rollout applies the confirmed mapping to the rest. - Safety gates: Rollout is blocked unless the component spec and all related component specs are finalized; JS-generated markup groups require separate explicit approval; manual-review groups are never touched automatically. - Session memory and token economy: Migration state is persisted to memory logs with a scope signature so repeated runs reuse Discovery results instead of rescanning the repository. - Use Case: A team has approved a new TableRow component and needs to replace legacy .table-wrap markup across storybook and docs. Run /migrate_component TableRow to get a grouped discovery report and mapping table, approve the pilot diff, then roll out and clean up with full traceability. ## Quick Start Ask the assistant to run /migrate_component followed by your component name, for example /migrate_component TableRow, to start discovery and mapping for that component.

Frequently Asked Questions about ds-component-migration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate legacy components to a new design system component?

Run /migrate_component with the component name to start Discovery and Mapping, which are read-only. Then approve each subsequent phase with /migrate_component pilot, rollout, and cleanup, confirming explicitly at every gate before files change.

What happens if the component spec is still in draft stage?

Discovery and Pilot are allowed but every output is flagged with a warning listing the spec's open questions. Batch Rollout is blocked entirely until the component spec and all related component specs reach final stage with zero open questions.

Does the migration handle markup generated by JavaScript templates?

JS-generated groups are treated as a separate gate: they do not inherit the general mapping confirmation and stay deferred until you explicitly approve modifying the generating code. They are listed separately in output rather than silently skipped.

Can I run a component migration without a slash command?

No, activation is strictly command-based via /migrate_component subcommands. Phrases like "migrate the Table component" without the command do not trigger the skill; you will be asked to use the explicit command instead.

Why does the migration skill avoid rescanning the repository?

Each session stores a scope signature combining component name, legacy markers, and search paths in a memory log. If the signature matches the previous Discovery, phases reuse the cached file groups instead of running another full-repository scan.

What are the limitations of automated component migration?

Groups classified as manual review, unresolved ambiguous cases, and deferred JS-generated markup are never modified automatically and remain in the follow-up list. The skill also refuses to guess props or slots from legacy code; mapping is always derived from the canonical spec.