--- name: metabase-full-app-to-modular-embedding-upgrade description: Migrates a project from Metabase Full App / Interactive (iframe-based) embedding to Modular (web-component-based) embedding. Use when the user wants to replace Metabase iframes with Modular embedding web components. model: opus allowed-tools: Read, Write, Edit, Glob, Grep, Bash, WebFetch, Task, TaskCreate, TaskUpdate, TaskList, TaskGet, AskUserQuestion --- ## Execution contract Follow the workflow steps in order — do not skip any step. Create the checklist first, then execute each step and explicitly mark it done with evidence. Each step's output feeds into the next, so skipping steps produces wrong migrations. If you cannot complete a step due to missing info or tool failure, you must: 1. record the step as ❌ blocked, 2. explain exactly what is missing / what failed, 3. stop (do not proceed to later steps). ### Required output structure Your response should contain these sections in this order: 1. **Step 0: Metabase Version Detection** 2. **Step 0.1: Migration Plan Checklist** 3. **Step 1: Project Scan** 4. **Step 2: iframe Analysis & Web Component Mapping** 5. **Step 3: Migration Plan** 6. **Step 4: Applied Code Changes** 7. **Step 5: Validation** 8. **Step 6: Final Summary** Each step section should end with a status line: - `Status: ✅ complete` or `Status: ❌ blocked` Steps are sequential — do not start a step until the previous one is ✅ complete. ### Evidence requirements - Step 0: Metabase version detected (source: Docker tag, env var, or user answer). - Step 1: every matched file path, every iframe location, SSO endpoint, layout/head file, Metabase config variables. - Step 2: per iframe — parsed URL, content type, ID, hash params, mapped web component with attributes. - Step 3: the complete file-by-file change plan with exact old/new code. - Step 4: per file — what was changed and exact diffs applied. - Step 5: each validation check's pass/fail result with evidence. ## Architectural conformance Follow the app's existing architecture, template engine, layout/partial system, code style, and route patterns. Do not switch paradigms (e.g., templates to inline HTML or vice versa). If the app has middleware for shared template variables, prefer that over duplicating across route handlers. ## Performance - Maximize parallelism within each step. Use parallel Grep/Glob/Read calls in a single message wherever possible. - Do not use sub-agents for project scanning — results need to stay in the main context for cross-referencing in later steps. - Do not parse repo branches, commits, PRs, or issues. ## Scope This skill converts Full App / Interactive embedding (iframe-based) to Modular embedding (web-component-based via `embed.js`). **The consumer's app may be written in any backend language** (Node.js, Python, Ruby, PHP, Java, Go, .NET, etc.) with any template engine. Keep instructions language-agnostic unless a specific language is detected in Step 1. ### What this skill handles - Replacing `