[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AT7QNHG108205MHWBQVC36":3,"skill-same:01M7AT7QNHG108205MHWBQVC36":65},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":33,"repositoryHtmlUrl":34,"repositoryHomepageUrl":6,"ownerHtmlUrl":35,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":36,"install":37,"resources":50},"01M7AT7QNHG108205MHWBQVC36","stitch::extract-static-html",null,"Extract self-contained static HTML from a built web application or React components by inlining CSS and images. Use this skill whenever you need to capture a specific UI state, share a static version of a page, or prepare assets for Stitch upload, even if the user just asks to 'save the HTML' or 'mock the view'.","mahik504\u002Forchestra-workflow","mahik504","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F184419817?v=4","01M7ASS7EBZ4GXTN2C42N8CJ8T","Mahaveer Singh Gehlot","01M7ASS7EYYYXDMCST6D918XPS",1,"MIT","https:\u002F\u002Fgithub.com\u002Fmahik504\u002Forchestra-workflow\u002Fblob\u002Fmain\u002Fskills\u002Fstitch-extract-static-html\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: stitch::extract-static-html\ndescription: >-\n  Extract self-contained static HTML from a built web application or React components by inlining CSS and images. Use this skill whenever you need to capture a specific UI state, share a static version of a page, or prepare assets for Stitch upload, even if the user just asks to 'save the HTML' or 'mock the view'.\nallowed-tools:\n  - \"stitch*:*\"\n  - \"Bash\"\n  - \"Read\"\n  - \"Write\"\n  - \"web_fetch\"\n---\n\n# Extract Static HTML\n\nExtract a self-contained static HTML file from any web application.\n\n## Which Strategy to Use\n\nYou MUST ask the user to choose which strategy to use before proceeding. Present the options clearly, **recommend Strategy A** as the preferred default, and **provide a brief pros\u002Fcons summary** for each option to help them make an informed decision.\n\n| | Strategy A (Puppeteer) | Strategy B (Browser Subagent) |\n| :--- | :--- | :--- |\n| **When** | App runs locally, no auth wall | Need to interact with page first (click, fill forms) |\n| **Fidelity** | **Highest — computed styles resolved** | High — rendered DOM |\n| **Setup** | **Zero — no mock needed** | Zero — no mock needed |\n| **Framework** | **Any** | Any |\n| **Output** | **Writes to file — no size limit** | May truncate in agent context |\n\n> [!WARNING]\n> **Checkpoint — User Confirmation Required.**\n> You **MUST** ask the user which strategy they prefer before proceeding.\n> Present the comparison table above, recommend Strategy A as the default, and\n> wait for explicit approval. Do **NOT** make the decision yourself or proceed\n> until the user confirms.\n\n***\n\n## Strategy A: Puppeteer Snapshot (Recommended)\n\nLaunches headless Chrome, captures the fully rendered DOM, and produces a self-contained HTML file with all CSS inlined and images as base64. Works with **any framework** — no MockPage.jsx needed.\n\n### Prerequisites\n\n- App running locally (e.g., `npm run dev`)\n- Node.js with `puppeteer` available (check: `node -e \"require('puppeteer')\"`)\n\n### Workflow\n\n1.  **Start the App** and note the port.\n\n    > [!WARNING]\n    > **Checkpoint — User Confirmation Required.**\n    > After starting the local server, you **MUST** pause and ask the user for\n    > confirmation before running the snapshot script or launching a browser\n    > subagent. Report the URL and port to the user so they can verify the app\n    > is running and rendering correctly. Do **NOT** proceed to the snapshot\n    > step until the user confirms.\n\n2.  **Run the Snapshot Script**:\n    ```bash\n    npx tsx \u003CSKILL_DIR>\u002Fscripts\u002Fsnapshot.ts \\\n      --url http:\u002F\u002Flocalhost:5173 \\\n      --output .stitch\u002Fhome.html \\\n      --wait 2000\n    ```\n\n3.  **Multiple pages** — run once per route:\n    ```bash\n    npx tsx \u003CSKILL_DIR>\u002Fscripts\u002Fsnapshot.ts \\\n      --url http:\u002F\u002Flocalhost:5173 --output .stitch\u002Fhome.html --wait 2000\n    npx tsx \u003CSKILL_DIR>\u002Fscripts\u002Fsnapshot.ts \\\n      --url http:\u002F\u002Flocalhost:5173\u002Fpricing --output .stitch\u002Fpricing.html --wait 2000\n    npx tsx \u003CSKILL_DIR>\u002Fscripts\u002Fsnapshot.ts \\\n      --url http:\u002F\u002Flocalhost:5173\u002Fdashboard --output .stitch\u002Fdashboard.html --wait 2000 --html-class dark\n    ```\n\n4.  **Clean Up Dev Server**:\n    If a local dev server was started specifically for snapshot extraction, make sure to stop the server process or terminate the background task once extraction is completed.\n\n\n### Script Flags\n\n| Flag | Default | Description |\n| :--- | :--- | :--- |\n| `--url` | *(required)* | URL to capture |\n| `--output` | *(required)* | Output file path |\n| `--wait` | `1000` | Extra wait (ms) after network idle. Increase for lazy-loading apps. |\n| `--viewport` | `1280x800` | Viewport size as `WIDTHxHEIGHT` |\n| `--html-class` | — | Class(es) for `\u003Chtml>` element (e.g., `dark`) |\n| `--remove-fixed` | `false` | Remove fixed\u002Fsticky elements (cookie banners, chat widgets) |\n| `--full-height` | `false` | Resize viewport to full scroll height |\n| `--title` | — | Override page title (set to the route path, e.g. `\u002Fdashboard` or `\u002Fsettings\u002Fprofile`) |\n| `--auth-script` | — | Path to a JS\u002FTS module that exports a default `async (page) => void` function for authentication |\n| `--inline-canvas` | `false` | Convert `\u003Ccanvas>` elements (ECharts, Chart.js, D3) to base64 `\u003Cimg>` tags |\n\n### What It Does Automatically\n\n- Captures all CSSOM rules from `document.styleSheets` (preserves dynamic Vite\u002FTailwind dev styles and CSS-in-JS)\n- Inlines all `\u003Clink rel=\"stylesheet\">` → `\u003Cstyle>` blocks\n- Converts `\u003Cimg>` `src` **and `srcset`** → base64 data URIs (skips external fonts)\n- Inlines same-origin and relative icon font files (`@font-face`) as base64 data URIs so ligatures never render as ASCII text\n- Inlines `\u003Csource srcset>` URLs as base64\n- Removes failed\u002Fdead `srcset` entries so the browser falls back to the inlined `src`\n- Removes `\u003Cscript>` tags, Vite HMR dev style blocks (`createHotContext`, `import.meta.hot`), and dev overlays\n- Resolves relative CSS `url()` paths before inlining\n\n### Framework Notes\n\n| Framework | Notes |\n| :--- | :--- |\n| **React + Vite** | Works out of the box. `--wait 1000`. |\n| **Next.js** | `--wait 3000` for SSR hydration. URL: `http:\u002F\u002Flocalhost:3000`. `\u003Cimg srcset>` from `\u002F_next\u002Fimage` is auto-inlined as base64. |\n| **Angular (@angular\u002Fcli \u002F v17+)** | Works out of the box with `ng serve` (default URL: `http:\u002F\u002Flocalhost:4200`). `--wait 2000` for Angular Material \u002F PrimeNG animation hydration and lazy-loaded routes. |\n| **Vue \u002F Nuxt** | Works out of the box. |\n| **Svelte \u002F SvelteKit** | Works out of the box. |\n| **Storybook** | Use story URL: `--url http:\u002F\u002Flocalhost:6006\u002F?path=\u002Fstory\u002F...` |\n| **SSR (Webpack)** | May need longer `--wait`. |\n\n### Troubleshooting\n\n| Issue | Solution |\n| :--- | :--- |\n| Images missing | Increase `--wait` |\n| Images show as broken after server stops | Verify `srcset` was inlined — check log for \"Inlined N images\". If `srcset` URLs failed, they are auto-removed so `src` (inlined) is used. |\n| Icons display as text \u002F Serif unstyled font | Ensure `snapshot.ts` captures CSSOM from `document.styleSheets` (step 0) and same-origin icon fonts (`@font-face`) are inlined as base64 data URIs. |\n| Next.js `\u002F_next\u002Fimage` not inlined | Ensure the dev server is running when snapshot runs — the script fetches optimized images from the running server. |\n| Dark mode not applied | `--html-class dark` |\n| Cookie banner in output | `--remove-fixed` |\n| Page requires login | Use `--auth-script .\u002Fauth.ts` (see Auth-Gated Pages below) |\n| Charts\u002Fgraphs show as blank boxes | Use `--inline-canvas` to serialize `\u003Ccanvas>` to base64 `\u003Cimg>` |\n| `Cannot find module 'puppeteer'` | `npm install -g puppeteer` |\n\n### Auth-Gated Pages\n\nFor apps with login guards (Vue Router `beforeEach`, React `ProtectedRoute`, etc.), create a small auth script that runs in the Puppeteer session:\n\n```ts\n\u002F\u002F auth-myapp.ts\nimport type { Page } from 'puppeteer';\n\nexport default async function authenticate(page: Page) {\n  \u002F\u002F Example 1: Fill and submit a login form\n  await page.type('#username', 'admin');\n  await page.type('#password', 'password123');\n  await page.click('#login-button');\n  await page.waitForNavigation({ waitUntil: 'networkidle2' });\n\n  \u002F\u002F Example 2: Inject cookies\u002FlocalStorage directly\n  \u002F\u002F await page.evaluate(() => {\n  \u002F\u002F   localStorage.setItem('token', 'mock-jwt-token');\n  \u002F\u002F });\n\n  \u002F\u002F Example 3: Call the app's own login API via module injection (Vue\u002FVite)\n  \u002F\u002F await page.evaluate(() => {\n  \u002F\u002F   return new Promise((resolve) => {\n  \u002F\u002F     const script = document.createElement('script');\n  \u002F\u002F     script.type = 'module';\n  \u002F\u002F     script.textContent = `\n  \u002F\u002F       import { useUserStore } from '\u002Fsrc\u002Fstore\u002Fmodules\u002Fuser.ts';\n  \u002F\u002F       import { fetchLogin } from '\u002Fsrc\u002Fapi\u002Fauth.ts';\n  \u002F\u002F       const res = await fetchLogin({ userName: 'Admin', password: '123456' });\n  \u002F\u002F       useUserStore().setToken(res.token, res.refreshToken);\n  \u002F\u002F       window.dispatchEvent(new CustomEvent('auth-done'));\n  \u002F\u002F     `;\n  \u002F\u002F     document.head.appendChild(script);\n  \u002F\u002F     window.addEventListener('auth-done', () => resolve(true), { once: true });\n  \u002F\u002F   });\n  \u002F\u002F });\n}\n```\n\nThen use it:\n```bash\nnpx tsx \u003CSKILL_DIR>\u002Fscripts\u002Fsnapshot.ts \\\n  --url http:\u002F\u002Flocalhost:5173\u002F#\u002Fdashboard \\\n  --output .stitch\u002Fdashboard.html \\\n  --auth-script .\u002Fauth-myapp.ts \\\n  --inline-canvas \\\n  --wait 5000\n```\n\nThe script navigates to the `--url` first (which may redirect to login), runs your auth function, then **re-navigates** to the original `--url` with the authenticated session.\n\n***\n\n## Strategy B: Browser Subagent Capture\n\nUse when you need to **interact with the page** (click buttons, fill forms, navigate tabs) before capturing. The browser subagent gives you full control but output may truncate for large pages.\n\n### Workflow\n\n1.  **Start the App** locally.\n2.  **Navigate** using a browser subagent.\n3.  **Interact** as needed (click, scroll, fill forms).\n4.  **Extract DOM**: `document.documentElement.outerHTML`\n\n    > [!WARNING]\n    > Large pages may truncate. To handle this:\n    > - Remove `\u003Cstyle>` tags before extraction: `document.querySelectorAll('style').forEach(el => el.remove())`\n    > - Re-add styles statically (Tailwind CDN link, source CSS)\n5.  **Save** to file.\n\n***\n\n## Appendix: Static Fallback (MockPage.jsx)\n\n> [!NOTE]\n> This method is a **last resort** for when the app cannot run locally (broken deps, missing backend, auth walls with no bypass). It requires manually flattening React components into a single JSX file. **Prefer Strategy A whenever possible.**\n\n### When to Use\n\n- App can't run locally at all\n- Page requires auth with no mock\u002Fbypass\n- You need a specific UI state that's impossible to reach by navigation (error screens, empty states)\n\n### Quick Reference\n\n```bash\nnpx tsx \u003CSKILL_DIR>\u002Fscripts\u002Fextract_inline_html.ts \\\n  --index-css src\u002Fcss\u002FApp.css \\\n  --extra-css index.html \\\n  --outdir .stitch \\\n  --page src\u002FMockPage.jsx:Page.html:\"Page Title\"\n```\n\n**Key flags**: `--no-tailwind` (non-Tailwind apps), `--html-class dark` (dark mode), `--css-files` (extra CSS files).\n\n**Auto-detection**: Tailwind config is auto-detected. `@apply` directives automatically use `\u003Cstyle type=\"text\u002Ftailwindcss\">`.\n\n### MockPage.jsx Rules\n\n1. **Include the full layout** — header, sidebar, footer (read `App.js` first)\n2. **Flatten all conditionals** — pick one state, remove all ternaries and `&&` guards\n3. **Hardcode all data** — replace `{variable}` with concrete values, unroll `.map()` loops\n4. **Preserve logos** — use `\u003Cimg>` with local paths (post-process will inline them)\n5. **Remove floating elements** — cookie banners, chat widgets, feedback buttons\n\n### Post-Processing\n\nInline local images:\n```bash\nnpx tsx \u003CSKILL_DIR>\u002Fscripts\u002Fpost_process.ts \\\n  .stitch\u002FPage.html --base-dir \u003Capp-directory>\n```\n","# Extract Static HTML\n\nExtract a self-contained static HTML file from any web application.\n\n## Which Strategy to Use\n\nYou MUST ask the user to choose which strategy to use before proceeding. Present the options clearly, **recommend Strategy A** as the preferred default, and **provide a brief pros\u002Fcons summary** for each option to help them make an informed decision.\n\n| | Strategy A (Puppeteer) | Strategy B (Browser Subagent) |\n| :--- | :--- | :--- |\n| **When** | App runs locally, no auth wall | Need to interact with page first (click, fill forms) |\n| **Fidelity** | **Highest — computed styles resolved** | High — rendered DOM |\n| **Setup** | **Zero — no mock needed** | Zero — no mock needed |\n| **Framework** | **Any** | Any |\n| **Output** | **Writes to file — no size limit** | May truncate in agent context |\n\n> [!WARNING]\n> **Checkpoint — User Confirmation Required.**\n> You **MUST** ask the user which strategy they prefer before proceeding.\n> Present the comparison table above, recommend Strategy A as the default, and\n> wait for explicit approval. Do **NOT** make the decision yourself or proceed\n> until the user confirms.\n\n***\n\n## Strategy A: Puppeteer Snapshot (Recommended)\n\nLaunches headless Chrome, captures the fully rendered DOM, and produces a self-contained HTML file with all CSS inlined and images as base64. Works with **any framework** — no MockPage.jsx needed.\n\n### Prerequisites\n\n- App running locally (e.g., `npm run dev`)\n- Node.js with `puppeteer` available (check: `node -e \"require('puppeteer')\"`)\n\n### Workflow\n\n1.  **Start the App** and note the port.\n\n    > [!WARNING]\n    > **Checkpoint — User Confirmation Required.**\n    > After starting the local server, you **MUST** pause and ask the user for\n    > confirmation before running the snapshot script or launching a browser\n    > subagent. Report the URL and port to the user so they can verify the app\n    > is running and rendering correctly. Do **NOT** proceed to the snapshot\n    > step until the user confirms.\n\n2.  **Run the Snapshot Script**:\n    ```bash\n    npx tsx \u003CSKILL_DIR>\u002Fscripts\u002Fsnapshot.ts \\\n      --url http:\u002F\u002Flocalhost:5173 \\\n      --output .stitch\u002Fhome.html \\\n      --wait 2000\n    ```\n\n3.  **Multiple pages** — run once per route:\n    ```bash\n    npx tsx \u003CSKILL_DIR>\u002Fscripts\u002Fsnapshot.ts \\\n      --url http:\u002F\u002Flocalhost:5173 --output .stitch\u002Fhome.html --wait 2000\n    npx tsx \u003CSKILL_DIR>\u002Fscripts\u002Fsnapshot.ts \\\n      --url http:\u002F\u002Flocalhost:5173\u002Fpricing --output .stitch\u002Fpricing.html --wait 2000\n    npx tsx \u003CSKILL_DIR>\u002Fscripts\u002Fsnapshot.ts \\\n      --url http:\u002F\u002Flocalhost:5173\u002Fdashboard --output .stitch\u002Fdashboard.html --wait 2000 --html-class dark\n    ```\n\n4.  **Clean Up Dev Server**:\n    If a local dev server was started specifically for snapshot extraction, make sure to stop the server process or terminate the background task once extraction is completed.\n\n\n### Script Flags\n\n| Flag | Default | Description |\n| :--- | :--- | :--- |\n| `--url` | *(required)* | URL to capture |\n| `--output` | *(required)* | Output file path |\n| `--wait` | `1000` | Extra wait (ms) after network idle. Increase for lazy-loading apps. |\n| `--viewport` | `1280x800` | Viewport size as `WIDTHxHEIGHT` |\n| `--html-class` | — | Class(es) for `\u003Chtml>` element (e.g., `dark`) |\n| `--remove-fixed` | `false` | Remove fixed\u002Fsticky elements (cookie banners, chat widgets) |\n| `--full-height` | `false` | Resize viewport to full scroll height |\n| `--title` | — | Override page title (set to the route path, e.g. `\u002Fdashboard` or `\u002Fsettings\u002Fprofile`) |\n| `--auth-script` | — | Path to a JS\u002FTS module that exports a default `async (page) => void` function for authentication |\n| `--inline-canvas` | `false` | Convert `\u003Ccanvas>` elements (ECharts, Chart.js, D3) to base64 `\u003Cimg>` tags |\n\n### What It Does Automatically\n\n- Captures all CSSOM rules from `document.styleSheets` (preserves dynamic Vite\u002FTailwind dev styles and CSS-in-JS)\n- Inlines all `\u003Clink rel=\"stylesheet\">` → `\u003Cstyle>` blocks\n- Converts `\u003Cimg>` `src` **and `srcset`** → base64 data URIs (skips external fonts)\n- Inlines same-origin and relative icon font files (`@font-face`) as base64 data URIs so ligatures never render as ASCII text\n- Inlines `\u003Csource srcset>` URLs as base64\n- Removes failed\u002Fdead `srcset` entries so the browser falls back to the inlined `src`\n- Removes `\u003Cscript>` tags, Vite HMR dev style blocks (`createHotContext`, `import.meta.hot`), and dev overlays\n- Resolves relative CSS `url()` paths before inlining\n\n### Framework Notes\n\n| Framework | Notes |\n| :--- | :--- |\n| **React + Vite** | Works out of the box. `--wait 1000`. |\n| **Next.js** | `--wait 3000` for SSR hydration. URL: `http:\u002F\u002Flocalhost:3000`. `\u003Cimg srcset>` from `\u002F_next\u002Fimage` is auto-inlined as base64. |\n| **Angular (@angular\u002Fcli \u002F v17+)** | Works out of the box with `ng serve` (default URL: `http:\u002F\u002Flocalhost:4200`). `--wait 2000` for Angular Material \u002F PrimeNG animation hydration and lazy-loaded routes. |\n| **Vue \u002F Nuxt** | Works out of the box. |\n| **Svelte \u002F SvelteKit** | Works out of the box. |\n| **Storybook** | Use story URL: `--url http:\u002F\u002Flocalhost:6006\u002F?path=\u002Fstory\u002F...` |\n| **SSR (Webpack)** | May need longer `--wait`. |\n\n### Troubleshooting\n\n| Issue | Solution |\n| :--- | :--- |\n| Images missing | Increase `--wait` |\n| Images show as broken after server stops | Verify `srcset` was inlined — check log for \"Inlined N images\". If `srcset` URLs failed, they are auto-removed so `src` (inlined) is used. |\n| Icons display as text \u002F Serif unstyled font | Ensure `snapshot.ts` captures CSSOM from `document.styleSheets` (step 0) and same-origin icon fonts (`@font-face`) are inlined as base64 data URIs. |\n| Next.js `\u002F_next\u002Fimage` not inlined | Ensure the dev server is running when snapshot runs — the script fetches optimized images from the running server. |\n| Dark mode not applied | `--html-class dark` |\n| Cookie banner in output | `--remove-fixed` |\n| Page requires login | Use `--auth-script .\u002Fauth.ts` (see Auth-Gated Pages below) |\n| Charts\u002Fgraphs show as blank boxes | Use `--inline-canvas` to serialize `\u003Ccanvas>` to base64 `\u003Cimg>` |\n| `Cannot find module 'puppeteer'` | `npm install -g puppeteer` |\n\n### Auth-Gated Pages\n\nFor apps with login guards (Vue Router `beforeEach`, React `ProtectedRoute`, etc.), create a small auth script that runs in the Puppeteer session:\n\n```ts\n\u002F\u002F auth-myapp.ts\nimport type { Page } from 'puppeteer';\n\nexport default async function authenticate(page: Page) {\n  \u002F\u002F Example 1: Fill and submit a login form\n  await page.type('#username', 'admin');\n  await page.type('#password', 'password123');\n  await page.click('#login-button');\n  await page.waitForNavigation({ waitUntil: 'networkidle2' });\n\n  \u002F\u002F Example 2: Inject cookies\u002FlocalStorage directly\n  \u002F\u002F await page.evaluate(() => {\n  \u002F\u002F   localStorage.setItem('token', 'mock-jwt-token');\n  \u002F\u002F });\n\n  \u002F\u002F Example 3: Call the app's own login API via module injection (Vue\u002FVite)\n  \u002F\u002F await page.evaluate(() => {\n  \u002F\u002F   return new Promise((resolve) => {\n  \u002F\u002F     const script = document.createElement('script');\n  \u002F\u002F     script.type = 'module';\n  \u002F\u002F     script.textContent = `\n  \u002F\u002F       import { useUserStore } from '\u002Fsrc\u002Fstore\u002Fmodules\u002Fuser.ts';\n  \u002F\u002F       import { fetchLogin } from '\u002Fsrc\u002Fapi\u002Fauth.ts';\n  \u002F\u002F       const res = await fetchLogin({ userName: 'Admin', password: '123456' });\n  \u002F\u002F       useUserStore().setToken(res.token, res.refreshToken);\n  \u002F\u002F       window.dispatchEvent(new CustomEvent('auth-done'));\n  \u002F\u002F     `;\n  \u002F\u002F     document.head.appendChild(script);\n  \u002F\u002F     window.addEventListener('auth-done', () => resolve(true), { once: true });\n  \u002F\u002F   });\n  \u002F\u002F });\n}\n```\n\nThen use it:\n```bash\nnpx tsx \u003CSKILL_DIR>\u002Fscripts\u002Fsnapshot.ts \\\n  --url http:\u002F\u002Flocalhost:5173\u002F#\u002Fdashboard \\\n  --output .stitch\u002Fdashboard.html \\\n  --auth-script .\u002Fauth-myapp.ts \\\n  --inline-canvas \\\n  --wait 5000\n```\n\nThe script navigates to the `--url` first (which may redirect to login), runs your auth function, then **re-navigates** to the original `--url` with the authenticated session.\n\n***\n\n## Strategy B: Browser Subagent Capture\n\nUse when you need to **interact with the page** (click buttons, fill forms, navigate tabs) before capturing. The browser subagent gives you full control but output may truncate for large pages.\n\n### Workflow\n\n1.  **Start the App** locally.\n2.  **Navigate** using a browser subagent.\n3.  **Interact** as needed (click, scroll, fill forms).\n4.  **Extract DOM**: `document.documentElement.outerHTML`\n\n    > [!WARNING]\n    > Large pages may truncate. To handle this:\n    > - Remove `\u003Cstyle>` tags before extraction: `document.querySelectorAll('style').forEach(el => el.remove())`\n    > - Re-add styles statically (Tailwind CDN link, source CSS)\n5.  **Save** to file.\n\n***\n\n## Appendix: Static Fallback (MockPage.jsx)\n\n> [!NOTE]\n> This method is a **last resort** for when the app cannot run locally (broken deps, missing backend, auth walls with no bypass). It requires manually flattening React components into a single JSX file. **Prefer Strategy A whenever possible.**\n\n### When to Use\n\n- App can't run locally at all\n- Page requires auth with no mock\u002Fbypass\n- You need a specific UI state that's impossible to reach by navigation (error screens, empty states)\n\n### Quick Reference\n\n```bash\nnpx tsx \u003CSKILL_DIR>\u002Fscripts\u002Fextract_inline_html.ts \\\n  --index-css src\u002Fcss\u002FApp.css \\\n  --extra-css index.html \\\n  --outdir .stitch \\\n  --page src\u002FMockPage.jsx:Page.html:\"Page Title\"\n```\n\n**Key flags**: `--no-tailwind` (non-Tailwind apps), `--html-class dark` (dark mode), `--css-files` (extra CSS files).\n\n**Auto-detection**: Tailwind config is auto-detected. `@apply` directives automatically use `\u003Cstyle type=\"text\u002Ftailwindcss\">`.\n\n### MockPage.jsx Rules\n\n1. **Include the full layout** — header, sidebar, footer (read `App.js` first)\n2. **Flatten all conditionals** — pick one state, remove all ternaries and `&&` guards\n3. **Hardcode all data** — replace `{variable}` with concrete values, unroll `.map()` loops\n4. **Preserve logos** — use `\u003Cimg>` with local paths (post-process will inline them)\n5. **Remove floating elements** — cookie banners, chat widgets, feedback buttons\n\n### Post-Processing\n\nInline local images:\n```bash\nnpx tsx \u003CSKILL_DIR>\u002Fscripts\u002Fpost_process.ts \\\n  .stitch\u002FPage.html --base-dir \u003Capp-directory>\n```\n",{"name":5,"description":7,"allowed-tools":24},[25,26,27,28,29],"stitch*:*","Bash","Read","Write","web_fetch","main","46209ae875b23589c19befc213c303406d14334d","skills\u002Fstitch-extract-static-html",0,"https:\u002F\u002Fgithub.com\u002Fmahik504\u002Forchestra-workflow","https:\u002F\u002Fgithub.com\u002Fmahik504","2026-11-13 18:13:16",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add mahik504\u002Forchestra-workflow --skill \"stitch::extract-static-html\"",{"tool":43,"command":44},"bunx","bunx skills add mahik504\u002Forchestra-workflow --skill \"stitch::extract-static-html\"",{"tool":46,"command":47},"pnpm","pnpm dlx skills add mahik504\u002Forchestra-workflow --skill \"stitch::extract-static-html\"","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmahik504\u002Forchestra-workflow\u002Fblob\u002Fmain\u002Fskills\u002Fstitch-extract-static-html\u002FSKILL.md",true,[51,57,61],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"scripts\u002Fextract_inline_html.ts","SCRIPT","脚本",34450,"https:\u002F\u002Fgithub.com\u002Fmahik504\u002Forchestra-workflow\u002Fblob\u002Fmain\u002Fskills\u002Fstitch-extract-static-html\u002Fscripts\u002Fextract_inline_html.ts",{"path":58,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":59,"sourceHtmlUrl":60},"scripts\u002Fpost_process.ts",14295,"https:\u002F\u002Fgithub.com\u002Fmahik504\u002Forchestra-workflow\u002Fblob\u002Fmain\u002Fskills\u002Fstitch-extract-static-html\u002Fscripts\u002Fpost_process.ts",{"path":62,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":63,"sourceHtmlUrl":64},"scripts\u002Fsnapshot.ts",54743,"https:\u002F\u002Fgithub.com\u002Fmahik504\u002Forchestra-workflow\u002Fblob\u002Fmain\u002Fskills\u002Fstitch-extract-static-html\u002Fscripts\u002Fsnapshot.ts",[66,74,83,90,98,106],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":70,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M7ATAT5KQ106HYZC60TJ6SXK","writing-skills","Use when creating new skills, editing existing skills, or verifying skills work before deployment","https:\u002F\u002Fgithub.com\u002Fmahik504\u002Forchestra-workflow\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-skills\u002FLICENSE.superpowers","https:\u002F\u002Fgithub.com\u002Fmahik504\u002Forchestra-workflow\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-skills\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":79,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7ATANN9YAGPJES4BEBC8GKK","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmahik504\u002Forchestra-workflow\u002Fblob\u002Fmain\u002Fskills\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmahik504\u002Forchestra-workflow\u002Fblob\u002Fmain\u002Fskills\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7ATAGXKX55X2XG8BFY71HJB","web-design-guidelines","Review UI code for Web Interface Guidelines compliance. Use when asked to \"review my UI\", \"check accessibility\", \"audit design\", \"review UX\", or \"check my site against best practices\". Do not load on Plan-only or backend-only jobs.","https:\u002F\u002Fgithub.com\u002Fmahik504\u002Forchestra-workflow\u002Fblob\u002Fmain\u002Fskills\u002Fweb-design-guidelines\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":94,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M7ATACA5MVF8FG4C5JTT5ERD","verification-before-completion","Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always","https:\u002F\u002Fgithub.com\u002Fmahik504\u002Forchestra-workflow\u002Fblob\u002Fmain\u002Fskills\u002Fverification-before-completion\u002FLICENSE.superpowers","https:\u002F\u002Fgithub.com\u002Fmahik504\u002Forchestra-workflow\u002Fblob\u002Fmain\u002Fskills\u002Fverification-before-completion\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":102,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":19},"01M7ATA7J6SQHX9ESPBW96T28V","using-git-worktrees","Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback","https:\u002F\u002Fgithub.com\u002Fmahik504\u002Forchestra-workflow\u002Fblob\u002Fmain\u002Fskills\u002Fusing-git-worktrees\u002FLICENSE.superpowers","https:\u002F\u002Fgithub.com\u002Fmahik504\u002Forchestra-workflow\u002Fblob\u002Fmain\u002Fskills\u002Fusing-git-worktrees\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":110,"licenseFileUrl":111,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":19},"01M7ATA0N5YPZ4Q2BJ9QA4TZAX","unslop","Turns vibecoded, AI-looking UI into a designed interface with its own character. Finds a direction from the product itself, then fixes spacing, color, icons, copy, type, layout, details, visuals and motion in that order, and can generate a real hero visual with an image tool when one is available. Use when the user asks to unslop, polish, clean up or redesign a screen so it stops looking AI-generated, or when a UI shows the usual tells like purple gradients, glows, gradient text, emoji labels, \"New ✨\" badges, glossy blobs, uppercase tracked labels, pulsing elements or uneven spacing. Works on React, Tailwind, HTML and CSS, for dashboards, apps and landing pages.","CC-BY-4.0","https:\u002F\u002Fgithub.com\u002Fmahik504\u002Forchestra-workflow\u002Fblob\u002Fmain\u002Fskills\u002Funslop\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fmahik504\u002Forchestra-workflow\u002Fblob\u002Fmain\u002Fskills\u002Funslop\u002FSKILL.md",[],[]]