launchframe 0.4.0 → 0.4.2

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,45 @@
1
+ # AUTO-GENERATED from .claude/skills/launchframe/SKILL.md
2
+ # Run `node scripts/sync-skills.mjs` to regenerate.
3
+
4
+ description = "Scaffold with npx launchframe@latest into the current folder — no arguments required"
5
+
6
+ [prompt]
7
+ text = '''
8
+
9
+ # Launchframe
10
+
11
+ Help the user create a **new** Launchframe project. The CLI is **parameterless**:
12
+
13
+ ```bash
14
+ npx launchframe@latest
15
+ ```
16
+
17
+ It unpacks the full template into the **current working directory** (the folder root where the user runs the command). They should `mkdir`, `cd` into an **empty** folder first.
18
+
19
+ ## What you do
20
+
21
+ 1. Ensure the user has an **empty** directory (no existing `package.json`, `src/`, or `next.config.ts` there). If the workspace is already a Launchframe/Next project, they may only need `/clone-website` instead — clarify.
22
+
23
+ 2. Run exactly:
24
+
25
+ ```bash
26
+ npx launchframe@latest
27
+ ```
28
+
29
+ Optional: `LAUNCHFRAME_SOURCE_URL` and `LAUNCHFRAME_SAAS_IDEA` environment variables in the same shell if they want values pre-filled without editing files later.
30
+
31
+ 3. **Never** run this with the output target **inside** the `launchframe` package directory (the npm-installed template). If the open folder is this monorepo/template, have them `mkdir ../my-app && cd ../my-app` (sibling path), then run `npx launchframe@latest` there.
32
+
33
+ 4. Optional flags (same as CLI): `--dir <path>` to scaffold into another folder instead of cwd, `--skip-install` to skip `npm install`.
34
+
35
+ 5. After it finishes: they should **`npm run dev`** from **that same folder** (no extra `cd` if they scaffolded into cwd). Then they edit **`src/lib/launchframe-config.ts`** for reference URL and SaaS idea, and run **`/clone-website`** with that URL.
36
+
37
+ ## If {{args}} are present
38
+
39
+ The user may still paste a URL or idea in chat — **do not** require them for the CLI. Put any extra context into **`src/lib/launchframe-config.ts`** or `launchframe.context.json` for them after scaffold.
40
+
41
+ ## Fallback (local dev only)
42
+
43
+ From a checkout of this repo: `node bin/launchframe.mjs` with the same empty-folder rules (optionally `--dir` outside the package root).
44
+
45
+ '''
@@ -1,76 +1,87 @@
1
- <!-- AUTO-GENERATED from AGENTS.md — do not edit directly.
2
- Run `bash scripts/sync-agent-rules.sh` to regenerate. -->
3
-
4
- <!-- BEGIN:nextjs-agent-rules -->
5
- # This is NOT the Next.js you know
6
-
7
- This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` before writing any code. Heed deprecation notices.
8
- <!-- END:nextjs-agent-rules -->
9
-
10
- # Website Reverse-Engineer Template
11
-
12
- ## What This Is
13
- 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 — just run `/clone-website <url1> [<url2> ...]`.
14
-
15
- ## Tech Stack
16
- - **Framework:** Next.js 16 (App Router, React 19, TypeScript strict)
17
- - **UI:** shadcn/ui (Radix primitives, Tailwind CSS v4, `cn()` utility)
18
- - **Icons:** Lucide React (default — will be replaced/supplemented by extracted SVGs)
19
- - **Styling:** Tailwind CSS v4 with oklch design tokens
20
- - **Deployment:** Vercel
21
-
22
- ## Commands
23
- - `npm run dev` — Start dev server
24
- - `npm run build` — Production build
25
- - `npm run lint` — ESLint check
26
- - `npm run typecheck` — TypeScript check
27
- - `npm run check` — Run lint + typecheck + build
28
-
29
- ## Code Style
30
- - TypeScript strict mode, no `any`
31
- - Named exports, PascalCase components, camelCase utils
32
- - Tailwind utility classes, no inline styles
33
- - 2-space indentation
34
- - Responsive: mobile-first
35
-
36
- ## Design Principles
37
- - **Pixel-perfect emulation** — match the target's spacing, colors, typography exactly
38
- - **No personal aesthetic changes during emulation phase** — match 1:1 first, customize later
39
- - **Real content** — use actual text and assets from the target site, not placeholders
40
- - **Beauty-first** — every pixel matters
41
-
42
- ## Project Structure
43
- ```
44
- src/
45
- app/ # Next.js routes
46
- components/ # React components
47
- ui/ # shadcn/ui primitives
48
- icons.tsx # Extracted SVG icons as React components
49
- lib/
50
- utils.ts # cn() utility (shadcn)
51
- types/ # TypeScript interfaces
52
- hooks/ # Custom React hooks
53
- public/
54
- images/ # Downloaded images from target site
55
- videos/ # Downloaded videos from target site
56
- seo/ # Favicons, OG images, webmanifest
57
- docs/
58
- research/ # Inspection output (design tokens, components, layout)
59
- design-references/ # Screenshots and visual references
60
- scripts/ # Asset download scripts
61
- ```
62
-
63
- ## MOST IMPORTANT NOTES
64
- - When launching Claude Code agent teams, ALWAYS have each teammate work in their own worktree branch and merge everyone's work at the end, resolving any merge conflicts smartly since you are basically serving the orchestrator role and have full context to our goals, work given, work achieved, and desired outcomes.
65
- - After editing `AGENTS.md`, run `bash scripts/sync-agent-rules.sh` to regenerate platform-specific instruction files.
66
- - After editing `.claude/skills/clone-website/SKILL.md`, run `node scripts/sync-skills.mjs` to regenerate the skill for all platforms.
67
-
1
+ <!-- AUTO-GENERATED from AGENTS.md — do not edit directly.
2
+ Run `bash scripts/sync-agent-rules.sh` to regenerate. -->
3
+
4
+ <!-- BEGIN:nextjs-agent-rules -->
5
+ # This is NOT the Next.js you know
6
+
7
+ This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` before writing any code. Heed deprecation notices.
8
+ <!-- END:nextjs-agent-rules -->
9
+
10
+ # Website Reverse-Engineer Template
11
+
12
+ ## What This Is
13
+ 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 — for a **new** folder, `mkdir`, `cd` into an **empty** directory, run **`npx launchframe@latest`** (no parameters), then edit **`src/lib/launchframe-config.ts`** and run **`/clone-website`** with your URL (or invoke **`/launchframe`** so the agent runs the same command). Or work in this repo and run **`/clone-website <url1> [<url2> ...]`** to clone into the current tree.
14
+
15
+ ## Tech Stack
16
+ - **Framework:** Next.js 16 (App Router, React 19, TypeScript strict)
17
+ - **UI:** shadcn/ui (Radix primitives, Tailwind CSS v4, `cn()` utility)
18
+ - **Icons:** Lucide React (default — will be replaced/supplemented by extracted SVGs)
19
+ - **Styling:** Tailwind CSS v4 with oklch design tokens
20
+ - **Deployment:** Vercel
21
+
22
+ ## Commands
23
+ - `npm run dev` — Start dev server
24
+ - `npm run build` — Production build
25
+ - `npm run lint` — ESLint check
26
+ - `npm run typecheck` — TypeScript check
27
+ - `npm run check` — Run lint + typecheck + build
28
+
29
+ ## Code Style
30
+ - TypeScript strict mode, no `any`
31
+ - Named exports, PascalCase components, camelCase utils
32
+ - Tailwind utility classes, no inline styles
33
+ - 2-space indentation
34
+ - Responsive: mobile-first
35
+
36
+ ## Design Principles
37
+ - **Pixel-perfect emulation** — match the target's spacing, colors, typography exactly
38
+ - **No personal aesthetic changes during emulation phase** — match 1:1 first, customize later
39
+ - **Real content** — use actual text and assets from the target site, not placeholders
40
+ - **Beauty-first** — every pixel matters
41
+ - **DOM crawl priority** — when walking the target page, emphasize **images** (raster, responsive sources, CSS backgrounds), **SVGs** (inline icons, sprites, masks), then **motion** (keyframes, transitions, scroll/time-driven animation, libraries). Scrape and save real assets from the DOM/network first; **create** a stand-in image or vector only when fetch/blocking prevents extraction, and label substitutes clearly in research notes so the clone stays auditable
42
+
43
+ ## Project Structure
44
+ ```
45
+ src/
46
+ app/ # Next.js routes
47
+ components/ # React components
48
+ ui/ # shadcn/ui primitives
49
+ icons.tsx # Extracted SVG icons as React components
50
+ lib/
51
+ utils.ts # cn() utility (shadcn)
52
+ types/ # TypeScript interfaces
53
+ hooks/ # Custom React hooks
54
+ public/
55
+ images/ # Downloaded images from target site
56
+ videos/ # Downloaded videos from target site
57
+ seo/ # Favicons, OG images, webmanifest
58
+ docs/
59
+ research/ # Inspection output (design tokens, components, layout)
60
+ design-references/ # Screenshots and visual references
61
+ scripts/ # Asset download scripts
62
+ ```
63
+
64
+ ## MOST IMPORTANT NOTES
65
+ - When launching Claude Code agent teams, ALWAYS have each teammate work in their own worktree branch and merge everyone's work at the end, resolving any merge conflicts smartly since you are basically serving the orchestrator role and have full context to our goals, work given, work achieved, and desired outcomes.
66
+ - After editing `AGENTS.md`, run `bash scripts/sync-agent-rules.sh` to regenerate platform-specific instruction files.
67
+ - After editing `.claude/skills/*/SKILL.md` (for example `clone-website` or `launchframe`), run `node scripts/sync-skills.mjs` to regenerate skill and command files for all platforms.
68
+
68
69
  # Website Inspection Guide
