launchframe 0.4.12 → 0.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "snapshot",
3
+ "description": "Verbatim page snapshot — run inspect:page, copy document.html to public/captured/, and show it on the home route via a full-viewport iframe (not a React rebuild).",
4
+ "prompt": "\n# Snapshot (`/snapshot`)\n\n**`/snapshot`** serves a **frozen copy** of a live URL: the captured **`document.html`** from Playwright lives under **`public/captured/`** and **`src/app/page.tsx`** embeds it in a **full-viewport iframe**. This is **verbatim hosting**, not **`/launchframe`** (no component rebuild, no SaaS overlay, no Phase 6 verification).\n\nParse **the reference URL the user passed with /snapshot**:\n\n1. **URL** — Exactly one `http://` or `https://` URL. If the user omitted it, ask once. If multiple URLs appear, use the **first** only and say you are snapshotting that one.\n\n## Step 1 — Persist the source URL\n\nUpdate **`src/lib/launchframe-config.ts`**:\n\n- Set **`LAUNCHFRAME_SOURCE_URL`** to the parsed URL (string, `as const`).\n\n## Step 2 — Capture (mandatory)\n\nFrom the repository root, run **once** for that URL (same inspector as Launchframe Step 0a). Use the URL’s **hostname** for the output parent (example: `https://www.example.com/path` → `www.example.com`):\n\n1. **One-time per machine:** `npx playwright install chromium` if captures fail for missing browsers.\n2. **Capture:**\n\n```bash\nnpm run inspect:page -- \"<URL>\" --scroll-full --wait-until networkidle --timeout 120000 --out-parent \"docs/research/<hostname>/page-inspection\"\n```\n\nThis creates `docs/research/<hostname>/page-inspection/<hostname>-<iso-stamp>/` with **`document.html`** and related artifacts.\n\nIf navigation times out, retry with `--wait-until domcontentloaded` or a higher `--timeout`, and record what worked.\n\n## Step 3 — Verbatim copy to `public`\n\n1. Ensure **`public/captured/`** exists.\n2. Pick the **latest** inspection folder under that hostname (sort by the ISO stamp in the folder name).\n3. **Copy** (do not prettify or edit) **`document.html`** from that folder to:\n\n **`public/captured/<host-slug>-document.html`**\n\n where **`<host-slug>`** is the URL hostname with each **`.`** replaced by **`-`** (e.g. `www.example.com` → `www-example-com`).\n\nSame-origin scripts and inline styles stay inside the file; external URLs (CDNs) remain as in the capture.\n\n## Step 4 — Home page iframe\n\nReplace **`src/app/page.tsx`** with a single full-viewport iframe **only** (no `sandbox` — it breaks many real pages):\n\n```tsx\nexport default function Home() {\n return (\n <iframe\n src=\"/captured/<host-slug>-document.html\"\n title=\"Captured snapshot\"\n className=\"fixed inset-0 h-dvh w-dvw border-0\"\n />\n );\n}\n```\n\nUse the same **`<host-slug>`** as in Step 3.\n\n## Step 5 — Verify\n\nRun **`npm run build`** and fix any errors.\n\n## What to tell the user\n\nAfter **`npm run dev`**:\n\n- **Iframe:** `http://localhost:3000/`\n- **Direct static file:** `http://localhost:3000/captured/<host-slug>-document.html`\n\n## What not to do\n\n- Do **not** treat this as **`/launchframe`** (no parallel component specs, no `docs/research/LAUNCHFRAME_SUBAGENTS.md` runs for snapshot).\n- Do **not** hand-rebuild the page in React for this command.\n- Do **not** add `sandbox` on the iframe unless the user explicitly asks and accepts broken script behavior.\n",
5
+ "fileContext": [
6
+ "AGENTS.md",
7
+ "docs/research/**"
8
+ ]
9
+ }
@@ -0,0 +1,83 @@
1
+ ---
2
+ description: "Verbatim page snapshot — run inspect:page, copy document.html to public/captured/, and show it on the home route via a full-viewport iframe (not a React rebuild)."
3
+ argument-hint: "<url>"
4
+ ---
5
+ <!-- AUTO-GENERATED from .claude/skills/snapshot/SKILL.md — do not edit directly.
6
+ Run `node scripts/sync-skills.mjs` to regenerate. -->
7
+
8
+
9
+ # Snapshot (`/snapshot`)
10
+
11
+ **`/snapshot`** serves a **frozen copy** of a live URL: the captured **`document.html`** from Playwright lives under **`public/captured/`** and **`src/app/page.tsx`** embeds it in a **full-viewport iframe**. This is **verbatim hosting**, not **`/launchframe`** (no component rebuild, no SaaS overlay, no Phase 6 verification).
12
+
13
+ Parse **$ARGUMENTS**:
14
+
15
+ 1. **URL** — Exactly one `http://` or `https://` URL. If the user omitted it, ask once. If multiple URLs appear, use the **first** only and say you are snapshotting that one.
16
+
17
+ ## Step 1 — Persist the source URL
18
+
19
+ Update **`src/lib/launchframe-config.ts`**:
20
+
21
+ - Set **`LAUNCHFRAME_SOURCE_URL`** to the parsed URL (string, `as const`).
22
+
23
+ ## Step 2 — Capture (mandatory)
24
+
25
+ From the repository root, run **once** for that URL (same inspector as Launchframe Step 0a). Use the URL’s **hostname** for the output parent (example: `https://www.example.com/path` → `www.example.com`):
26
+
27
+ 1. **One-time per machine:** `npx playwright install chromium` if captures fail for missing browsers.
28
+ 2. **Capture:**
29
+
30
+ ```bash
31
+ npm run inspect:page -- "<URL>" --scroll-full --wait-until networkidle --timeout 120000 --out-parent "docs/research/<hostname>/page-inspection"
32
+ ```
33
+
34
+ This creates `docs/research/<hostname>/page-inspection/<hostname>-<iso-stamp>/` with **`document.html`** and related artifacts.
35
+
36
+ If navigation times out, retry with `--wait-until domcontentloaded` or a higher `--timeout`, and record what worked.
37
+
38
+ ## Step 3 — Verbatim copy to `public`
39
+
40
+ 1. Ensure **`public/captured/`** exists.
41
+ 2. Pick the **latest** inspection folder under that hostname (sort by the ISO stamp in the folder name).
42
+ 3. **Copy** (do not prettify or edit) **`document.html`** from that folder to:
43
+
44
+ **`public/captured/<host-slug>-document.html`**
45
+
46
+ where **`<host-slug>`** is the URL hostname with each **`.`** replaced by **`-`** (e.g. `www.example.com` → `www-example-com`).
47
+
48
+ Same-origin scripts and inline styles stay inside the file; external URLs (CDNs) remain as in the capture.
49
+
50
+ ## Step 4 — Home page iframe
51
+
52
+ Replace **`src/app/page.tsx`** with a single full-viewport iframe **only** (no `sandbox` — it breaks many real pages):
53
+
54
+ ```tsx
55
+ export default function Home() {
56
+ return (
57
+ <iframe
58
+ src="/captured/<host-slug>-document.html"
59
+ title="Captured snapshot"
60
+ className="fixed inset-0 h-dvh w-dvw border-0"
61
+ />
62
+ );
63
+ }
64
+ ```
65
+
66
+ Use the same **`<host-slug>`** as in Step 3.
67
+
68
+ ## Step 5 — Verify
69
+
70
+ Run **`npm run build`** and fix any errors.
71
+
72
+ ## What to tell the user
73
+
74
+ After **`npm run dev`**:
75
+
76
+ - **Iframe:** `http://localhost:3000/`
77
+ - **Direct static file:** `http://localhost:3000/captured/<host-slug>-document.html`
78
+
79
+ ## What not to do
80
+
81
+ - Do **not** treat this as **`/launchframe`** (no parallel component specs, no `docs/research/LAUNCHFRAME_SUBAGENTS.md` runs for snapshot).
82
+ - Do **not** hand-rebuild the page in React for this command.
83
+ - Do **not** add `sandbox` on the iframe unless the user explicitly asks and accepts broken script behavior.
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: snapshot
3
+ description: Verbatim page snapshot — run inspect:page, copy document.html to public/captured/, and show it on the home route via a full-viewport iframe (not a React rebuild).
4
+ argument-hint: "<url>"
5
+ argument-substitution: the reference URL the user passed with /snapshot
6
+ user-invocable: true
7
+ ---
8
+
9
+ # Snapshot (`/snapshot`)
10
+
11
+ **`/snapshot`** serves a **frozen copy** of a live URL: the captured **`document.html`** from Playwright lives under **`public/captured/`** and **`src/app/page.tsx`** embeds it in a **full-viewport iframe**. This is **verbatim hosting**, not **`/launchframe`** (no component rebuild, no SaaS overlay, no Phase 6 verification).
12
+
13
+ Parse **$ARGUMENTS**:
14
+
15
+ 1. **URL** — Exactly one `http://` or `https://` URL. If the user omitted it, ask once. If multiple URLs appear, use the **first** only and say you are snapshotting that one.
16
+
17
+ ## Step 1 — Persist the source URL
18
+
19
+ Update **`src/lib/launchframe-config.ts`**:
20
+
21
+ - Set **`LAUNCHFRAME_SOURCE_URL`** to the parsed URL (string, `as const`).
22
+
23
+ ## Step 2 — Capture (mandatory)
24
+
25
+ From the repository root, run **once** for that URL (same inspector as Launchframe Step 0a). Use the URL’s **hostname** for the output parent (example: `https://www.example.com/path` → `www.example.com`):
26
+
27
+ 1. **One-time per machine:** `npx playwright install chromium` if captures fail for missing browsers.
28
+ 2. **Capture:**
29
+
30
+ ```bash
31
+ npm run inspect:page -- "<URL>" --scroll-full --wait-until networkidle --timeout 120000 --out-parent "docs/research/<hostname>/page-inspection"
32
+ ```
33
+
34
+ This creates `docs/research/<hostname>/page-inspection/<hostname>-<iso-stamp>/` with **`document.html`** and related artifacts.
35
+
36
+ If navigation times out, retry with `--wait-until domcontentloaded` or a higher `--timeout`, and record what worked.
37
+
38
+ ## Step 3 — Verbatim copy to `public`
39
+
40
+ 1. Ensure **`public/captured/`** exists.
41
+ 2. Pick the **latest** inspection folder under that hostname (sort by the ISO stamp in the folder name).
42
+ 3. **Copy** (do not prettify or edit) **`document.html`** from that folder to:
43
+
44
+ **`public/captured/<host-slug>-document.html`**
45
+
46
+ where **`<host-slug>`** is the URL hostname with each **`.`** replaced by **`-`** (e.g. `www.example.com` → `www-example-com`).
47
+
48
+ Same-origin scripts and inline styles stay inside the file; external URLs (CDNs) remain as in the capture.
49
+
50
+ ## Step 4 — Home page iframe
51
+
52
+ Replace **`src/app/page.tsx`** with a single full-viewport iframe **only** (no `sandbox` — it breaks many real pages):
53
+
54
+ ```tsx
55
+ export default function Home() {
56
+ return (
57
+ <iframe
58
+ src="/captured/<host-slug>-document.html"
59
+ title="Captured snapshot"
60
+ className="fixed inset-0 h-dvh w-dvw border-0"
61
+ />
62
+ );
63
+ }
64
+ ```
65
+
66
+ Use the same **`<host-slug>`** as in Step 3.
67
+
68
+ ## Step 5 — Verify
69
+
70
+ Run **`npm run build`** and fix any errors.
71
+
72
+ ## What to tell the user
73
+
74
+ After **`npm run dev`**:
75
+
76
+ - **Iframe:** `http://localhost:3000/`
77
+ - **Direct static file:** `http://localhost:3000/captured/<host-slug>-document.html`
78
+
79
+ ## What not to do
80
+
81
+ - Do **not** treat this as **`/launchframe`** (no parallel component specs, no `docs/research/LAUNCHFRAME_SUBAGENTS.md` runs for snapshot).
82
+ - Do **not** hand-rebuild the page in React for this command.
83
+ - Do **not** add `sandbox` on the iframe unless the user explicitly asks and accepts broken script behavior.
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: snapshot
3
+ description: Verbatim page snapshot — run inspect:page, copy document.html to public/captured/, and show it on the home route via a full-viewport iframe (not a React rebuild).
4
+ argument-hint: "<url>"
5
+ argument-substitution: the reference URL the user passed with /snapshot
6
+ user-invocable: true
7
+ ---
8
+
9
+ # Snapshot (`/snapshot`)
10
+
11
+ **`/snapshot`** serves a **frozen copy** of a live URL: the captured **`document.html`** from Playwright lives under **`public/captured/`** and **`src/app/page.tsx`** embeds it in a **full-viewport iframe**. This is **verbatim hosting**, not **`/launchframe`** (no component rebuild, no SaaS overlay, no Phase 6 verification).
12
+
13
+ Parse **$ARGUMENTS**:
14
+
15
+ 1. **URL** — Exactly one `http://` or `https://` URL. If the user omitted it, ask once. If multiple URLs appear, use the **first** only and say you are snapshotting that one.
16
+
17
+ ## Step 1 — Persist the source URL
18
+
19
+ Update **`src/lib/launchframe-config.ts`**:
20
+
21
+ - Set **`LAUNCHFRAME_SOURCE_URL`** to the parsed URL (string, `as const`).
22
+
23
+ ## Step 2 — Capture (mandatory)
24
+
25
+ From the repository root, run **once** for that URL (same inspector as Launchframe Step 0a). Use the URL’s **hostname** for the output parent (example: `https://www.example.com/path` → `www.example.com`):
26
+
27
+ 1. **One-time per machine:** `npx playwright install chromium` if captures fail for missing browsers.
28
+ 2. **Capture:**
29
+
30
+ ```bash
31
+ npm run inspect:page -- "<URL>" --scroll-full --wait-until networkidle --timeout 120000 --out-parent "docs/research/<hostname>/page-inspection"
32
+ ```
33
+
34
+ This creates `docs/research/<hostname>/page-inspection/<hostname>-<iso-stamp>/` with **`document.html`** and related artifacts.
35
+
36
+ If navigation times out, retry with `--wait-until domcontentloaded` or a higher `--timeout`, and record what worked.
37
+
38
+ ## Step 3 — Verbatim copy to `public`
39
+
40
+ 1. Ensure **`public/captured/`** exists.
41
+ 2. Pick the **latest** inspection folder under that hostname (sort by the ISO stamp in the folder name).
42
+ 3. **Copy** (do not prettify or edit) **`document.html`** from that folder to:
43
+
44
+ **`public/captured/<host-slug>-document.html`**
45
+
46
+ where **`<host-slug>`** is the URL hostname with each **`.`** replaced by **`-`** (e.g. `www.example.com` → `www-example-com`).
47
+
48
+ Same-origin scripts and inline styles stay inside the file; external URLs (CDNs) remain as in the capture.
49
+
50
+ ## Step 4 — Home page iframe
51
+
52
+ Replace **`src/app/page.tsx`** with a single full-viewport iframe **only** (no `sandbox` — it breaks many real pages):
53
+
54
+ ```tsx
55
+ export default function Home() {
56
+ return (
57
+ <iframe
58
+ src="/captured/<host-slug>-document.html"
59
+ title="Captured snapshot"
60
+ className="fixed inset-0 h-dvh w-dvw border-0"
61
+ />
62
+ );
63
+ }
64
+ ```
65
+
66
+ Use the same **`<host-slug>`** as in Step 3.
67
+
68
+ ## Step 5 — Verify
69
+
70
+ Run **`npm run build`** and fix any errors.
71
+
72
+ ## What to tell the user
73
+
74
+ After **`npm run dev`**:
75
+
76
+ - **Iframe:** `http://localhost:3000/`
77
+ - **Direct static file:** `http://localhost:3000/captured/<host-slug>-document.html`
78
+
79
+ ## What not to do
80
+
81
+ - Do **not** treat this as **`/launchframe`** (no parallel component specs, no `docs/research/LAUNCHFRAME_SUBAGENTS.md` runs for snapshot).
82
+ - Do **not** hand-rebuild the page in React for this command.
83
+ - Do **not** add `sandbox` on the iframe unless the user explicitly asks and accepts broken script behavior.
@@ -0,0 +1,84 @@
1
+ ---
2
+ name: snapshot
3
+ description: "Verbatim page snapshot — run inspect:page, copy document.html to public/captured/, and show it on the home route via a full-viewport iframe (not a React rebuild)."
4
+ invokable: true
5
+ ---
6
+ <!-- AUTO-GENERATED from .claude/skills/snapshot/SKILL.md — do not edit directly.
7
+ Run `node scripts/sync-skills.mjs` to regenerate. -->
8
+
9
+
10
+ # Snapshot (`/snapshot`)
11
+
12
+ **`/snapshot`** serves a **frozen copy** of a live URL: the captured **`document.html`** from Playwright lives under **`public/captured/`** and **`src/app/page.tsx`** embeds it in a **full-viewport iframe**. This is **verbatim hosting**, not **`/launchframe`** (no component rebuild, no SaaS overlay, no Phase 6 verification).
13
+
14
+ Parse **$ARGUMENTS**:
15
+
16
+ 1. **URL** — Exactly one `http://` or `https://` URL. If the user omitted it, ask once. If multiple URLs appear, use the **first** only and say you are snapshotting that one.
17
+
18
+ ## Step 1 — Persist the source URL
19
+
20
+ Update **`src/lib/launchframe-config.ts`**:
21
+
22
+ - Set **`LAUNCHFRAME_SOURCE_URL`** to the parsed URL (string, `as const`).
23
+
24
+ ## Step 2 — Capture (mandatory)
25
+
26
+ From the repository root, run **once** for that URL (same inspector as Launchframe Step 0a). Use the URL’s **hostname** for the output parent (example: `https://www.example.com/path` → `www.example.com`):
27
+
28
+ 1. **One-time per machine:** `npx playwright install chromium` if captures fail for missing browsers.
29
+ 2. **Capture:**
30
+
31
+ ```bash
32
+ npm run inspect:page -- "<URL>" --scroll-full --wait-until networkidle --timeout 120000 --out-parent "docs/research/<hostname>/page-inspection"
33
+ ```
34
+
35
+ This creates `docs/research/<hostname>/page-inspection/<hostname>-<iso-stamp>/` with **`document.html`** and related artifacts.
36
+
37
+ If navigation times out, retry with `--wait-until domcontentloaded` or a higher `--timeout`, and record what worked.
38
+
39
+ ## Step 3 — Verbatim copy to `public`
40
+
41
+ 1. Ensure **`public/captured/`** exists.
42
+ 2. Pick the **latest** inspection folder under that hostname (sort by the ISO stamp in the folder name).
43
+ 3. **Copy** (do not prettify or edit) **`document.html`** from that folder to:
44
+
45
+ **`public/captured/<host-slug>-document.html`**
46
+
47
+ where **`<host-slug>`** is the URL hostname with each **`.`** replaced by **`-`** (e.g. `www.example.com` → `www-example-com`).
48
+
49
+ Same-origin scripts and inline styles stay inside the file; external URLs (CDNs) remain as in the capture.
50
+
51
+ ## Step 4 — Home page iframe
52
+
53
+ Replace **`src/app/page.tsx`** with a single full-viewport iframe **only** (no `sandbox` — it breaks many real pages):
54
+
55
+ ```tsx
56
+ export default function Home() {
57
+ return (
58
+ <iframe
59
+ src="/captured/<host-slug>-document.html"
60
+ title="Captured snapshot"
61
+ className="fixed inset-0 h-dvh w-dvw border-0"
62
+ />
63
+ );
64
+ }
65
+ ```
66
+
67
+ Use the same **`<host-slug>`** as in Step 3.
68
+
69
+ ## Step 5 — Verify
70
+
71
+ Run **`npm run build`** and fix any errors.
72
+
73
+ ## What to tell the user
74
+
75
+ After **`npm run dev`**:
76
+
77
+ - **Iframe:** `http://localhost:3000/`
78
+ - **Direct static file:** `http://localhost:3000/captured/<host-slug>-document.html`
79
+
80
+ ## What not to do
81
+
82
+ - Do **not** treat this as **`/launchframe`** (no parallel component specs, no `docs/research/LAUNCHFRAME_SUBAGENTS.md` runs for snapshot).
83
+ - Do **not** hand-rebuild the page in React for this command.
84
+ - Do **not** add `sandbox` on the iframe unless the user explicitly asks and accepts broken script behavior.
@@ -0,0 +1,79 @@
1
+ <!-- AUTO-GENERATED from .claude/skills/snapshot/SKILL.md — do not edit directly.
2
+ Run `node scripts/sync-skills.mjs` to regenerate. -->
3
+
4
+
5
+ # Snapshot (`/snapshot`)
6
+
7
+ **`/snapshot`** serves a **frozen copy** of a live URL: the captured **`document.html`** from Playwright lives under **`public/captured/`** and **`src/app/page.tsx`** embeds it in a **full-viewport iframe**. This is **verbatim hosting**, not **`/launchframe`** (no component rebuild, no SaaS overlay, no Phase 6 verification).
8
+
9
+ Parse **the reference URL the user passed with /snapshot**:
10
+
11
+ 1. **URL** — Exactly one `http://` or `https://` URL. If the user omitted it, ask once. If multiple URLs appear, use the **first** only and say you are snapshotting that one.
12
+
13
+ ## Step 1 — Persist the source URL
14
+
15
+ Update **`src/lib/launchframe-config.ts`**:
16
+
17
+ - Set **`LAUNCHFRAME_SOURCE_URL`** to the parsed URL (string, `as const`).
18
+
19
+ ## Step 2 — Capture (mandatory)
20
+
21
+ From the repository root, run **once** for that URL (same inspector as Launchframe Step 0a). Use the URL’s **hostname** for the output parent (example: `https://www.example.com/path` → `www.example.com`):
22
+
23
+ 1. **One-time per machine:** `npx playwright install chromium` if captures fail for missing browsers.
24
+ 2. **Capture:**
25
+
26
+ ```bash
27
+ npm run inspect:page -- "<URL>" --scroll-full --wait-until networkidle --timeout 120000 --out-parent "docs/research/<hostname>/page-inspection"
28
+ ```
29
+
30
+ This creates `docs/research/<hostname>/page-inspection/<hostname>-<iso-stamp>/` with **`document.html`** and related artifacts.
31
+
32
+ If navigation times out, retry with `--wait-until domcontentloaded` or a higher `--timeout`, and record what worked.
33
+
34
+ ## Step 3 — Verbatim copy to `public`
35
+
36
+ 1. Ensure **`public/captured/`** exists.
37
+ 2. Pick the **latest** inspection folder under that hostname (sort by the ISO stamp in the folder name).
38
+ 3. **Copy** (do not prettify or edit) **`document.html`** from that folder to:
39
+
40
+ **`public/captured/<host-slug>-document.html`**
41
+
42
+ where **`<host-slug>`** is the URL hostname with each **`.`** replaced by **`-`** (e.g. `www.example.com` → `www-example-com`).
43
+
44
+ Same-origin scripts and inline styles stay inside the file; external URLs (CDNs) remain as in the capture.
45
+
46
+ ## Step 4 — Home page iframe
47
+
48
+ Replace **`src/app/page.tsx`** with a single full-viewport iframe **only** (no `sandbox` — it breaks many real pages):
49
+
50
+ ```tsx
51
+ export default function Home() {
52
+ return (
53
+ <iframe
54
+ src="/captured/<host-slug>-document.html"
55
+ title="Captured snapshot"
56
+ className="fixed inset-0 h-dvh w-dvw border-0"
57
+ />
58
+ );
59
+ }
60
+ ```
61
+
62
+ Use the same **`<host-slug>`** as in Step 3.
63
+
64
+ ## Step 5 — Verify
65
+
66
+ Run **`npm run build`** and fix any errors.
67
+
68
+ ## What to tell the user
69
+
70
+ After **`npm run dev`**:
71
+
72
+ - **Iframe:** `http://localhost:3000/`
73
+ - **Direct static file:** `http://localhost:3000/captured/<host-slug>-document.html`
74
+
75
+ ## What not to do
76
+
77
+ - Do **not** treat this as **`/launchframe`** (no parallel component specs, no `docs/research/LAUNCHFRAME_SUBAGENTS.md` runs for snapshot).
78
+ - Do **not** hand-rebuild the page in React for this command.
79
+ - Do **not** add `sandbox` on the iframe unless the user explicitly asks and accepts broken script behavior.
@@ -0,0 +1,85 @@
1
+ # AUTO-GENERATED from .claude/skills/snapshot/SKILL.md
2
+ # Run `node scripts/sync-skills.mjs` to regenerate.
3
+
4
+ description = "Verbatim page snapshot — run inspect:page, copy document.html to public/captured/, and show it on the home route via a full-viewport iframe (not a React rebuild)."
5
+
6
+ [prompt]
7
+ text = '''
8
+
9
+ # Snapshot (`/snapshot`)
10
+
11
+ **`/snapshot`** serves a **frozen copy** of a live URL: the captured **`document.html`** from Playwright lives under **`public/captured/`** and **`src/app/page.tsx`** embeds it in a **full-viewport iframe**. This is **verbatim hosting**, not **`/launchframe`** (no component rebuild, no SaaS overlay, no Phase 6 verification).
12
+
13
+ Parse **{{args}}**:
14
+
15
+ 1. **URL** — Exactly one `http://` or `https://` URL. If the user omitted it, ask once. If multiple URLs appear, use the **first** only and say you are snapshotting that one.
16
+
17
+ ## Step 1 — Persist the source URL
18
+
19
+ Update **`src/lib/launchframe-config.ts`**:
20
+
21
+ - Set **`LAUNCHFRAME_SOURCE_URL`** to the parsed URL (string, `as const`).
22
+
23
+ ## Step 2 — Capture (mandatory)
24
+
25
+ From the repository root, run **once** for that URL (same inspector as Launchframe Step 0a). Use the URL’s **hostname** for the output parent (example: `https://www.example.com/path` → `www.example.com`):
26
+
27
+ 1. **One-time per machine:** `npx playwright install chromium` if captures fail for missing browsers.
28
+ 2. **Capture:**
29
+
30
+ ```bash
31
+ npm run inspect:page -- "<URL>" --scroll-full --wait-until networkidle --timeout 120000 --out-parent "docs/research/<hostname>/page-inspection"
32
+ ```
33
+
34
+ This creates `docs/research/<hostname>/page-inspection/<hostname>-<iso-stamp>/` with **`document.html`** and related artifacts.
35
+
36
+ If navigation times out, retry with `--wait-until domcontentloaded` or a higher `--timeout`, and record what worked.
37
+
38
+ ## Step 3 — Verbatim copy to `public`
39
+
40
+ 1. Ensure **`public/captured/`** exists.
41
+ 2. Pick the **latest** inspection folder under that hostname (sort by the ISO stamp in the folder name).
42
+ 3. **Copy** (do not prettify or edit) **`document.html`** from that folder to:
43
+
44
+ **`public/captured/<host-slug>-document.html`**
45
+
46
+ where **`<host-slug>`** is the URL hostname with each **`.`** replaced by **`-`** (e.g. `www.example.com` → `www-example-com`).
47
+
48
+ Same-origin scripts and inline styles stay inside the file; external URLs (CDNs) remain as in the capture.
49
+
50
+ ## Step 4 — Home page iframe
51
+
52
+ Replace **`src/app/page.tsx`** with a single full-viewport iframe **only** (no `sandbox` — it breaks many real pages):
53
+
54
+ ```tsx
55
+ export default function Home() {
56
+ return (
57
+ <iframe
58
+ src="/captured/<host-slug>-document.html"
59
+ title="Captured snapshot"
60
+ className="fixed inset-0 h-dvh w-dvw border-0"
61
+ />
62
+ );
63
+ }
64
+ ```
65
+
66
+ Use the same **`<host-slug>`** as in Step 3.
67
+
68
+ ## Step 5 — Verify
69
+
70
+ Run **`npm run build`** and fix any errors.
71
+
72
+ ## What to tell the user
73
+
74
+ After **`npm run dev`**:
75
+
76
+ - **Iframe:** `http://localhost:3000/`
77
+ - **Direct static file:** `http://localhost:3000/captured/<host-slug>-document.html`
78
+
79
+ ## What not to do
80
+
81
+ - Do **not** treat this as **`/launchframe`** (no parallel component specs, no `docs/research/LAUNCHFRAME_SUBAGENTS.md` runs for snapshot).
82
+ - Do **not** hand-rebuild the page in React for this command.
83
+ - Do **not** add `sandbox` on the iframe unless the user explicitly asks and accepts broken script behavior.
84
+
85
+ '''
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: snapshot
3
+ description: Verbatim page snapshot — run inspect:page, copy document.html to public/captured/, and show it on the home route via a full-viewport iframe (not a React rebuild).
4
+ argument-hint: "<url>"
5
+ argument-substitution: the reference URL the user passed with /snapshot
6
+ user-invocable: true
7
+ ---
8
+
9
+ # Snapshot (`/snapshot`)
10
+
11
+ **`/snapshot`** serves a **frozen copy** of a live URL: the captured **`document.html`** from Playwright lives under **`public/captured/`** and **`src/app/page.tsx`** embeds it in a **full-viewport iframe**. This is **verbatim hosting**, not **`/launchframe`** (no component rebuild, no SaaS overlay, no Phase 6 verification).
12
+
13
+ Parse **$ARGUMENTS**:
14
+
15
+ 1. **URL** — Exactly one `http://` or `https://` URL. If the user omitted it, ask once. If multiple URLs appear, use the **first** only and say you are snapshotting that one.
16
+
17
+ ## Step 1 — Persist the source URL
18
+
19
+ Update **`src/lib/launchframe-config.ts`**:
20
+
21
+ - Set **`LAUNCHFRAME_SOURCE_URL`** to the parsed URL (string, `as const`).
22
+
23
+ ## Step 2 — Capture (mandatory)
24
+
25
+ From the repository root, run **once** for that URL (same inspector as Launchframe Step 0a). Use the URL’s **hostname** for the output parent (example: `https://www.example.com/path` → `www.example.com`):
26
+
27
+ 1. **One-time per machine:** `npx playwright install chromium` if captures fail for missing browsers.
28
+ 2. **Capture:**
29
+
30
+ ```bash
31
+ npm run inspect:page -- "<URL>" --scroll-full --wait-until networkidle --timeout 120000 --out-parent "docs/research/<hostname>/page-inspection"
32
+ ```
33
+
34
+ This creates `docs/research/<hostname>/page-inspection/<hostname>-<iso-stamp>/` with **`document.html`** and related artifacts.
35
+
36
+ If navigation times out, retry with `--wait-until domcontentloaded` or a higher `--timeout`, and record what worked.
37
+
38
+ ## Step 3 — Verbatim copy to `public`
39
+
40
+ 1. Ensure **`public/captured/`** exists.
41
+ 2. Pick the **latest** inspection folder under that hostname (sort by the ISO stamp in the folder name).
42
+ 3. **Copy** (do not prettify or edit) **`document.html`** from that folder to:
43
+
44
+ **`public/captured/<host-slug>-document.html`**
45
+
46
+ where **`<host-slug>`** is the URL hostname with each **`.`** replaced by **`-`** (e.g. `www.example.com` → `www-example-com`).
47
+
48
+ Same-origin scripts and inline styles stay inside the file; external URLs (CDNs) remain as in the capture.
49
+
50
+ ## Step 4 — Home page iframe
51
+
52
+ Replace **`src/app/page.tsx`** with a single full-viewport iframe **only** (no `sandbox` — it breaks many real pages):
53
+
54
+ ```tsx
55
+ export default function Home() {
56
+ return (
57
+ <iframe
58
+ src="/captured/<host-slug>-document.html"
59
+ title="Captured snapshot"
60
+ className="fixed inset-0 h-dvh w-dvw border-0"
61
+ />
62
+ );
63
+ }
64
+ ```
65
+
66
+ Use the same **`<host-slug>`** as in Step 3.
67
+
68
+ ## Step 5 — Verify
69
+
70
+ Run **`npm run build`** and fix any errors.
71
+
72
+ ## What to tell the user
73
+
74
+ After **`npm run dev`**:
75
+
76
+ - **Iframe:** `http://localhost:3000/`
77
+ - **Direct static file:** `http://localhost:3000/captured/<host-slug>-document.html`
78
+
79
+ ## What not to do
80
+
81
+ - Do **not** treat this as **`/launchframe`** (no parallel component specs, no `docs/research/LAUNCHFRAME_SUBAGENTS.md` runs for snapshot).
82
+ - Do **not** hand-rebuild the page in React for this command.
83
+ - Do **not** add `sandbox` on the iframe unless the user explicitly asks and accepts broken script behavior.
@@ -0,0 +1,82 @@
1
+ ---
2
+ description: "Verbatim page snapshot — run inspect:page, copy document.html to public/captured/, and show it on the home route via a full-viewport iframe (not a React rebuild)."
3
+ ---
4
+ <!-- AUTO-GENERATED from .claude/skills/snapshot/SKILL.md — do not edit directly.
5
+ Run `node scripts/sync-skills.mjs` to regenerate. -->
6
+
7
+
8
+ # Snapshot (`/snapshot`)
9
+
10
+ **`/snapshot`** serves a **frozen copy** of a live URL: the captured **`document.html`** from Playwright lives under **`public/captured/`** and **`src/app/page.tsx`** embeds it in a **full-viewport iframe**. This is **verbatim hosting**, not **`/launchframe`** (no component rebuild, no SaaS overlay, no Phase 6 verification).
11
+
12
+ Parse **$ARGUMENTS**:
13
+
14
+ 1. **URL** — Exactly one `http://` or `https://` URL. If the user omitted it, ask once. If multiple URLs appear, use the **first** only and say you are snapshotting that one.
15
+
16
+ ## Step 1 — Persist the source URL
17
+
18
+ Update **`src/lib/launchframe-config.ts`**:
19
+
20
+ - Set **`LAUNCHFRAME_SOURCE_URL`** to the parsed URL (string, `as const`).
21
+
22
+ ## Step 2 — Capture (mandatory)
23
+
24
+ From the repository root, run **once** for that URL (same inspector as Launchframe Step 0a). Use the URL’s **hostname** for the output parent (example: `https://www.example.com/path` → `www.example.com`):
25
+
26
+ 1. **One-time per machine:** `npx playwright install chromium` if captures fail for missing browsers.
27
+ 2. **Capture:**
28
+
29
+ ```bash
30
+ npm run inspect:page -- "<URL>" --scroll-full --wait-until networkidle --timeout 120000 --out-parent "docs/research/<hostname>/page-inspection"
31
+ ```
32
+
33
+ This creates `docs/research/<hostname>/page-inspection/<hostname>-<iso-stamp>/` with **`document.html`** and related artifacts.
34
+
35
+ If navigation times out, retry with `--wait-until domcontentloaded` or a higher `--timeout`, and record what worked.
36
+
37
+ ## Step 3 — Verbatim copy to `public`
38
+
39
+ 1. Ensure **`public/captured/`** exists.
40
+ 2. Pick the **latest** inspection folder under that hostname (sort by the ISO stamp in the folder name).
41
+ 3. **Copy** (do not prettify or edit) **`document.html`** from that folder to:
42
+
43
+ **`public/captured/<host-slug>-document.html`**
44
+
45
+ where **`<host-slug>`** is the URL hostname with each **`.`** replaced by **`-`** (e.g. `www.example.com` → `www-example-com`).
46
+
47
+ Same-origin scripts and inline styles stay inside the file; external URLs (CDNs) remain as in the capture.
48
+
49
+ ## Step 4 — Home page iframe
50
+
51
+ Replace **`src/app/page.tsx`** with a single full-viewport iframe **only** (no `sandbox` — it breaks many real pages):
52
+
53
+ ```tsx
54
+ export default function Home() {
55
+ return (
56
+ <iframe
57
+ src="/captured/<host-slug>-document.html"
58
+ title="Captured snapshot"
59
+ className="fixed inset-0 h-dvh w-dvw border-0"
60
+ />
61
+ );
62
+ }
63
+ ```
64
+
65
+ Use the same **`<host-slug>`** as in Step 3.
66
+
67
+ ## Step 5 — Verify
68
+
69
+ Run **`npm run build`** and fix any errors.
70
+
71
+ ## What to tell the user
72
+
73
+ After **`npm run dev`**:
74
+
75
+ - **Iframe:** `http://localhost:3000/`
76
+ - **Direct static file:** `http://localhost:3000/captured/<host-slug>-document.html`
77
+
78
+ ## What not to do
79
+
80
+ - Do **not** treat this as **`/launchframe`** (no parallel component specs, no `docs/research/LAUNCHFRAME_SUBAGENTS.md` runs for snapshot).
81
+ - Do **not** hand-rebuild the page in React for this command.
82
+ - Do **not** add `sandbox` on the iframe unless the user explicitly asks and accepts broken script behavior.
@@ -0,0 +1,79 @@
1
+ <!-- AUTO-GENERATED from .claude/skills/snapshot/SKILL.md — do not edit directly.
2
+ Run `node scripts/sync-skills.mjs` to regenerate. -->
3
+
4
+
5
+ # Snapshot (`/snapshot`)
6
+
7
+ **`/snapshot`** serves a **frozen copy** of a live URL: the captured **`document.html`** from Playwright lives under **`public/captured/`** and **`src/app/page.tsx`** embeds it in a **full-viewport iframe**. This is **verbatim hosting**, not **`/launchframe`** (no component rebuild, no SaaS overlay, no Phase 6 verification).
8
+
9
+ Parse **the reference URL the user passed with /snapshot**:
10
+
11
+ 1. **URL** — Exactly one `http://` or `https://` URL. If the user omitted it, ask once. If multiple URLs appear, use the **first** only and say you are snapshotting that one.
12
+
13
+ ## Step 1 — Persist the source URL
14
+
15
+ Update **`src/lib/launchframe-config.ts`**:
16
+
17
+ - Set **`LAUNCHFRAME_SOURCE_URL`** to the parsed URL (string, `as const`).
18
+
19
+ ## Step 2 — Capture (mandatory)
20
+
21
+ From the repository root, run **once** for that URL (same inspector as Launchframe Step 0a). Use the URL’s **hostname** for the output parent (example: `https://www.example.com/path` → `www.example.com`):
22
+
23
+ 1. **One-time per machine:** `npx playwright install chromium` if captures fail for missing browsers.
24
+ 2. **Capture:**
25
+
26
+ ```bash
27
+ npm run inspect:page -- "<URL>" --scroll-full --wait-until networkidle --timeout 120000 --out-parent "docs/research/<hostname>/page-inspection"
28
+ ```
29
+
30
+ This creates `docs/research/<hostname>/page-inspection/<hostname>-<iso-stamp>/` with **`document.html`** and related artifacts.
31
+
32
+ If navigation times out, retry with `--wait-until domcontentloaded` or a higher `--timeout`, and record what worked.
33
+
34
+ ## Step 3 — Verbatim copy to `public`
35
+
36
+ 1. Ensure **`public/captured/`** exists.
37
+ 2. Pick the **latest** inspection folder under that hostname (sort by the ISO stamp in the folder name).
38
+ 3. **Copy** (do not prettify or edit) **`document.html`** from that folder to:
39
+
40
+ **`public/captured/<host-slug>-document.html`**
41
+
42
+ where **`<host-slug>`** is the URL hostname with each **`.`** replaced by **`-`** (e.g. `www.example.com` → `www-example-com`).
43
+
44
+ Same-origin scripts and inline styles stay inside the file; external URLs (CDNs) remain as in the capture.
45
+
46
+ ## Step 4 — Home page iframe
47
+
48
+ Replace **`src/app/page.tsx`** with a single full-viewport iframe **only** (no `sandbox` — it breaks many real pages):
49
+
50
+ ```tsx
51
+ export default function Home() {
52
+ return (
53
+ <iframe
54
+ src="/captured/<host-slug>-document.html"
55
+ title="Captured snapshot"
56
+ className="fixed inset-0 h-dvh w-dvw border-0"
57
+ />
58
+ );
59
+ }
60
+ ```
61
+
62
+ Use the same **`<host-slug>`** as in Step 3.
63
+
64
+ ## Step 5 — Verify
65
+
66
+ Run **`npm run build`** and fix any errors.
67
+
68
+ ## What to tell the user
69
+
70
+ After **`npm run dev`**:
71
+
72
+ - **Iframe:** `http://localhost:3000/`
73
+ - **Direct static file:** `http://localhost:3000/captured/<host-slug>-document.html`
74
+
75
+ ## What not to do
76
+
77
+ - Do **not** treat this as **`/launchframe`** (no parallel component specs, no `docs/research/LAUNCHFRAME_SUBAGENTS.md` runs for snapshot).
78
+ - Do **not** hand-rebuild the page in React for this command.
79
+ - Do **not** add `sandbox` on the iframe unless the user explicitly asks and accepts broken script behavior.
package/AGENTS.md CHANGED
@@ -7,7 +7,7 @@ This version has breaking changes — APIs, conventions, and file structure may
7
7
  # Website Reverse-Engineer Template
