prepare-migration
Orchestrate the migrate-prep cascade — extract --prep → direct --prep → prototype --prep → assets prep — with confirmation gates between phases. Builds the data structure migrate consumes.
What this skill does
# stardust:prepare-migration
Orchestrate the migrate-prep cascade. When the user commits to
migrating an existing site, this skill runs the upstream phases
(`extract`, `direct`, `prototype`) in their `--prep` modes,
sequenced with confirmation gates so the user can confirm or refine
the inferred catalog at each step.
`prepare-migration` is a **thin orchestrator** — it does not
duplicate logic from the underlying skills; it invokes them and
brokers the per-phase summaries. The substantive work lives in:
- `skills/extract/SKILL.md` § Prep mode
- `skills/direct/SKILL.md` § Prep mode
- `skills/prototype/SKILL.md` § Prep mode +
`reference/canon-extraction.md`
When prep is complete, the user runs `$stardust migrate`
separately. The two-step boundary (`prepare-migration` then
`migrate`) is intentional: it makes "I'm committing to migrate
this site" a conscious gesture and keeps idempotency obvious.
## Inputs
- `--from <phase>` — optional. Resume the cascade from a specific
phase. Values: `extract | direct | prototype | assets`. Default
starts from the earliest incomplete phase.
- `--skip-confirm` — optional. Skip the per-phase confirmation
gates. Useful for re-runs where the catalog is already settled.
Default is to gate at every phase boundary.
- `--canon-from <slug>` — optional. Forward to
`prototype --prep --canon-from <slug>` when that phase runs.
Override the default canon-author (which is `home`).
## Setup
1. Run the master skill's setup (`skills/stardust/SKILL.md`
§ Setup) — impeccable dep check, context loader, state read.
2. Verify `stardust/state.json` exists with at least one extracted
page. If not, recommend `$stardust extract <url>` and stop.
3. Verify `stardust/direction.md` exists with an active direction.
If not, recommend `$stardust direct` and stop.
4. Determine which phases are already complete by inspecting
project state:
- **extract**: every page has a non-null `type` in `state.json`
and `current/pages/<slug>.json` carries a `slots` block.
- **direct**: `DESIGN.json.extensions.modules[]` entries all
have `status: confirmed`; `colorReservations` and `metadata`
blocks present.
- **prototype**: every page-type has at least one approved
archetype; `stardust/canon/` populated;
`DESIGN.json.extensions.canon` populated.
- **assets**: favicon variants in
`stardust/migrated/assets/`; fonts downloaded.
Resume from the earliest incomplete phase unless `--from`
overrides.
## Procedure
The cascade runs four phases sequentially. Each phase invokes its
underlying skill via the Skill tool, surfaces the phase's prep
summary, then waits for user confirmation (unless `--skip-confirm`)
before advancing.
### Phase 1 — extract --prep
Invoke:
```
Skill {
skill: "stardust:extract",
args: "--prep"
}
```
The underlying skill runs the standard extract procedure with the
five `--prep` overlays (lift cap, page typing, module candidates,
typed slots, prep summary).
On completion, surface the summary verbatim and gate:
```
Confirm and continue? (yes / refine "<phrase>")
```
User options:
- **`yes`** — advance to Phase 2.
- **`refine "<phrase>"`** — re-invoke `extract --prep` with the
refinement (e.g., "type news/* slugs as listing not article",
"exclude /search and /404 from inventory"). Re-surface summary;
loop.
#### Provenance guard (between Phase 1 and Phase 2)
Before invoking `direct --prep`, validate every page in the
inventory via `validateProvenance(page)` per
`skills/stardust/reference/state-machine.md` § Provenance
validation. Abort the cascade with the helper's error if any
page lacks live-render evidence. This is the cascade-level
defense against the failure mode where `extract --prep` (or its
delegated sub-agent) silently synthesized one or more page
records — extract's own write-time refusal is the primary guard,
but the cascade adds a second check between phases so the
synthesis bug recurring under a different rationale cannot
quietly contaminate the rest of the run.
The same guard runs implicitly inside Phase 2, 3, and 4 (each
underlying skill's setup calls `validateProvenance()` per its
own SKILL.md) — but surfacing it here as an explicit cascade
step makes the abort happen *before* the user sees the Phase 2
prep summary, which would otherwise look like a successful run.
Surface in the cascade output:
```
Provenance OK on 127 pages.
```
When the check fails:
```
Provenance check failed on 20 of 127 pages — see error above.
Cascade aborted between Phase 1 and Phase 2.
→ Re-run extract for the affected slugs:
$stardust extract --refresh <slug-1>
$stardust extract --refresh <slug-2>
...
```
### Phase 2 — direct --prep
Invoke:
```
Skill {
skill: "stardust:direct",
args: "--prep"
}
```
The underlying skill runs five `--prep` overlays (type catalog
confirmation, module catalog finalization, color reservations,
direction re-evaluation, brand metadata defaults).
Surface the summary and gate. User options match Phase 1
(`yes` / `refine "<phrase>"`).
### Phase 3 — prototype --prep
Invoke:
```
Skill {
skill: "stardust:prototype",
args: "--prep" + (canonFromSlug ? " --canon-from " + canonFromSlug : "")
}
```
The underlying skill fills page-type gaps (one approved archetype
per type) and writes canon back per
`skills/prototype/reference/canon-extraction.md`. First approval
establishes canon; subsequent approvals extend it (with conflicts
logged as deviations by default).
This phase typically takes the longest — each archetype goes
through the full prototype loop (shape brief, craft, open in
browser, iterate, approve). Stream progress to the user as each
archetype lands.
Surface the summary and gate.
### Phase 4 — assets prep
Generate or download asset variants needed for the migrated site.
This phase has no underlying SKILL — it runs as a small image-
processing + download routine.
1. **Favicon variants.** From the canonical favicon at
`stardust/current/assets/favicon.<ext>`, generate:
- `stardust/migrated/assets/favicon-512.png`
- `stardust/migrated/assets/apple-touch-icon.png` (180×180)
- `stardust/migrated/assets/icon-192.png`,
`icon-512.png` (manifest sizes)
2. **Font downloads.** Scan `stardust/canon/canon.css` (and
`stardust/canon/header.html` / `footer.html`) for `@font-face`
rules with external URLs. For each:
- Download the file to
`stardust/migrated/assets/fonts/<basename-with-hash>.<ext>`.
- Rewrite the `@font-face` `url(...)` reference in canon files
to the local path.
- Skip if already downloaded (sha-compared).
- Log a warning if download fails (font keeps external URL;
migrate logs a `metadata-override` warning per page).
3. **Brand-asset audit.** Verify the logo, favicon, and any
media files referenced by canon module renderings are
present in `stardust/current/assets/`. Surface missing assets
to the user.
Surface summary and final gate:
```
assets prep complete
====================
Favicon variants: favicon-512.png, apple-touch-icon.png, icon-192.png, icon-512.png
Font downloads: 4 files (HarmoniaSans 4 weights)
Brand assets: all present
Migrate-readiness: confirmed
→ Run `$stardust migrate` to apply canon to every page in inventory.
```
### Final report
```
prepare-migration complete
==========================
Phase 1 (extract --prep): 127 pages, 7 types, 8 module candidates
Phase 2 (direct --prep): types & modules confirmed; metadata set
Phase 3 (prototype --prep): 6 archetypes approved; canon written
Phase 4 (assets prep): favicon variants + fonts + brand assets ready
Next: $stardust migrate
```
## Outputs
`prepare-migration` writes nothing directly — every artifact is
written by the underlying skill or by Phase 4's image/download
routine. After the cascade runs, the project state has:
| Artifact | Phase that wrote it |
|-------Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.