[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77G6M2JR6YHC76C6XSAJ8VY":3,"skill-same:01M77G6M2JR6YHC76C6XSAJ8VY":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":42,"commitSha":43,"skillDirectory":44,"forksCount":45,"repositoryHtmlUrl":46,"repositoryHomepageUrl":47,"ownerHtmlUrl":48,"ownerBlogUrl":6,"ownerDescription":49,"updatedAt":50,"install":51,"resources":64},"01M77G6M2JR6YHC76C6XSAJ8VY","flowstitch",null,"Turn one sentence into a deployed website. FlowStitch is your AI design team: prompt engineering, design system generation, multi-page creation, quality evaluation, React\u002FTypeScript export, and one-command deploy. Scrape any competitor's site and build something better. Import a logo and get a full brand system. Build websites, admin dashboards, or mobile apps. Powered by Google Stitch MCP tools. Free from the Flow team.","Lord1Egypt\u002Fawesome-skill-forge","Lord1Egypt","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99746359?v=4","01M7592YDNT0XK9WJ0T2MQVPDN","Mohamed Mounir Ali AL Keshita","01M75GRFNHC8VZNWEB8DKDE433",3,"MIT","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Ff\u002Fflowstitch\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: flowstitch\nversion: 2.0.0\ndescription: >\n  Turn one sentence into a deployed website. FlowStitch is your AI design team:\n  prompt engineering, design system generation, multi-page creation, quality evaluation,\n  React\u002FTypeScript export, and one-command deploy. Scrape any competitor's site and\n  build something better. Import a logo and get a full brand system. Build websites,\n  admin dashboards, or mobile apps. Powered by Google Stitch MCP tools.\n  Free from the Flow team.\ntags: [design, ui, website, stitch, react, typescript, deploy, brand, competitive-analysis, admin-dashboard, mobile-app, tailwind, shadcn, vercel]\nauthor: Flow team\n---\n\n# FlowStitch\n\n## Your AI design team. Idea to deployed website — in one session.\n\nMost tools give you a component. FlowStitch gives you a **shipped product**. Say \"build me a SaaS dashboard\" and it handles everything — prompt engineering, design system generation, multi-page creation, quality evaluation, React export, and Vercel deploy — without you touching a single file.\n\n**What FlowStitch does:**\n- 🚀 **Zero to Shipped** — Full pipeline: one sentence → live URL\n- 🔄 **Quality Loop** — Generates, evaluates, self-corrects (up to 3 passes)\n- 🕵️ **Competitive Intel** — Scrapes any competitor's site and builds something better\n- 🎨 **Brand Kit Import** — Logo + colors + fonts → complete design system\n- 📊 **Admin Dashboards** — KPI cards, data tables, sidebars, charts\n- 📱 **Mobile Apps** — Safe areas, 44px tap targets, bottom nav, native feel\n- ⚛️ **React Export** — Clean, typed, Tailwind + shadcn components\n- 🌐 **One-Command Deploy** — Vercel, Netlify, or GitHub Pages\n\n---\n\n## Prerequisites\n\n**Stitch MCP server must be configured** before using any generation workflows:\n\n```bash\n# Verify Stitch MCP is available\nlist_tools | grep -i stitch\n\n# Add via mcporter if missing:\nmcporter add stitch\n```\n\nStitch docs + prompting guide: https:\u002F\u002Fstitch.withgoogle.com\u002Fdocs\u002Flearn\u002Fprompting\u002F\n\n---\n\n## Workflow Routing Table\n\n| User intent | Section |\n|:---|:---|\n| \"build me a [X]\" \u002F \"zero to shipped\" \u002F \"full pipeline\" | [§0 Zero to Shipped ⚡](#0-zero-to-shipped-) |\n| \"analyze competitor\" \u002F \"reverse-engineer this site\" | [§A Competitive Design Analysis 🕵️](#a-competitive-design-analysis-️) |\n| \"import my brand\" \u002F \"brand kit\" \u002F \"use my logo\" | [§B Brand Kit Import 🎨](#b-brand-kit-import-) |\n| \"enhance my prompt\" \u002F \"polish this idea\" | [§1 Prompt Enhancement](#1-prompt-enhancement) |\n| \"create\u002Fupdate DESIGN.md\" \u002F \"analyze my Stitch project\" | [§2 Design System Synthesis](#2-design-system-synthesis) |\n| \"design a page\" \u002F \"generate a screen\" \u002F \"edit this screen\" | [§3 Screen Generation & Editing](#3-screen-generation--editing) |\n| \"build the site\" \u002F \"run the loop\" \u002F \"next page\" | [§4 Build Loop](#4-build-loop) |\n| \"quality check\" \u002F \"refine\" \u002F \"iterate on design\" | [§5 Quality Loop](#5-quality-loop) |\n| \"export to React\" \u002F \"convert to components\" | [§6 React Component Export](#6-react-component-export) |\n| \"deploy\" \u002F \"go live\" \u002F \"push to Vercel\" | [§7 Deploy](#7-deploy) |\n| \"make a video\" \u002F \"walkthrough video\" | [§8 Video Walkthrough](#8-video-walkthrough-remotion) |\n| \"add shadcn\" \u002F \"use shadcn components\" | [§9 shadcn\u002Fui Integration](#9-shadcnui-integration) |\n\nWhen intent is ambiguous: *\"Are you starting from scratch, analyzing a competitor, or continuing an existing project?\"*\n\n---\n\n## §0 Zero to Shipped ⚡\n\n**Goal:** Take one sentence from the user and produce a fully deployed, multi-page website or app with zero manual steps.\n\nYou handle everything. No hand-holding. No manual steps.\n\n### The Pipeline\n\n```\nUser prompt\n    ↓\n[1] Extract intent (product, audience, vibe)\n    ↓\n[2] Enhance prompt (§1)\n    ↓\n[3] Generate DESIGN.md from first screen (§2)\n    ↓\n[4] Build all pages via loop (§4) — typically 4–6 pages\n    ↓\n[5] Quality loop on each page (§5) — up to 3 refinement passes\n    ↓\n[6] Export to React (§6)\n    ↓\n[7] Live preview → Deploy (§7)\n```\n\n### Step 1 — Extract Intent\n\nFrom the user's description, identify:\n- **Product name** and **one-line value prop**\n- **Target audience** (developers, designers, enterprise, consumers...)\n- **Vibe signals** (any adjectives: \"clean\", \"bold\", \"minimal\", \"playful\")\n- **Page requirements** (infer standard set if not specified)\n\n**Standard page set by type:**\n\n| Site type | Pages |\n|:---|:---|\n| SaaS landing | index, features, pricing, about, contact |\n| Portfolio | index, work, about, contact |\n| Startup \u002F marketing | index, product, about, blog-index, contact |\n| E-commerce | index, catalog, product-detail, about, contact |\n| App \u002F tool | index, features, docs-index, pricing |\n\n### Step 2 — Initialize Project\n\n```bash\nmkdir -p .stitch\u002Fdesigns site\u002Fpublic\n```\n\nCreate `.stitch\u002FSITE.md` using the template from [resources\u002Fsite-template.md](resources\u002Fsite-template.md). Populate:\n- Product name, mission, target audience, voice\n- Visual language (inferred from vibe signals)\n- Initial sitemap with all planned pages as unchecked `[ ]`\n\n### Step 3 — Generate First Screen & DESIGN.md\n\n1. Run prompt enhancement on the landing page (§1)\n2. Create Stitch project: `[prefix]:create_project`\n3. Generate `index` screen: `[prefix]:generate_screen_from_text`\n4. Save to `.stitch\u002Fmetadata.json`\n5. Download screenshot + HTML\n6. **Run §2 (Design System Synthesis)** on the generated screen → write `.stitch\u002FDESIGN.md`\n\nThis DESIGN.md becomes the visual DNA for every subsequent page.\n\n### Step 4 — Build Remaining Pages\n\nFor each remaining page in the sitemap:\n1. Write baton to `.stitch\u002Fnext-prompt.md` (include DESIGN.md Section 6 block)\n2. Generate screen via Stitch\n3. Download assets\n4. Run **§5 Quality Loop** — evaluate and refine until score ≥ 8\u002F10 or 3 passes complete\n5. Integrate into `site\u002Fpublic\u002F`, wire navigation\n6. Update SITE.md sitemap\n\n### Step 5 — React Export\n\nRun §6 on all pages. Output: `src\u002Fcomponents\u002F` with typed, modular components.\n\n### Step 6 — Preview & Deploy\n\n```bash\nnpm run dev   # Local preview\n\n# When ready:\nnpx vercel --prod   # or: npx netlify deploy --prod --dir=site\u002Fpublic\n```\n\nSurface the live URL to the user.\n\n### Progress Reporting\n\nAfter each page completes, report:\n```\n✅ index.html — generated + quality passed (score: 9\u002F10, 1 refinement)\n✅ features.html — generated + quality passed (score: 8\u002F10, 2 refinements)\n🔄 pricing.html — generating...\n```\n\nAt the end:\n```\n🚀 FlowStitch complete!\n   5 pages generated | 3 refined | React exported | Deployed\n   Live URL: https:\u002F\u002Fyour-project.vercel.app\n   Build time: ~8 minutes\n```\n\n**HARD LIMIT:** Max 5 pages × 3 quality passes = 15 Stitch calls. If budget exceeded, skip quality loop on remaining pages and deploy what's clean.\n\n---\n\n## §0 Error Handling\n\n**Goal:** Recover from Stitch tool failures and download errors without aborting a multi-page build.\n\n| Failure | Action |\n|:---|:---|\n| Tool call error | Check JSON structure vs tool-schemas.md; verify projectId format |\n| Project not found | Run `list_projects` to confirm ID; create new project if needed |\n| Download fails | Re-run `fetch-stitch.sh` with quoted URL (GCS URLs expire ~1h) |\n| Generation fails mid-loop | Mark page ⚠️ in progress report, write baton to NEXT page, continue |\n| Quality loop fails 3x | Accept best result, note score, continue to next page |\n\n**Always download assets before running quality loop** — download first, then evaluate.\n\n---\n\n## §A Competitive Design Analysis 🕵️\n\n**Goal:** Reverse-engineer a competitor's design language and build something better-informed and visually differentiated.\n\n**Give it a competitor URL. Get a battle-ready design system back.**\n\nThis is how you build something that looks better than what's already out there, informed by what already works.\n\n### Step 1 — Scrape the Competitor\n\n```python\n# Use web_fetch for clean extraction\nurl = \"[competitor URL]\"\nhtml = web_fetch(url)\n```\n\nIf the site is JS-heavy or blocks scrapers, use the browser tool:\n```\nbrowser: navigate to [url], snapshot, screenshot\n```\n\nAlso fetch their CSS if accessible (look for `\u003Clink rel=\"stylesheet\">` in HTML head).\n\n### Step 2 — Extract Design Language\n\nAnalyze the scraped HTML\u002FCSS for:\n\n**Colors:**\n- CSS custom properties (`--primary`, `--background`, `--foreground`, etc.)\n- Most-used hex\u002Frgb values in inline styles or Tailwind classes\n- Button colors, link colors, background colors, text colors\n\n**Typography:**\n- `font-family` declarations (Google Fonts links in `\u003Chead>` are a goldmine)\n- Font size patterns (`text-4xl`, `text-lg`, etc.)\n- Font weights used for headings vs. body\n\n**Layout patterns:**\n- Max-width containers (e.g., `max-w-7xl`, `max-w-screen-xl`)\n- Grid and flex patterns\n- Section padding\u002Fmargin scale\n\n**Components:**\n- Navigation style (minimal? mega-menu? centered logo?)\n- CTA button shape (rounded? pill? square?)\n- Card patterns (shadow? border? glassmorphism?)\n- Hero layout (full-width image? split? gradient?)\n\n**Overall vibe:**\n- Describe it in 3 adjectives\n- Identify what works well and what you'd improve\n\n### Step 3 — Generate Competitor DESIGN.md\n\nWrite to `.stitch\u002Fcompetitor-DESIGN.md`:\n\n```markdown\n# Competitor Design Analysis: [Brand Name]\n**Source URL:** [URL]\n**Analyzed:** [date]\n\n## What They Did Well\n[3–5 specific observations]\n\n## What's Missing \u002F Weak\n[3–5 specific gaps or dated choices]\n\n## 1. Visual Theme & Atmosphere\n[Analysis]\n\n## 2. Color Palette (Extracted)\n- **[Name]** (#hex) — [role observed]\n\n## 3. Typography\n[Font stack, weight patterns]\n\n## 4. Layout Patterns\n[Max-width, grid, spacing]\n\n## 5. Component Patterns\n[Buttons, cards, nav style]\n```\n\n### Step 4 — Generate Your Improved DESIGN.md\n\nNow synthesize a `.stitch\u002FDESIGN.md` that:\n- **Keeps** what works (proven color contrast, clean grid)\n- **Improves** what's weak (modernize dated typography, add personality to generic layouts)\n- **Differentiates** intentionally (if they're dark, go light; if they're cold, go warm)\n\nTell the user: *\"Here's what [Competitor] is doing and here's how we're going to beat them at their own game.\"*\n\nThen run §0 Zero to Shipped (starting at Step 3) using this new DESIGN.md.\n\n---\n\n## §B Brand Kit Import 🎨\n\n**Goal:** Transform raw brand assets (logo, colors, fonts) into a complete, production-ready design system.\n\n**Drop in a logo, colors, and fonts. Get a complete design system back.**\n\nEliminates the #1 reason designs look generic: they don't reflect the actual brand.\n\n### What You Need (Any Combination)\n\n- **Logo file** — PNG, SVG, or URL (image analysis will extract dominant colors)\n- **Brand colors** — Hex codes, even if just one primary color\n- **Fonts** — Google Font names, or just \"use something like [brand adjective]\"\n- **Vibe words** — How the brand should feel\n- **Inspiration** — \"Like Linear but warmer\" \u002F \"Like Stripe but for small business\"\n\nYou can work with as little as a logo alone.\n\n### Step 1 — Analyze Logo (if provided)\n\nUse the `image` tool to analyze the logo:\n\n```\nAnalyze this logo image. Extract:\n1. Primary color (most prominent, usually the brand color)\n2. Secondary color (accent or complement)\n3. Background\u002Fneutral color\n4. Overall style (geometric? organic? minimal? bold?)\n5. Adjectives that describe the brand personality\n```\n\nMap extracted colors to roles:\n- Primary brand color → Primary Accent\n- Dark version or complementary → Text Primary \u002F CTA\n- Light version → Surface \u002F Background\n\n### Step 2 — Build the Color System\n\nFrom the provided\u002Fextracted colors, derive a full palette:\n\n| Role | Source |\n|:---|:---|\n| **Primary Accent** | Main brand color from logo\u002Fbrief |\n| **Background** | If dark brand → near-black canvas; if light brand → warm white or cream |\n| **Surface** | 4–8% lighter or darker than background |\n| **Text Primary** | High-contrast against background (≥4.5:1 ratio) |\n| **Text Secondary** | 60–70% opacity of text primary |\n| **Border\u002FDivider** | Subtle version of surface, barely visible |\n| **Success\u002FError** | Industry-standard green\u002Fred unless brand specifically defines |\n\n**Color naming rule:** Every color must have a descriptive name, not a technical one.\n- ✅ \"Electric Indigo (#6366f1) for primary actions\"\n- ❌ \"Purple (#6366f1) for buttons\"\n\n### Step 3 — Select Typography\n\nIf fonts are provided: validate they're available on Google Fonts, confirm loading.\n\nIf not provided, select based on brand personality:\n\n| Brand feel | Font recommendation |\n|:---|:---|\n| Technical \u002F SaaS | Inter, Geist, or JetBrains Mono for code |\n| Premium \u002F luxury | Playfair Display (display) + Inter (body) |\n| Friendly \u002F consumer | Nunito, Poppins, or Outfit |\n| Editorial \u002F media | Fraunces (display) + Source Serif 4 (body) |\n| Startup \u002F modern | Cal Sans or Plus Jakarta Sans |\n| Minimalist | DM Sans or Figtree |\n\nDefine the full type scale: display size, H1–H3, body, small\u002Fmeta.\n\n### Step 4 — Write DESIGN.md\n\nGenerate a complete `.stitch\u002FDESIGN.md` with all 6 sections populated from the brand analysis.\n\nSection 6 must be immediately usable as a Stitch prompt block — copy-paste ready.\n\nConfirm with the user:\n```\n🎨 Brand kit imported. Here's what I built:\n\nPrimary: Cobalt Blue (#2563eb) — your main brand color\nAccent: Electric Sky (#7dd3fc) — highlights and links  \nBackground: Deep Navy (#0f172a) — canvas\nFont: Inter (body) + Cal Sans (display)\n\nDoes this capture your brand? Say \"looks good\" to continue,\nor describe any changes.\n```\n\nWait for approval before proceeding to generation.\n\n---\n\n## §1 Prompt Enhancement\n\n**Goal:** Transform a vague UI idea into a structured, Stitch-optimized prompt that produces high-fidelity, consistent results.\n\nAlways run this before calling any Stitch generation tool.\n\n### Step 1 — Assess Gaps\n\n| Missing element | Action |\n|:---|:---|\n| Platform | Infer from context or default to Web, Desktop-first |\n| Page type | Infer (landing page, dashboard, form, etc.) |\n| Visual style | Add atmosphere keywords (see [references\u002Fprompt-keywords.md](references\u002Fprompt-keywords.md)) |\n| Color palette | Apply DESIGN.md Section 6 if available; otherwise suggest |\n| Component names | Translate vague → specific (see [references\u002Fdesign-mappings.md](references\u002Fdesign-mappings.md)) |\n\n### Step 2 — Check for DESIGN.md\n\n- **If `.stitch\u002FDESIGN.md` exists:** Extract Section 6 verbatim as the `DESIGN SYSTEM (REQUIRED)` block.\n- **If missing:** Suggest creating one via §2 or §B. Add tip at prompt end.\n\n### Step 3 — Format Output\n\n```markdown\n[One-line vibe + purpose description]\n\n**DESIGN SYSTEM (REQUIRED):**\n- Platform: [Web\u002FMobile], [Desktop\u002FMobile]-first\n- Theme: [Light\u002FDark], [2–3 style descriptors]\n- Background: [Descriptive Name] (#hex)\n- Primary Accent: [Descriptive Name] (#hex) for [role]\n- Text Primary: [Descriptive Name] (#hex)\n- Font: [Description]\n- Buttons: [Shape and padding description]\n- Cards: [Corner radius and shadow description]\n- Layout: [Container width, spacing philosophy]\n\n**Page Structure:**\n1. **[Section]:** [Specific description]\n2. **[Section]:** [Specific description]\n...\n```\n\n### Step 4 — Accessibility\n\nAlways add to Page Structure: \"All interactive elements have visible focus rings. Minimum 44px tap targets. Color contrast ≥4.5:1 (WCAG AA).\"\n\nSee [examples\u002Fenhanced-prompt.md](examples\u002Fenhanced-prompt.md) for before\u002Fafter reference.\n\n---\n\n## §2 Design System Synthesis\n\n**Goal:** Analyze a Stitch project's screens and generate `.stitch\u002FDESIGN.md`.\n\n### Step 1 — Retrieve Assets\n\n1. `list_tools` → find Stitch MCP prefix\n2. `[prefix]:list_projects` (filter: \"view=owned\") if no project ID\n3. `[prefix]:list_screens` if no screen ID\n4. `[prefix]:get_screen` with both IDs (numeric only)\n5. `web_fetch` the `htmlCode.downloadUrl` → parse Tailwind config from `\u003Chead>`\n6. `[prefix]:get_project` (full `projects\u002F{id}` path) → get `designTheme`\n\n### Step 2 — Analyze\n\nExtract and translate:\n- **Atmosphere:** 2–3 evocative adjectives describing mood and density\n- **Colors:** Name + hex + role for every distinct color used\n- **Typography:** Font family character, weight hierarchy, spacing style\n- **Geometry:** CSS border-radius → natural language (see [references\u002Fprompt-keywords.md](references\u002Fprompt-keywords.md))\n- **Depth:** Shadow philosophy (flat \u002F whisper-soft \u002F floating \u002F dramatic)\n- **Layout:** Grid, max-width, spacing scale, section margins\n\n### Step 3 — Write `.stitch\u002FDESIGN.md`\n\nFollow the 6-section structure. Section 6 is the most critical — it must be verbatim-copyable into any Stitch prompt and produce consistent results.\n\nSee [examples\u002FDESIGN.md](examples\u002FDESIGN.md) for gold-standard reference.\n\n---\n\n## §2A Admin Dashboard Design Patterns\n\n**Goal:** Generate data-dense, functional admin dashboards that look premium, not bloated.\n\nAdmin dashboards are a distinct design context: information-dense, utility-first, with clear visual hierarchy for data scanning. Always add `data-dense, utilitarian` to Platform in the DESIGN SYSTEM block.\n\n**Key dashboard DESIGN SYSTEM additions:**\n```\n- Platform: Web, Desktop-first, data-dense, admin panel\n- Sidebar: 240px expanded (icon+label) \u002F 60px collapsed (icon-only)\n- Tables: Striped rows, hover highlight, fixed header, 40px row height\n- Charts: [accent] primary line, barely-visible grid lines\n```\n\n**Component patterns** (detailed examples in [examples\u002Fadmin-dashboard.md](examples\u002Fadmin-dashboard.md)):\n\n| Component | Pattern |\n|:---|:---|\n| KPI Card | Bold 2.5rem value, label, trend arrow + %, semantic color |\n| Data Table | Fixed header, alternating rows, sortable columns, pagination |\n| Sidebar | Collapsed\u002Fexpanded toggle, accent strip on active item |\n| Filter Bar | Search + dropdowns + active chips + clear |\n| Chart Wrapper | Title + time range selector + legend |\n\n---\n\n## §2B Mobile App Design Patterns\n\n**Goal:** Generate native-feeling mobile screens with proper touch ergonomics.\n\nMobile apps require: bottom tab navigation, 44px minimum tap targets, status bar + home indicator safe areas.\n\n**Key mobile DESIGN SYSTEM additions:**\n```\n- Platform: Mobile, iOS-first\n- Navigation: Bottom tab bar (49px height, 5 tabs max)\n- Buttons: Full-width, minimum 52px height\n- Safe Areas: 47px status bar (top), 34px home indicator (bottom) — no interactive elements\n- Minimum tap target: 44×44px for ALL interactive elements\n```\n\n**Mobile specs** (full examples in [examples\u002Fmobile-app.md](examples\u002Fmobile-app.md)):\n\n| Element | Specification |\n|:---|:---|\n| Bottom nav | 49px height (iOS), 56px (Android MD3) |\n| Status bar safe area | 44–47px at top |\n| Home indicator safe area | 34px at bottom |\n| Min tap target | 44×44px |\n| Min font size | 16px body (never smaller) |\n\n---\n\n## §3 Screen Generation & Editing\n\n**Goal:** Create and refine Stitch screens with correct tool calls and reliable asset downloads.\n\n**Namespace first:** Always `list_tools` to find active Stitch MCP prefix.\n\n### Generate\n\n```json\n{\n  \"projectId\": \"4044680601076201931\",\n  \"prompt\": \"[Enhanced prompt from §1 — must include DESIGN SYSTEM block]\",\n  \"deviceType\": \"DESKTOP\"\n}\n```\n\nAfter generation:\n1. Update `.stitch\u002Fmetadata.json` via `[prefix]:get_project`\n2. Download HTML → `.stitch\u002Fdesigns\u002F{page}.html`\n3. Download screenshot (append `=w{width}`) → `.stitch\u002Fdesigns\u002F{page}.png`\n4. Surface `outputComponents` AI suggestions to user\n\n### Edit (prefer over regenerating)\n\n```json\n{\n  \"projectId\": \"4044680601076201931\",\n  \"selectedScreenIds\": [\"screenId\"],\n  \"prompt\": \"One specific, targeted change. Preserve everything else.\"\n}\n```\n\nFull tool schemas: [references\u002Ftool-schemas.md](references\u002Ftool-schemas.md)\n\n---\n\n## §4 Build Loop\n\n**Goal:** Autonomously generate all pages of a site using the baton-passing pattern.\n\n### Prerequisites\n\n- `.stitch\u002FDESIGN.md` — the visual DNA (run §2 first)\n- `.stitch\u002FSITE.md` — sitemap, roadmap, visual language\n- `.stitch\u002Fnext-prompt.md` — the baton (current task)\n\n### Each Iteration\n\n1. **Read baton** — parse `page` from YAML frontmatter, prompt from body\n2. **Check sitemap** — skip pages already marked `[x]` in SITE.md Section 4\n3. **Generate** — call `[prefix]:generate_screen_from_text` with full DESIGN.md Section 6 block\n4. **Quality loop** — run §5 on the generated screen (up to 3 passes)\n5. **Integrate** — move to `site\u002Fpublic\u002F`, fix paths, wire navigation\n6. **Update SITE.md** — mark page `[x]` in sitemap\n7. **Write next baton** ⚠️ — MUST happen before completing iteration\n\n### Baton Format\n\n```markdown\n---\npage: pricing\n---\n[One-line description + full DESIGN SYSTEM block + Page Structure]\n```\n\nSchema: [resources\u002Fbaton-schema.md](resources\u002Fbaton-schema.md)\n\n### metadata.json Schema\n\n```json\n{\n  \"projectId\": \"6139132077804554844\",\n  \"title\": \"My App\",\n  \"deviceType\": \"DESKTOP\",\n  \"screens\": {\n    \"index\": {\n      \"id\": \"abc123\",\n      \"sourceScreen\": \"projects\u002F6139132077804554844\u002Fscreens\u002Fabc123\",\n      \"width\": 1440, \"height\": 900\n    }\n  }\n}\n```\n\n### Pitfalls\n- ❌ Forgetting to update `next-prompt.md` — breaks the loop\n- ❌ Rebuilding existing pages — check sitemap first\n- ❌ Dropping the DESIGN.md Section 6 block from prompts — causes visual drift\n\n---\n\n## §5 Quality Loop\n\n**Goal:** Evaluate every generated screen against DESIGN.md criteria, score it out of 10, and refine until it passes (≥8\u002F10) or 3 passes are exhausted.\n\nMost AI design tools generate and move on. FlowStitch checks its own work.\n\n### How It Works\n\nAfter any screen generation, run this loop:\n\n```\nGenerate screen\n    ↓\nDownload screenshot\n    ↓\nEvaluate against DESIGN.md criteria → score \u002F10\n    ↓\nScore ≥ 8? → PASS → continue\nScore \u003C 8? → Generate targeted edit prompt → edit_screens → re-evaluate\n    ↓\nMaximum 3 passes total. After 3, accept best result and note gaps.\n```\n\n### Evaluation Criteria\n\nScore each screen on these dimensions (2 points each, total 10):\n\n**1. Color Fidelity (0–2)**\n- All colors match DESIGN.md palette within 10% perceptual distance\n- No rogue colors introduced; no gradient where solid was specified\n- Deduct 1 if any major element uses wrong color family\n\n**2. Typography Adherence (0–2)**\n- Font family matches specification\n- Weight hierarchy correct (bold headlines, regular body)\n- No inconsistent sizes or mixed font families\n- Deduct 1 if font family visually differs from spec\n\n**3. Layout & Spacing (0–2)**\n- Component structure matches Page Structure spec (sections present and ordered)\n- Spacing feels consistent with DESIGN.md principles\n- Max-width container applied; grid alignment clean\n- Deduct 1 if major sections missing or order wrong\n\n**4. Component Quality (0–2)**\n- Buttons, cards, inputs match DESIGN.md component stylings\n- Corner radii, shadows, borders match descriptions\n- Navigation style matches spec\n- Deduct 1 if components clearly deviate (pill buttons when square specified, etc.)\n\n**5. Atmosphere Match (0–2)**\n- Overall visual impression matches DESIGN.md atmosphere description\n- Density, whitespace, mood are aligned\n- Screenshot could plausibly appear on the target brand's website\n- Deduct 1–2 if vibe feels completely off\n\n### Scoring Action\n\n| Score | Action |\n|:---|:---|\n| 8–10 | ✅ PASS — proceed |\n| 6–7 | 🔄 Refine — generate targeted edit, re-evaluate |\n| 4–5 | 🔄 Refine — significant edit prompt, may need regeneration |\n| 0–3 | 🔄 Regenerate from scratch with stronger prompt |\n\n### Targeted Edit Prompt Formula\n\nWhen score \u003C 8, generate an edit prompt targeting only the failing dimensions:\n\n```\nFix the following issues while preserving all correct elements:\n\n[List specific issues with precise descriptions]\n\nExample issues:\n- \"The CTA button is using orange (#f97316) but should be Deep Blue (#2563eb)\"\n- \"The hero section font appears to be serif — change to Inter or system sans-serif\"\n- \"The card corners are too sharp — apply gently rounded 12px corners\"\n- \"Section spacing is too tight — add 80px between major sections\"\n\nMake ONLY these changes. Preserve all other visual elements exactly.\n```\n\n### Pass Log\n\nAfter completing the quality loop, write to `.stitch\u002Fquality-log.json`:\n\n```json\n{\n  \"index\": {\n    \"passes\": 2,\n    \"finalScore\": 9,\n    \"issues\": [\"Typography needed correction on pass 1\"]\n  },\n  \"pricing\": {\n    \"passes\": 1,\n    \"finalScore\": 8,\n    \"issues\": []\n  }\n}\n```\n\n---\n\n## §6 React Component Export\n\n**Goal:** Convert Stitch HTML into modular, typed Vite + React\u002FTypeScript components.\n\n### Step 1 — Get Assets\n\nCheck if `.stitch\u002Fdesigns\u002F{page}.html` exists. If not, download:\n\n```bash\nbash scripts\u002Ffetch-stitch.sh \"[htmlCode.downloadUrl]\" \".stitch\u002Fdesigns\u002F{page}.html\"\nbash scripts\u002Ffetch-stitch.sh \"[screenshot.downloadUrl]=w{width}\" \".stitch\u002Fdesigns\u002F{page}.png\"\n```\n\nThe `fetch-stitch.sh` script handles GCS redirects and TLS handshakes that raw fetch tools fail on.\n\n### Step 2 — Extract Style Tokens\n\nParse `tailwind.config` from the HTML `\u003Chead>`. Sync to your project's Tailwind theme. Use only theme-mapped classes — no raw hex values in component code.\n\n### Step 3 — Build Components\n\n**Architecture rules** (non-negotiable):\n- One component per file\n- Business logic → `src\u002Fhooks\u002F`\n- Static data → `src\u002Fdata\u002FmockData.ts`\n- Every component has a `Readonly\u003CT>` props interface named `[Name]Props`\n- No `any` types\n\nStart from [resources\u002Fcomponent-template.tsx](resources\u002Fcomponent-template.tsx). Reference [examples\u002Fgold-standard-card.tsx](examples\u002Fgold-standard-card.tsx) for the pattern.\n\n### Step 3a — Class Composition with cn()\n\nUse `cn()` (from `@\u002Flib\u002Futils`) for any conditional or composed class strings:\n\n```typescript\nimport { cn } from \"@\u002Flib\u002Futils\"\n\u002F\u002F ✅ Correct: theme classes + conditional + override\nclassName={cn(\"rounded-lg bg-surface p-4\", isActive && \"ring-2 ring-primary\", className)}\n\u002F\u002F ❌ Wrong: hardcoded hex in className\nclassName=\"bg-[#2563eb]\"\n```\n\n### Step 3b — Wire Entry Point\n\nWire components into `App.tsx` or `src\u002Fpages\u002F` after building:\n\n```typescript\n\u002F\u002F src\u002FApp.tsx — import and render each page component\nexport default function App() {\n  return \u003Cmain>\u003CHeroSection \u002F>\u003CFeaturesGrid \u002F>\u003C\u002Fmain>\n}\n```\n\n### Step 3c — Admin Dashboard Components\n\nFor admin dashboards, create: `DataTable.tsx`, `KPICard.tsx`, `ChartWrapper.tsx`, `FilterBar.tsx`, `Sidebar.tsx` in `src\u002Fcomponents\u002Fdashboard\u002F` and `src\u002Fcomponents\u002Flayout\u002F`.\n\n### Step 3d — Performance Patterns\n\n```typescript\n\u002F\u002F Code splitting: lazy-load route-level components for faster initial load\nconst DashboardPage = lazy(() => import('.\u002Fpages\u002FDashboardPage'))\n\u002F\u002F Images: loading=\"lazy\" decoding=\"async\" on all non-hero images\n\u002F\u002F Lists >100 items: comment suggesting react-window virtualization\n```\n\n### Step 4 — Quality Gate\n\n```bash\nnpm run validate \u003Cfile>   # TypeScript + architecture check\nnpm run dev               # Visual verification in browser\n```\n\nFull checklist: [resources\u002Farchitecture-checklist.md](resources\u002Farchitecture-checklist.md)\n\nSync Tailwind config to `resources\u002Fstyle-guide.json` (extract from Stitch HTML `\u003Chead>` `tailwind.config` block).\n\n---\n\n## §7 Deploy\n\n**Goal:** Get the site live with one command after React export.\n\n### Option A — Vercel (Recommended)\n\n```bash\n# First time\nnpm install -g vercel\nvercel login\n\n# Deploy\nvercel --prod\n\n# Output: https:\u002F\u002Fyour-project.vercel.app\n```\n\nFor React\u002FVite projects, Vercel auto-detects the framework. No config needed.\n\nIf deploying raw HTML from `site\u002Fpublic\u002F`:\n```bash\nvercel --prod site\u002Fpublic\u002F\n```\n\n### Option B — Netlify\n\n```bash\n# First time\nnpm install -g netlify-cli\nnetlify login\n\n# Deploy raw HTML\nnetlify deploy --prod --dir=site\u002Fpublic\n\n# Deploy React build\nnpm run build\nnetlify deploy --prod --dir=dist\n```\n\n### Option C — GitHub Pages (Static HTML only)\n\n```bash\n# From site\u002Fpublic\u002F\ngit init && git add . && git commit -m \"initial\"\ngit remote add origin https:\u002F\u002Fgithub.com\u002F[user]\u002F[repo].git\ngit push -u origin main\n\n# Enable Pages in repo Settings → Pages → Deploy from branch: main\n```\n\n### Pre-Deploy: SEO & Metadata\n\nAdd to each page's `\u003Chead>` before deploying:\n\n```html\n\u003C!-- Core SEO -->\n\u003Ctitle>[Page Title] | [Brand Name]\u003C\u002Ftitle>\n\u003Cmeta name=\"description\" content=\"[Page description, 150-160 chars]\">\n\u003Clink rel=\"canonical\" href=\"https:\u002F\u002F[your-domain]\u002F[page]\">\n\n\u003C!-- Open Graph (social sharing) -->\n\u003Cmeta property=\"og:title\" content=\"[Page Title]\">\n\u003Cmeta property=\"og:description\" content=\"[Description]\">\n\u003Cmeta property=\"og:image\" content=\"https:\u002F\u002F[your-domain]\u002Fog-image.png\">\n\u003Cmeta property=\"og:url\" content=\"https:\u002F\u002F[your-domain]\">\n\u003Cmeta property=\"og:type\" content=\"website\">\n\n\u003C!-- Favicon -->\n\u003Clink rel=\"icon\" href=\"\u002Ffavicon.ico\">\n\u003Clink rel=\"apple-touch-icon\" href=\"\u002Fapple-touch-icon.png\">\n\n\u003C!-- Font performance: preload + display=swap -->\n\u003Clink rel=\"preconnect\" href=\"https:\u002F\u002Ffonts.googleapis.com\">\n\u003Clink rel=\"preload\" as=\"style\" href=\"https:\u002F\u002Ffonts.googleapis.com\u002Fcss2?family=Inter:wght@400;500;600&display=swap\">\n\u003Clink rel=\"stylesheet\" href=\"...&display=swap\">\n```\n\n**Image optimization before deploy:**\n```bash\n# Compress images (install: npm install -g sharp-cli)\nsharp -i public\u002Fhero.jpg -o public\u002Fhero.jpg --quality 85\n# Or use Squoosh (squoosh.app) for manual optimization\n```\n\n### Post-Deploy Checklist\n\n- [ ] All pages load (spot-check 3+ pages)\n- [ ] Navigation links work across all pages\n- [ ] Images load (check browser network tab)\n- [ ] Mobile responsive (resize or use DevTools)\n- [ ] No console errors\n- [ ] OG tags render correctly (test: https:\u002F\u002Fopengraph.xyz)\n- [ ] Page titles and meta descriptions are set per page\n- [ ] Favicon appears in browser tab\n- [ ] Share the live URL with the user 🎉\n\n---\n\n## §8 Video Walkthrough (Remotion)\n\n**Goal:** Generate a professional walkthrough video from Stitch screens.\n\n### Setup\n\n```bash\nnpm create video@latest -- --blank\ncd video\nnpm install @remotion\u002Ftransitions @remotion\u002Fanimated-emoji\n```\n\n### Workflow\n\n1. `[prefix]:list_screens` → gather all screen IDs\n2. `[prefix]:get_screen` for each → get dimensions + download URLs\n3. Download screenshots at full res (append `=w{width}`) → `public\u002Fassets\u002Fscreens\u002F`\n4. Create `screens.json` manifest (see [resources\u002Fcomposition-checklist.md](resources\u002Fcomposition-checklist.md))\n5. Build `ScreenSlide.tsx` + `WalkthroughComposition.tsx` components\n6. Preview: `npm run dev` → Remotion Studio\n7. Render: `npx remotion render WalkthroughComposition output.mp4 --codec h264`\n\nTransitions: Fade (`@remotion\u002Ftransitions\u002Ffade`) for general use, Slide for sequential flows, Zoom via `spring()` for feature highlights.\n\nFull quality gate: [resources\u002Fcomposition-checklist.md](resources\u002Fcomposition-checklist.md)\n\n---\n\n## §9 shadcn\u002Fui Integration\n\n**Goal:** Layer production-grade accessible components on top of Stitch designs.\n\n### Setup\n\n```bash\nnpx shadcn@latest init   # existing project\n# or\nnpx shadcn@latest create # new project with full config\n```\n\n### MCP Discovery\n\n```\nlist_tools | grep shadcn  # find prefix\n[prefix]:list_components  # browse catalog\n[prefix]:get_component_demo  # see usage\n[prefix]:get_block           # full UI blocks\n```\n\n### Install\n\n```bash\nnpx shadcn@latest add button card dialog form table\n```\n\n### Key Patterns\n\n**Always use `cn()` for class composition:**\n```typescript\nimport { cn } from \"@\u002Flib\u002Futils\"\nclassName={cn(\"base\", conditional && \"extra\", className)}\n```\n\n**Extend, never modify `components\u002Fui\u002F`:**\n```typescript\n\u002F\u002F components\u002Fbrand-button.tsx\nimport { Button } from \"@\u002Fcomponents\u002Fui\u002Fbutton\"\nexport function BrandButton({ ...props }) {\n  return \u003CButton className=\"bg-primary rounded-full px-8\" {...props} \u002F>\n}\n```\n\n**Theme via CSS variables in `globals.css`:**\n```css\n:root { --primary: 221.2 83.2% 53.3%; }\n.dark { --primary: 213.1 93.9% 67.8%; }\n```\n\n---\n\n## File Reference\n\n| Path | Purpose |\n|:---|:---|\n| `references\u002Fprompt-keywords.md` | UI\u002FUX keywords, adjective palettes, shape translations, admin + mobile patterns |\n| `references\u002Fdesign-mappings.md` | Vague → professional term mappings, vibe descriptors, anti-patterns, gradient rules |\n| `references\u002Ftool-schemas.md` | Stitch MCP tool call formats with examples |\n| `resources\u002Fbaton-schema.md` | Build loop baton format + validation checklist |\n| `resources\u002Fsite-template.md` | SITE.md + DESIGN.md starter templates |\n| `resources\u002Fstyle-guide.json` | Tailwind config sync reference + CSS custom property template |\n| `resources\u002Fcomponent-template.tsx` | React component starter (Readonly\u003CT>, cn(), dark mode — replace StitchComponent) |\n| `resources\u002Farchitecture-checklist.md` | React export quality gate (includes admin dashboard + mobile checklists) |\n| `resources\u002Fcomposition-checklist.md` | Remotion video quality gate |\n| `resources\u002Fquality-rubric.md` | Design quality evaluation scoring guide |\n| `examples\u002Fenhanced-prompt.md` | Before\u002Fafter prompt enhancement examples (landing page + login + edit) |\n| `examples\u002FDESIGN.md` | Gold-standard DESIGN.md (furniture\u002Fe-commerce example) |\n| `examples\u002Fbrand-kit-import.md` | Full §B Brand Kit Import walkthrough (Driftwood startup) |\n| `examples\u002Fcompetitive-analysis.md` | Full §A Competitive Analysis walkthrough (Linear vs Loopback) |\n| `examples\u002Fadmin-dashboard.md` | Admin dashboard DESIGN.md + prompt template + component structure |\n| `examples\u002Fmobile-app.md` | Mobile app DESIGN.md + screen prompt + safe area implementation |\n| `examples\u002Fgold-standard-card.tsx` | Reference React component (ActivityCard — Readonly\u003CT>, dark mode, a11y) |\n| `scripts\u002Ffetch-stitch.sh` | Reliable Stitch asset downloader (handles GCS redirects\u002FTLS) |\n","# FlowStitch\n\n## Your AI design team. Idea to deployed website — in one session.\n\nMost tools give you a component. FlowStitch gives you a **shipped product**. Say \"build me a SaaS dashboard\" and it handles everything — prompt engineering, design system generation, multi-page creation, quality evaluation, React export, and Vercel deploy — without you touching a single file.\n\n**What FlowStitch does:**\n- 🚀 **Zero to Shipped** — Full pipeline: one sentence → live URL\n- 🔄 **Quality Loop** — Generates, evaluates, self-corrects (up to 3 passes)\n- 🕵️ **Competitive Intel** — Scrapes any competitor's site and builds something better\n- 🎨 **Brand Kit Import** — Logo + colors + fonts → complete design system\n- 📊 **Admin Dashboards** — KPI cards, data tables, sidebars, charts\n- 📱 **Mobile Apps** — Safe areas, 44px tap targets, bottom nav, native feel\n- ⚛️ **React Export** — Clean, typed, Tailwind + shadcn components\n- 🌐 **One-Command Deploy** — Vercel, Netlify, or GitHub Pages\n\n---\n\n## Prerequisites\n\n**Stitch MCP server must be configured** before using any generation workflows:\n\n```bash\n# Verify Stitch MCP is available\nlist_tools | grep -i stitch\n\n# Add via mcporter if missing:\nmcporter add stitch\n```\n\nStitch docs + prompting guide: https:\u002F\u002Fstitch.withgoogle.com\u002Fdocs\u002Flearn\u002Fprompting\u002F\n\n---\n\n## Workflow Routing Table\n\n| User intent | Section |\n|:---|:---|\n| \"build me a [X]\" \u002F \"zero to shipped\" \u002F \"full pipeline\" | [§0 Zero to Shipped ⚡](#0-zero-to-shipped-) |\n| \"analyze competitor\" \u002F \"reverse-engineer this site\" | [§A Competitive Design Analysis 🕵️](#a-competitive-design-analysis-️) |\n| \"import my brand\" \u002F \"brand kit\" \u002F \"use my logo\" | [§B Brand Kit Import 🎨](#b-brand-kit-import-) |\n| \"enhance my prompt\" \u002F \"polish this idea\" | [§1 Prompt Enhancement](#1-prompt-enhancement) |\n| \"create\u002Fupdate DESIGN.md\" \u002F \"analyze my Stitch project\" | [§2 Design System Synthesis](#2-design-system-synthesis) |\n| \"design a page\" \u002F \"generate a screen\" \u002F \"edit this screen\" | [§3 Screen Generation & Editing](#3-screen-generation--editing) |\n| \"build the site\" \u002F \"run the loop\" \u002F \"next page\" | [§4 Build Loop](#4-build-loop) |\n| \"quality check\" \u002F \"refine\" \u002F \"iterate on design\" | [§5 Quality Loop](#5-quality-loop) |\n| \"export to React\" \u002F \"convert to components\" | [§6 React Component Export](#6-react-component-export) |\n| \"deploy\" \u002F \"go live\" \u002F \"push to Vercel\" | [§7 Deploy](#7-deploy) |\n| \"make a video\" \u002F \"walkthrough video\" | [§8 Video Walkthrough](#8-video-walkthrough-remotion) |\n| \"add shadcn\" \u002F \"use shadcn components\" | [§9 shadcn\u002Fui Integration](#9-shadcnui-integration) |\n\nWhen intent is ambiguous: *\"Are you starting from scratch, analyzing a competitor, or continuing an existing project?\"*\n\n---\n\n## §0 Zero to Shipped ⚡\n\n**Goal:** Take one sentence from the user and produce a fully deployed, multi-page website or app with zero manual steps.\n\nYou handle everything. No hand-holding. No manual steps.\n\n### The Pipeline\n\n```\nUser prompt\n    ↓\n[1] Extract intent (product, audience, vibe)\n    ↓\n[2] Enhance prompt (§1)\n    ↓\n[3] Generate DESIGN.md from first screen (§2)\n    ↓\n[4] Build all pages via loop (§4) — typically 4–6 pages\n    ↓\n[5] Quality loop on each page (§5) — up to 3 refinement passes\n    ↓\n[6] Export to React (§6)\n    ↓\n[7] Live preview → Deploy (§7)\n```\n\n### Step 1 — Extract Intent\n\nFrom the user's description, identify:\n- **Product name** and **one-line value prop**\n- **Target audience** (developers, designers, enterprise, consumers...)\n- **Vibe signals** (any adjectives: \"clean\", \"bold\", \"minimal\", \"playful\")\n- **Page requirements** (infer standard set if not specified)\n\n**Standard page set by type:**\n\n| Site type | Pages |\n|:---|:---|\n| SaaS landing | index, features, pricing, about, contact |\n| Portfolio | index, work, about, contact |\n| Startup \u002F marketing | index, product, about, blog-index, contact |\n| E-commerce | index, catalog, product-detail, about, contact |\n| App \u002F tool | index, features, docs-index, pricing |\n\n### Step 2 — Initialize Project\n\n```bash\nmkdir -p .stitch\u002Fdesigns site\u002Fpublic\n```\n\nCreate `.stitch\u002FSITE.md` using the template from [resources\u002Fsite-template.md](resources\u002Fsite-template.md). Populate:\n- Product name, mission, target audience, voice\n- Visual language (inferred from vibe signals)\n- Initial sitemap with all planned pages as unchecked `[ ]`\n\n### Step 3 — Generate First Screen & DESIGN.md\n\n1. Run prompt enhancement on the landing page (§1)\n2. Create Stitch project: `[prefix]:create_project`\n3. Generate `index` screen: `[prefix]:generate_screen_from_text`\n4. Save to `.stitch\u002Fmetadata.json`\n5. Download screenshot + HTML\n6. **Run §2 (Design System Synthesis)** on the generated screen → write `.stitch\u002FDESIGN.md`\n\nThis DESIGN.md becomes the visual DNA for every subsequent page.\n\n### Step 4 — Build Remaining Pages\n\nFor each remaining page in the sitemap:\n1. Write baton to `.stitch\u002Fnext-prompt.md` (include DESIGN.md Section 6 block)\n2. Generate screen via Stitch\n3. Download assets\n4. Run **§5 Quality Loop** — evaluate and refine until score ≥ 8\u002F10 or 3 passes complete\n5. Integrate into `site\u002Fpublic\u002F`, wire navigation\n6. Update SITE.md sitemap\n\n### Step 5 — React Export\n\nRun §6 on all pages. Output: `src\u002Fcomponents\u002F` with typed, modular components.\n\n### Step 6 — Preview & Deploy\n\n```bash\nnpm run dev   # Local preview\n\n# When ready:\nnpx vercel --prod   # or: npx netlify deploy --prod --dir=site\u002Fpublic\n```\n\nSurface the live URL to the user.\n\n### Progress Reporting\n\nAfter each page completes, report:\n```\n✅ index.html — generated + quality passed (score: 9\u002F10, 1 refinement)\n✅ features.html — generated + quality passed (score: 8\u002F10, 2 refinements)\n🔄 pricing.html — generating...\n```\n\nAt the end:\n```\n🚀 FlowStitch complete!\n   5 pages generated | 3 refined | React exported | Deployed\n   Live URL: https:\u002F\u002Fyour-project.vercel.app\n   Build time: ~8 minutes\n```\n\n**HARD LIMIT:** Max 5 pages × 3 quality passes = 15 Stitch calls. If budget exceeded, skip quality loop on remaining pages and deploy what's clean.\n\n---\n\n## §0 Error Handling\n\n**Goal:** Recover from Stitch tool failures and download errors without aborting a multi-page build.\n\n| Failure | Action |\n|:---|:---|\n| Tool call error | Check JSON structure vs tool-schemas.md; verify projectId format |\n| Project not found | Run `list_projects` to confirm ID; create new project if needed |\n| Download fails | Re-run `fetch-stitch.sh` with quoted URL (GCS URLs expire ~1h) |\n| Generation fails mid-loop | Mark page ⚠️ in progress report, write baton to NEXT page, continue |\n| Quality loop fails 3x | Accept best result, note score, continue to next page |\n\n**Always download assets before running quality loop** — download first, then evaluate.\n\n---\n\n## §A Competitive Design Analysis 🕵️\n\n**Goal:** Reverse-engineer a competitor's design language and build something better-informed and visually differentiated.\n\n**Give it a competitor URL. Get a battle-ready design system back.**\n\nThis is how you build something that looks better than what's already out there, informed by what already works.\n\n### Step 1 — Scrape the Competitor\n\n```python\n# Use web_fetch for clean extraction\nurl = \"[competitor URL]\"\nhtml = web_fetch(url)\n```\n\nIf the site is JS-heavy or blocks scrapers, use the browser tool:\n```\nbrowser: navigate to [url], snapshot, screenshot\n```\n\nAlso fetch their CSS if accessible (look for `\u003Clink rel=\"stylesheet\">` in HTML head).\n\n### Step 2 — Extract Design Language\n\nAnalyze the scraped HTML\u002FCSS for:\n\n**Colors:**\n- CSS custom properties (`--primary`, `--background`, `--foreground`, etc.)\n- Most-used hex\u002Frgb values in inline styles or Tailwind classes\n- Button colors, link colors, background colors, text colors\n\n**Typography:**\n- `font-family` declarations (Google Fonts links in `\u003Chead>` are a goldmine)\n- Font size patterns (`text-4xl`, `text-lg`, etc.)\n- Font weights used for headings vs. body\n\n**Layout patterns:**\n- Max-width containers (e.g., `max-w-7xl`, `max-w-screen-xl`)\n- Grid and flex patterns\n- Section padding\u002Fmargin scale\n\n**Components:**\n- Navigation style (minimal? mega-menu? centered logo?)\n- CTA button shape (rounded? pill? square?)\n- Card patterns (shadow? border? glassmorphism?)\n- Hero layout (full-width image? split? gradient?)\n\n**Overall vibe:**\n- Describe it in 3 adjectives\n- Identify what works well and what you'd improve\n\n### Step 3 — Generate Competitor DESIGN.md\n\nWrite to `.stitch\u002Fcompetitor-DESIGN.md`:\n\n```markdown\n# Competitor Design Analysis: [Brand Name]\n**Source URL:** [URL]\n**Analyzed:** [date]\n\n## What They Did Well\n[3–5 specific observations]\n\n## What's Missing \u002F Weak\n[3–5 specific gaps or dated choices]\n\n## 1. Visual Theme & Atmosphere\n[Analysis]\n\n## 2. Color Palette (Extracted)\n- **[Name]** (#hex) — [role observed]\n\n## 3. Typography\n[Font stack, weight patterns]\n\n## 4. Layout Patterns\n[Max-width, grid, spacing]\n\n## 5. Component Patterns\n[Buttons, cards, nav style]\n```\n\n### Step 4 — Generate Your Improved DESIGN.md\n\nNow synthesize a `.stitch\u002FDESIGN.md` that:\n- **Keeps** what works (proven color contrast, clean grid)\n- **Improves** what's weak (modernize dated typography, add personality to generic layouts)\n- **Differentiates** intentionally (if they're dark, go light; if they're cold, go warm)\n\nTell the user: *\"Here's what [Competitor] is doing and here's how we're going to beat them at their own game.\"*\n\nThen run §0 Zero to Shipped (starting at Step 3) using this new DESIGN.md.\n\n---\n\n## §B Brand Kit Import 🎨\n\n**Goal:** Transform raw brand assets (logo, colors, fonts) into a complete, production-ready design system.\n\n**Drop in a logo, colors, and fonts. Get a complete design system back.**\n\nEliminates the #1 reason designs look generic: they don't reflect the actual brand.\n\n### What You Need (Any Combination)\n\n- **Logo file** — PNG, SVG, or URL (image analysis will extract dominant colors)\n- **Brand colors** — Hex codes, even if just one primary color\n- **Fonts** — Google Font names, or just \"use something like [brand adjective]\"\n- **Vibe words** — How the brand should feel\n- **Inspiration** — \"Like Linear but warmer\" \u002F \"Like Stripe but for small business\"\n\nYou can work with as little as a logo alone.\n\n### Step 1 — Analyze Logo (if provided)\n\nUse the `image` tool to analyze the logo:\n\n```\nAnalyze this logo image. Extract:\n1. Primary color (most prominent, usually the brand color)\n2. Secondary color (accent or complement)\n3. Background\u002Fneutral color\n4. Overall style (geometric? organic? minimal? bold?)\n5. Adjectives that describe the brand personality\n```\n\nMap extracted colors to roles:\n- Primary brand color → Primary Accent\n- Dark version or complementary → Text Primary \u002F CTA\n- Light version → Surface \u002F Background\n\n### Step 2 — Build the Color System\n\nFrom the provided\u002Fextracted colors, derive a full palette:\n\n| Role | Source |\n|:---|:---|\n| **Primary Accent** | Main brand color from logo\u002Fbrief |\n| **Background** | If dark brand → near-black canvas; if light brand → warm white or cream |\n| **Surface** | 4–8% lighter or darker than background |\n| **Text Primary** | High-contrast against background (≥4.5:1 ratio) |\n| **Text Secondary** | 60–70% opacity of text primary |\n| **Border\u002FDivider** | Subtle version of surface, barely visible |\n| **Success\u002FError** | Industry-standard green\u002Fred unless brand specifically defines |\n\n**Color naming rule:** Every color must have a descriptive name, not a technical one.\n- ✅ \"Electric Indigo (#6366f1) for primary actions\"\n- ❌ \"Purple (#6366f1) for buttons\"\n\n### Step 3 — Select Typography\n\nIf fonts are provided: validate they're available on Google Fonts, confirm loading.\n\nIf not provided, select based on brand personality:\n\n| Brand feel | Font recommendation |\n|:---|:---|\n| Technical \u002F SaaS | Inter, Geist, or JetBrains Mono for code |\n| Premium \u002F luxury | Playfair Display (display) + Inter (body) |\n| Friendly \u002F consumer | Nunito, Poppins, or Outfit |\n| Editorial \u002F media | Fraunces (display) + Source Serif 4 (body) |\n| Startup \u002F modern | Cal Sans or Plus Jakarta Sans |\n| Minimalist | DM Sans or Figtree |\n\nDefine the full type scale: display size, H1–H3, body, small\u002Fmeta.\n\n### Step 4 — Write DESIGN.md\n\nGenerate a complete `.stitch\u002FDESIGN.md` with all 6 sections populated from the brand analysis.\n\nSection 6 must be immediately usable as a Stitch prompt block — copy-paste ready.\n\nConfirm with the user:\n```\n🎨 Brand kit imported. Here's what I built:\n\nPrimary: Cobalt Blue (#2563eb) — your main brand color\nAccent: Electric Sky (#7dd3fc) — highlights and links  \nBackground: Deep Navy (#0f172a) — canvas\nFont: Inter (body) + Cal Sans (display)\n\nDoes this capture your brand? Say \"looks good\" to continue,\nor describe any changes.\n```\n\nWait for approval before proceeding to generation.\n\n---\n\n## §1 Prompt Enhancement\n\n**Goal:** Transform a vague UI idea into a structured, Stitch-optimized prompt that produces high-fidelity, consistent results.\n\nAlways run this before calling any Stitch generation tool.\n\n### Step 1 — Assess Gaps\n\n| Missing element | Action |\n|:---|:---|\n| Platform | Infer from context or default to Web, Desktop-first |\n| Page type | Infer (landing page, dashboard, form, etc.) |\n| Visual style | Add atmosphere keywords (see [references\u002Fprompt-keywords.md](references\u002Fprompt-keywords.md)) |\n| Color palette | Apply DESIGN.md Section 6 if available; otherwise suggest |\n| Component names | Translate vague → specific (see [references\u002Fdesign-mappings.md](references\u002Fdesign-mappings.md)) |\n\n### Step 2 — Check for DESIGN.md\n\n- **If `.stitch\u002FDESIGN.md` exists:** Extract Section 6 verbatim as the `DESIGN SYSTEM (REQUIRED)` block.\n- **If missing:** Suggest creating one via §2 or §B. Add tip at prompt end.\n\n### Step 3 — Format Output\n\n```markdown\n[One-line vibe + purpose description]\n\n**DESIGN SYSTEM (REQUIRED):**\n- Platform: [Web\u002FMobile], [Desktop\u002FMobile]-first\n- Theme: [Light\u002FDark], [2–3 style descriptors]\n- Background: [Descriptive Name] (#hex)\n- Primary Accent: [Descriptive Name] (#hex) for [role]\n- Text Primary: [Descriptive Name] (#hex)\n- Font: [Description]\n- Buttons: [Shape and padding description]\n- Cards: [Corner radius and shadow description]\n- Layout: [Container width, spacing philosophy]\n\n**Page Structure:**\n1. **[Section]:** [Specific description]\n2. **[Section]:** [Specific description]\n...\n```\n\n### Step 4 — Accessibility\n\nAlways add to Page Structure: \"All interactive elements have visible focus rings. Minimum 44px tap targets. Color contrast ≥4.5:1 (WCAG AA).\"\n\nSee [examples\u002Fenhanced-prompt.md](examples\u002Fenhanced-prompt.md) for before\u002Fafter reference.\n\n---\n\n## §2 Design System Synthesis\n\n**Goal:** Analyze a Stitch project's screens and generate `.stitch\u002FDESIGN.md`.\n\n### Step 1 — Retrieve Assets\n\n1. `list_tools` → find Stitch MCP prefix\n2. `[prefix]:list_projects` (filter: \"view=owned\") if no project ID\n3. `[prefix]:list_screens` if no screen ID\n4. `[prefix]:get_screen` with both IDs (numeric only)\n5. `web_fetch` the `htmlCode.downloadUrl` → parse Tailwind config from `\u003Chead>`\n6. `[prefix]:get_project` (full `projects\u002F{id}` path) → get `designTheme`\n\n### Step 2 — Analyze\n\nExtract and translate:\n- **Atmosphere:** 2–3 evocative adjectives describing mood and density\n- **Colors:** Name + hex + role for every distinct color used\n- **Typography:** Font family character, weight hierarchy, spacing style\n- **Geometry:** CSS border-radius → natural language (see [references\u002Fprompt-keywords.md](references\u002Fprompt-keywords.md))\n- **Depth:** Shadow philosophy (flat \u002F whisper-soft \u002F floating \u002F dramatic)\n- **Layout:** Grid, max-width, spacing scale, section margins\n\n### Step 3 — Write `.stitch\u002FDESIGN.md`\n\nFollow the 6-section structure. Section 6 is the most critical — it must be verbatim-copyable into any Stitch prompt and produce consistent results.\n\nSee [examples\u002FDESIGN.md](examples\u002FDESIGN.md) for gold-standard reference.\n\n---\n\n## §2A Admin Dashboard Design Patterns\n\n**Goal:** Generate data-dense, functional admin dashboards that look premium, not bloated.\n\nAdmin dashboards are a distinct design context: information-dense, utility-first, with clear visual hierarchy for data scanning. Always add `data-dense, utilitarian` to Platform in the DESIGN SYSTEM block.\n\n**Key dashboard DESIGN SYSTEM additions:**\n```\n- Platform: Web, Desktop-first, data-dense, admin panel\n- Sidebar: 240px expanded (icon+label) \u002F 60px collapsed (icon-only)\n- Tables: Striped rows, hover highlight, fixed header, 40px row height\n- Charts: [accent] primary line, barely-visible grid lines\n```\n\n**Component patterns** (detailed examples in [examples\u002Fadmin-dashboard.md](examples\u002Fadmin-dashboard.md)):\n\n| Component | Pattern |\n|:---|:---|\n| KPI Card | Bold 2.5rem value, label, trend arrow + %, semantic color |\n| Data Table | Fixed header, alternating rows, sortable columns, pagination |\n| Sidebar | Collapsed\u002Fexpanded toggle, accent strip on active item |\n| Filter Bar | Search + dropdowns + active chips + clear |\n| Chart Wrapper | Title + time range selector + legend |\n\n---\n\n## §2B Mobile App Design Patterns\n\n**Goal:** Generate native-feeling mobile screens with proper touch ergonomics.\n\nMobile apps require: bottom tab navigation, 44px minimum tap targets, status bar + home indicator safe areas.\n\n**Key mobile DESIGN SYSTEM additions:**\n```\n- Platform: Mobile, iOS-first\n- Navigation: Bottom tab bar (49px height, 5 tabs max)\n- Buttons: Full-width, minimum 52px height\n- Safe Areas: 47px status bar (top), 34px home indicator (bottom) — no interactive elements\n- Minimum tap target: 44×44px for ALL interactive elements\n```\n\n**Mobile specs** (full examples in [examples\u002Fmobile-app.md](examples\u002Fmobile-app.md)):\n\n| Element | Specification |\n|:---|:---|\n| Bottom nav | 49px height (iOS), 56px (Android MD3) |\n| Status bar safe area | 44–47px at top |\n| Home indicator safe area | 34px at bottom |\n| Min tap target | 44×44px |\n| Min font size | 16px body (never smaller) |\n\n---\n\n## §3 Screen Generation & Editing\n\n**Goal:** Create and refine Stitch screens with correct tool calls and reliable asset downloads.\n\n**Namespace first:** Always `list_tools` to find active Stitch MCP prefix.\n\n### Generate\n\n```json\n{\n  \"projectId\": \"4044680601076201931\",\n  \"prompt\": \"[Enhanced prompt from §1 — must include DESIGN SYSTEM block]\",\n  \"deviceType\": \"DESKTOP\"\n}\n```\n\nAfter generation:\n1. Update `.stitch\u002Fmetadata.json` via `[prefix]:get_project`\n2. Download HTML → `.stitch\u002Fdesigns\u002F{page}.html`\n3. Download screenshot (append `=w{width}`) → `.stitch\u002Fdesigns\u002F{page}.png`\n4. Surface `outputComponents` AI suggestions to user\n\n### Edit (prefer over regenerating)\n\n```json\n{\n  \"projectId\": \"4044680601076201931\",\n  \"selectedScreenIds\": [\"screenId\"],\n  \"prompt\": \"One specific, targeted change. Preserve everything else.\"\n}\n```\n\nFull tool schemas: [references\u002Ftool-schemas.md](references\u002Ftool-schemas.md)\n\n---\n\n## §4 Build Loop\n\n**Goal:** Autonomously generate all pages of a site using the baton-passing pattern.\n\n### Prerequisites\n\n- `.stitch\u002FDESIGN.md` — the visual DNA (run §2 first)\n- `.stitch\u002FSITE.md` — sitemap, roadmap, visual language\n- `.stitch\u002Fnext-prompt.md` — the baton (current task)\n\n### Each Iteration\n\n1. **Read baton** — parse `page` from YAML frontmatter, prompt from body\n2. **Check sitemap** — skip pages already marked `[x]` in SITE.md Section 4\n3. **Generate** — call `[prefix]:generate_screen_from_text` with full DESIGN.md Section 6 block\n4. **Quality loop** — run §5 on the generated screen (up to 3 passes)\n5. **Integrate** — move to `site\u002Fpublic\u002F`, fix paths, wire navigation\n6. **Update SITE.md** — mark page `[x]` in sitemap\n7. **Write next baton** ⚠️ — MUST happen before completing iteration\n\n### Baton Format\n\n```markdown\n---\npage: pricing\n---\n[One-line description + full DESIGN SYSTEM block + Page Structure]\n```\n\nSchema: [resources\u002Fbaton-schema.md](resources\u002Fbaton-schema.md)\n\n### metadata.json Schema\n\n```json\n{\n  \"projectId\": \"6139132077804554844\",\n  \"title\": \"My App\",\n  \"deviceType\": \"DESKTOP\",\n  \"screens\": {\n    \"index\": {\n      \"id\": \"abc123\",\n      \"sourceScreen\": \"projects\u002F6139132077804554844\u002Fscreens\u002Fabc123\",\n      \"width\": 1440, \"height\": 900\n    }\n  }\n}\n```\n\n### Pitfalls\n- ❌ Forgetting to update `next-prompt.md` — breaks the loop\n- ❌ Rebuilding existing pages — check sitemap first\n- ❌ Dropping the DESIGN.md Section 6 block from prompts — causes visual drift\n\n---\n\n## §5 Quality Loop\n\n**Goal:** Evaluate every generated screen against DESIGN.md criteria, score it out of 10, and refine until it passes (≥8\u002F10) or 3 passes are exhausted.\n\nMost AI design tools generate and move on. FlowStitch checks its own work.\n\n### How It Works\n\nAfter any screen generation, run this loop:\n\n```\nGenerate screen\n    ↓\nDownload screenshot\n    ↓\nEvaluate against DESIGN.md criteria → score \u002F10\n    ↓\nScore ≥ 8? → PASS → continue\nScore \u003C 8? → Generate targeted edit prompt → edit_screens → re-evaluate\n    ↓\nMaximum 3 passes total. After 3, accept best result and note gaps.\n```\n\n### Evaluation Criteria\n\nScore each screen on these dimensions (2 points each, total 10):\n\n**1. Color Fidelity (0–2)**\n- All colors match DESIGN.md palette within 10% perceptual distance\n- No rogue colors introduced; no gradient where solid was specified\n- Deduct 1 if any major element uses wrong color family\n\n**2. Typography Adherence (0–2)**\n- Font family matches specification\n- Weight hierarchy correct (bold headlines, regular body)\n- No inconsistent sizes or mixed font families\n- Deduct 1 if font family visually differs from spec\n\n**3. Layout & Spacing (0–2)**\n- Component structure matches Page Structure spec (sections present and ordered)\n- Spacing feels consistent with DESIGN.md principles\n- Max-width container applied; grid alignment clean\n- Deduct 1 if major sections missing or order wrong\n\n**4. Component Quality (0–2)**\n- Buttons, cards, inputs match DESIGN.md component stylings\n- Corner radii, shadows, borders match descriptions\n- Navigation style matches spec\n- Deduct 1 if components clearly deviate (pill buttons when square specified, etc.)\n\n**5. Atmosphere Match (0–2)**\n- Overall visual impression matches DESIGN.md atmosphere description\n- Density, whitespace, mood are aligned\n- Screenshot could plausibly appear on the target brand's website\n- Deduct 1–2 if vibe feels completely off\n\n### Scoring Action\n\n| Score | Action |\n|:---|:---|\n| 8–10 | ✅ PASS — proceed |\n| 6–7 | 🔄 Refine — generate targeted edit, re-evaluate |\n| 4–5 | 🔄 Refine — significant edit prompt, may need regeneration |\n| 0–3 | 🔄 Regenerate from scratch with stronger prompt |\n\n### Targeted Edit Prompt Formula\n\nWhen score \u003C 8, generate an edit prompt targeting only the failing dimensions:\n\n```\nFix the following issues while preserving all correct elements:\n\n[List specific issues with precise descriptions]\n\nExample issues:\n- \"The CTA button is using orange (#f97316) but should be Deep Blue (#2563eb)\"\n- \"The hero section font appears to be serif — change to Inter or system sans-serif\"\n- \"The card corners are too sharp — apply gently rounded 12px corners\"\n- \"Section spacing is too tight — add 80px between major sections\"\n\nMake ONLY these changes. Preserve all other visual elements exactly.\n```\n\n### Pass Log\n\nAfter completing the quality loop, write to `.stitch\u002Fquality-log.json`:\n\n```json\n{\n  \"index\": {\n    \"passes\": 2,\n    \"finalScore\": 9,\n    \"issues\": [\"Typography needed correction on pass 1\"]\n  },\n  \"pricing\": {\n    \"passes\": 1,\n    \"finalScore\": 8,\n    \"issues\": []\n  }\n}\n```\n\n---\n\n## §6 React Component Export\n\n**Goal:** Convert Stitch HTML into modular, typed Vite + React\u002FTypeScript components.\n\n### Step 1 — Get Assets\n\nCheck if `.stitch\u002Fdesigns\u002F{page}.html` exists. If not, download:\n\n```bash\nbash scripts\u002Ffetch-stitch.sh \"[htmlCode.downloadUrl]\" \".stitch\u002Fdesigns\u002F{page}.html\"\nbash scripts\u002Ffetch-stitch.sh \"[screenshot.downloadUrl]=w{width}\" \".stitch\u002Fdesigns\u002F{page}.png\"\n```\n\nThe `fetch-stitch.sh` script handles GCS redirects and TLS handshakes that raw fetch tools fail on.\n\n### Step 2 — Extract Style Tokens\n\nParse `tailwind.config` from the HTML `\u003Chead>`. Sync to your project's Tailwind theme. Use only theme-mapped classes — no raw hex values in component code.\n\n### Step 3 — Build Components\n\n**Architecture rules** (non-negotiable):\n- One component per file\n- Business logic → `src\u002Fhooks\u002F`\n- Static data → `src\u002Fdata\u002FmockData.ts`\n- Every component has a `Readonly\u003CT>` props interface named `[Name]Props`\n- No `any` types\n\nStart from [resources\u002Fcomponent-template.tsx](resources\u002Fcomponent-template.tsx). Reference [examples\u002Fgold-standard-card.tsx](examples\u002Fgold-standard-card.tsx) for the pattern.\n\n### Step 3a — Class Composition with cn()\n\nUse `cn()` (from `@\u002Flib\u002Futils`) for any conditional or composed class strings:\n\n```typescript\nimport { cn } from \"@\u002Flib\u002Futils\"\n\u002F\u002F ✅ Correct: theme classes + conditional + override\nclassName={cn(\"rounded-lg bg-surface p-4\", isActive && \"ring-2 ring-primary\", className)}\n\u002F\u002F ❌ Wrong: hardcoded hex in className\nclassName=\"bg-[#2563eb]\"\n```\n\n### Step 3b — Wire Entry Point\n\nWire components into `App.tsx` or `src\u002Fpages\u002F` after building:\n\n```typescript\n\u002F\u002F src\u002FApp.tsx — import and render each page component\nexport default function App() {\n  return \u003Cmain>\u003CHeroSection \u002F>\u003CFeaturesGrid \u002F>\u003C\u002Fmain>\n}\n```\n\n### Step 3c — Admin Dashboard Components\n\nFor admin dashboards, create: `DataTable.tsx`, `KPICard.tsx`, `ChartWrapper.tsx`, `FilterBar.tsx`, `Sidebar.tsx` in `src\u002Fcomponents\u002Fdashboard\u002F` and `src\u002Fcomponents\u002Flayout\u002F`.\n\n### Step 3d — Performance Patterns\n\n```typescript\n\u002F\u002F Code splitting: lazy-load route-level components for faster initial load\nconst DashboardPage = lazy(() => import('.\u002Fpages\u002FDashboardPage'))\n\u002F\u002F Images: loading=\"lazy\" decoding=\"async\" on all non-hero images\n\u002F\u002F Lists >100 items: comment suggesting react-window virtualization\n```\n\n### Step 4 — Quality Gate\n\n```bash\nnpm run validate \u003Cfile>   # TypeScript + architecture check\nnpm run dev               # Visual verification in browser\n```\n\nFull checklist: [resources\u002Farchitecture-checklist.md](resources\u002Farchitecture-checklist.md)\n\nSync Tailwind config to `resources\u002Fstyle-guide.json` (extract from Stitch HTML `\u003Chead>` `tailwind.config` block).\n\n---\n\n## §7 Deploy\n\n**Goal:** Get the site live with one command after React export.\n\n### Option A — Vercel (Recommended)\n\n```bash\n# First time\nnpm install -g vercel\nvercel login\n\n# Deploy\nvercel --prod\n\n# Output: https:\u002F\u002Fyour-project.vercel.app\n```\n\nFor React\u002FVite projects, Vercel auto-detects the framework. No config needed.\n\nIf deploying raw HTML from `site\u002Fpublic\u002F`:\n```bash\nvercel --prod site\u002Fpublic\u002F\n```\n\n### Option B — Netlify\n\n```bash\n# First time\nnpm install -g netlify-cli\nnetlify login\n\n# Deploy raw HTML\nnetlify deploy --prod --dir=site\u002Fpublic\n\n# Deploy React build\nnpm run build\nnetlify deploy --prod --dir=dist\n```\n\n### Option C — GitHub Pages (Static HTML only)\n\n```bash\n# From site\u002Fpublic\u002F\ngit init && git add . && git commit -m \"initial\"\ngit remote add origin https:\u002F\u002Fgithub.com\u002F[user]\u002F[repo].git\ngit push -u origin main\n\n# Enable Pages in repo Settings → Pages → Deploy from branch: main\n```\n\n### Pre-Deploy: SEO & Metadata\n\nAdd to each page's `\u003Chead>` before deploying:\n\n```html\n\u003C!-- Core SEO -->\n\u003Ctitle>[Page Title] | [Brand Name]\u003C\u002Ftitle>\n\u003Cmeta name=\"description\" content=\"[Page description, 150-160 chars]\">\n\u003Clink rel=\"canonical\" href=\"https:\u002F\u002F[your-domain]\u002F[page]\">\n\n\u003C!-- Open Graph (social sharing) -->\n\u003Cmeta property=\"og:title\" content=\"[Page Title]\">\n\u003Cmeta property=\"og:description\" content=\"[Description]\">\n\u003Cmeta property=\"og:image\" content=\"https:\u002F\u002F[your-domain]\u002Fog-image.png\">\n\u003Cmeta property=\"og:url\" content=\"https:\u002F\u002F[your-domain]\">\n\u003Cmeta property=\"og:type\" content=\"website\">\n\n\u003C!-- Favicon -->\n\u003Clink rel=\"icon\" href=\"\u002Ffavicon.ico\">\n\u003Clink rel=\"apple-touch-icon\" href=\"\u002Fapple-touch-icon.png\">\n\n\u003C!-- Font performance: preload + display=swap -->\n\u003Clink rel=\"preconnect\" href=\"https:\u002F\u002Ffonts.googleapis.com\">\n\u003Clink rel=\"preload\" as=\"style\" href=\"https:\u002F\u002Ffonts.googleapis.com\u002Fcss2?family=Inter:wght@400;500;600&display=swap\">\n\u003Clink rel=\"stylesheet\" href=\"...&display=swap\">\n```\n\n**Image optimization before deploy:**\n```bash\n# Compress images (install: npm install -g sharp-cli)\nsharp -i public\u002Fhero.jpg -o public\u002Fhero.jpg --quality 85\n# Or use Squoosh (squoosh.app) for manual optimization\n```\n\n### Post-Deploy Checklist\n\n- [ ] All pages load (spot-check 3+ pages)\n- [ ] Navigation links work across all pages\n- [ ] Images load (check browser network tab)\n- [ ] Mobile responsive (resize or use DevTools)\n- [ ] No console errors\n- [ ] OG tags render correctly (test: https:\u002F\u002Fopengraph.xyz)\n- [ ] Page titles and meta descriptions are set per page\n- [ ] Favicon appears in browser tab\n- [ ] Share the live URL with the user 🎉\n\n---\n\n## §8 Video Walkthrough (Remotion)\n\n**Goal:** Generate a professional walkthrough video from Stitch screens.\n\n### Setup\n\n```bash\nnpm create video@latest -- --blank\ncd video\nnpm install @remotion\u002Ftransitions @remotion\u002Fanimated-emoji\n```\n\n### Workflow\n\n1. `[prefix]:list_screens` → gather all screen IDs\n2. `[prefix]:get_screen` for each → get dimensions + download URLs\n3. Download screenshots at full res (append `=w{width}`) → `public\u002Fassets\u002Fscreens\u002F`\n4. Create `screens.json` manifest (see [resources\u002Fcomposition-checklist.md](resources\u002Fcomposition-checklist.md))\n5. Build `ScreenSlide.tsx` + `WalkthroughComposition.tsx` components\n6. Preview: `npm run dev` → Remotion Studio\n7. Render: `npx remotion render WalkthroughComposition output.mp4 --codec h264`\n\nTransitions: Fade (`@remotion\u002Ftransitions\u002Ffade`) for general use, Slide for sequential flows, Zoom via `spring()` for feature highlights.\n\nFull quality gate: [resources\u002Fcomposition-checklist.md](resources\u002Fcomposition-checklist.md)\n\n---\n\n## §9 shadcn\u002Fui Integration\n\n**Goal:** Layer production-grade accessible components on top of Stitch designs.\n\n### Setup\n\n```bash\nnpx shadcn@latest init   # existing project\n# or\nnpx shadcn@latest create # new project with full config\n```\n\n### MCP Discovery\n\n```\nlist_tools | grep shadcn  # find prefix\n[prefix]:list_components  # browse catalog\n[prefix]:get_component_demo  # see usage\n[prefix]:get_block           # full UI blocks\n```\n\n### Install\n\n```bash\nnpx shadcn@latest add button card dialog form table\n```\n\n### Key Patterns\n\n**Always use `cn()` for class composition:**\n```typescript\nimport { cn } from \"@\u002Flib\u002Futils\"\nclassName={cn(\"base\", conditional && \"extra\", className)}\n```\n\n**Extend, never modify `components\u002Fui\u002F`:**\n```typescript\n\u002F\u002F components\u002Fbrand-button.tsx\nimport { Button } from \"@\u002Fcomponents\u002Fui\u002Fbutton\"\nexport function BrandButton({ ...props }) {\n  return \u003CButton className=\"bg-primary rounded-full px-8\" {...props} \u002F>\n}\n```\n\n**Theme via CSS variables in `globals.css`:**\n```css\n:root { --primary: 221.2 83.2% 53.3%; }\n.dark { --primary: 213.1 93.9% 67.8%; }\n```\n\n---\n\n## File Reference\n\n| Path | Purpose |\n|:---|:---|\n| `references\u002Fprompt-keywords.md` | UI\u002FUX keywords, adjective palettes, shape translations, admin + mobile patterns |\n| `references\u002Fdesign-mappings.md` | Vague → professional term mappings, vibe descriptors, anti-patterns, gradient rules |\n| `references\u002Ftool-schemas.md` | Stitch MCP tool call formats with examples |\n| `resources\u002Fbaton-schema.md` | Build loop baton format + validation checklist |\n| `resources\u002Fsite-template.md` | SITE.md + DESIGN.md starter templates |\n| `resources\u002Fstyle-guide.json` | Tailwind config sync reference + CSS custom property template |\n| `resources\u002Fcomponent-template.tsx` | React component starter (Readonly\u003CT>, cn(), dark mode — replace StitchComponent) |\n| `resources\u002Farchitecture-checklist.md` | React export quality gate (includes admin dashboard + mobile checklists) |\n| `resources\u002Fcomposition-checklist.md` | Remotion video quality gate |\n| `resources\u002Fquality-rubric.md` | Design quality evaluation scoring guide |\n| `examples\u002Fenhanced-prompt.md` | Before\u002Fafter prompt enhancement examples (landing page + login + edit) |\n| `examples\u002FDESIGN.md` | Gold-standard DESIGN.md (furniture\u002Fe-commerce example) |\n| `examples\u002Fbrand-kit-import.md` | Full §B Brand Kit Import walkthrough (Driftwood startup) |\n| `examples\u002Fcompetitive-analysis.md` | Full §A Competitive Analysis walkthrough (Linear vs Loopback) |\n| `examples\u002Fadmin-dashboard.md` | Admin dashboard DESIGN.md + prompt template + component structure |\n| `examples\u002Fmobile-app.md` | Mobile app DESIGN.md + screen prompt + safe area implementation |\n| `examples\u002Fgold-standard-card.tsx` | Reference React component (ActivityCard — Readonly\u003CT>, dark mode, a11y) |\n| `scripts\u002Ffetch-stitch.sh` | Reliable Stitch asset downloader (handles GCS redirects\u002FTLS) |\n",{"name":5,"tags":24,"author":39,"version":40,"description":41},[25,26,27,28,29,30,31,32,33,34,35,36,37,38],"design","ui","website","stitch","react","typescript","deploy","brand","competitive-analysis","admin-dashboard","mobile-app","tailwind","shadcn","vercel","Flow team","2.0.0","Turn one sentence into a deployed website. FlowStitch is your AI design team: prompt engineering, design system generation, multi-page creation, quality evaluation, React\u002FTypeScript export, and one-command deploy. Scrape any competitor's site and build something better. Import a logo and get a full brand system. Build websites, admin dashboards, or mobile apps. Powered by Google Stitch MCP tools. Free from the Flow team.\n","master","4aa004da461d820f4ea5499e58eb8d196cf99016","community\u002Fclawhub\u002Ff\u002Fflowstitch",0,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge","https:\u002F\u002Fskill-explorer-rho.vercel.app","https:\u002F\u002Fgithub.com\u002FLord1Egypt","Unbreakable. Unstoppable. Unmatched⚡.\r\n Speaker of machine tongues 🤖  | World-builder of decentralized dreams 🌐 | Defender of the digital realm🛡️.","2026-06-10 08:21:01",{"source":8,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add Lord1Egypt\u002Fawesome-skill-forge --skill flowstitch",{"tool":57,"command":58},"bunx","bunx skills add Lord1Egypt\u002Fawesome-skill-forge --skill flowstitch",{"tool":60,"command":61},"pnpm","pnpm dlx skills add Lord1Egypt\u002Fawesome-skill-forge --skill flowstitch","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Ff\u002Fflowstitch\u002FSKILL.md",true,[],[66,73,80,87,94,101],{"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":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M785WKJB99G3STR1NF9NRTJW","youtube-content","YouTube transcripts to summaries, threads, blogs.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fyoutube-content\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M785WEFHB0G2S9YA6EPR3H0E","xurl","X\u002FTwitter via xurl CLI: post, search, DM, media, v2 API.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fxurl\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M785W98EDN4EFJXJPMQEHCRC","touchdesigner-mcp","Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftouchdesigner-mcp\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M785W5S9FP3QBH2V191E025P","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":19},"01M785W2AS08NSSH9YATCV6FJB","teams-meeting-pipeline","Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fteams-meeting-pipeline\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":19},"01M785VXKW4T34BTP1SCHW1R7F","systematic-debugging","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fsystematic-debugging\u002FSKILL.md",[],[]]