8
8
 
9
9
  ## What This Is
10
- A reusable template for reverse-engineering any website into a clean, modern Next.js codebase using AI coding agents. The Next.js + shadcn/ui + Tailwind v4 base is pre-scaffolded — use **`/launchframe <url> "saas idea"`** for the full pixel-perfect clone plus SaaS landing copy (`src/lib/launchframe-config.ts`, `launchframe.context.json`, `docs/research/LAUNCHFRAME.md`). The agent executing **`/launchframe`** must follow **Step 0a** in that command: run **`npm run inspect:page`** once per reference URL (Playwright: `document.html`, network CSS, `motion-summary.json`) before Phase 1. For a **new empty folder** only, **`npx launchframe@latest`** unpacks this template; then run **`/launchframe`** in that project with your URL and pitch.
10
+ A reusable template for reverse-engineering any website into a clean, modern Next.js codebase using AI coding agents. The Next.js + shadcn/ui + Tailwind v4 base is pre-scaffolded — use **`/launchframe <url> "saas idea"`** for the full pixel-perfect clone plus SaaS landing copy (`src/lib/launchframe-config.ts`, `launchframe.context.json`, `docs/research/LAUNCHFRAME.md`). The agent executing **`/launchframe`** must follow **Step 0a** in that command: run **`npm run inspect:page`** once per reference URL (Playwright: `document.html`, network CSS, `motion-summary.json`) before Phase 1. Use **`/snapshot <url>`** for a **verbatim** local copy: Playwright capture → `public/captured/<host>-document.html` → full-viewport iframe on **`src/app/page.tsx`** (not a React rebuild). For a **new empty folder** only, **`npx launchframe@latest`** unpacks this template; then run **`/launchframe`** in that project with your URL and pitch.
11
11
 