69
70
 
70
71
  ## How to Reverse-Engineer Any Website
71
72
 
72
73
  This guide outlines what to capture when inspecting a target website via Chrome MCP or browser DevTools.
73
74
 
75
+ ## Priority: media, SVGs, and motion (do this early)
76
+
77
+ When crawling the DOM and network, **tackle these before fine-tuning copy or spacing**:
78
+
79
+ 1. **Raster imagery** — Every `<img>`, `<picture>` / `source`, `srcset` / `sizes`, CDN URLs, lazy-loaded `data-src`, `loading="lazy"` nodes, **CSS `background-image`** on the element and ancestors (including `::before` / `::after`), masks that use `url()`, `<video>` still / poster frames. Prefer **downloading** originals via scripts or MCP; if a URL is blocked or session-gated, **export a screenshot** of the element’s bounding box at a crisp DPR and store it under `public/images/`, and note the substitute in the spec.
80
+ 2. **SVGs** — Inline `<svg>`, `<use>` / sprite sheets, **SVG in CSS** (`mask-image`, `background-image`), favicons as SVG, logo marks. Prefer extracting path/viewBox into React components or static files under `public/` — **recreate** from a screenshot/trace only when the markup is obfuscated or blocked.
81
+ 3. **Motion & animation** — Inspect Styles for `animation`, `animation-name`, `animation-timeline`, `transition`, `transform`, `@keyframes`; check for libraries (Framer Motion, GSAP, Lottie, Lenis). Capture **durations, easings, delays, fill-modes**, scroll/view triggers, and `prefers-reduced-motion` handling. Motion often defines perceived quality — do not leave it as an afterthought.
82
+
83
+ Then continue with typography, spacing, and component structure as usual.
84
+
74
85
  ## Phase 1: Visual Audit
75
86
 
76
87
  ### Screenshots to Capture