12
12
  ## Tech Stack
13
13
  - **Framework:** Next.js 16 (App Router, React 19, TypeScript strict)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "launchframe",
3
- "version": "0.4.12",
3
+ "version": "0.4.13",
4
4
  "private": false,
5
5
  "description": "Scaffold a Next.js app from a reference URL plus your SaaS idea — AI-ready website cloning",
6
6
  "author": "JCodesMore",
package/src/app/page.tsx CHANGED
@@ -1,40 +1,9 @@
1
- import Link from "next/link";
2
-
3
- import {
4
- LAUNCHFRAME_SAAS_IDEA,
5
- LAUNCHFRAME_SOURCE_URL,
6
- } from "@/lib/launchframe-config";
7
-
8
1
  export default function Home() {
9
2
  return (
10
- <main className="flex min-h-screen flex-col items-center justify-center gap-8 px-6 py-16">
11
- <div className="mx-auto max-w-2xl space-y-6 text-center">
12
- <p className="text-xs font-semibold uppercase tracking-[0.2em] text-muted-foreground">
13
- SaaS idea
14
- </p>
15
- <h1 className="text-balance text-3xl font-semibold tracking-tight text-foreground sm:text-4xl whitespace-pre-wrap">
16
- {LAUNCHFRAME_SAAS_IDEA}
17
- </h1>
18
- <p className="text-pretty text-sm text-muted-foreground sm:text-base">
19
- Visual reference (clone target):{" "}
20
- <Link
21
- href={LAUNCHFRAME_SOURCE_URL}
22
- className="font-medium text-foreground underline underline-offset-4"
23
- target="_blank"
24
- rel="noreferrer noopener"
25
- >
26
- {LAUNCHFRAME_SOURCE_URL}
27
- </Link>
28
- </p>
29
- <p className="text-pretty text-sm text-muted-foreground">
30
- Run{" "}
31
- <code className="rounded-md bg-muted px-2 py-1 font-mono text-foreground">
32
- /launchframe {LAUNCHFRAME_SOURCE_URL} &quot;…your saas idea…&quot;
33
- </code>{" "}
34
- with your AI agent to rebuild this layout from the reference site while keeping the SaaS
35
- positioning above.
36
- </p>
37
- </div>
38
- </main>
3
+ <iframe
4
+ src="/captured/example-com-document.html"
5
+ title="Captured reference page"
6
+ className="fixed inset-0 h-dvh w-dvw border-0"
7
+ />
39
8
  );
40
9
  }