跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
搜索与研究

cloning-websites-to-weaverse

Use when recreating a reference website or brand hub in this Hydrogen plus Weaverse repo, especially when deciding whether to reuse sections, add global styles, update theme schema, or resolve conflicts between the live site and project brand guidelines.

Weaverse · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add Weaverse/shopify-hydrogen-skills --skill cloning-websites-to-weaverse

技能说明


name: cloning-websites-to-weaverse description: Use when recreating a reference website or brand hub in this Hydrogen plus Weaverse repo, especially when deciding whether to reuse sections, add global styles, update theme schema, or resolve conflicts between the live site and project brand guidelines.

Cloning Websites to Weaverse

Overview

Use this repo-specific workflow to turn a reference website into maintainable Weaverse pages. Optimize for reusable sections, accurate section matching, and clear schema boundaries, not one-off screenshot cloning.

Priority order: brand guideline beats source website on visual conflicts. The source website drives page structure, content flow, interaction patterns, and merchandising logic.

Conflict Rule

.guides/brand-guideline.md is the source of truth.

If the live site conflicts with the brand guideline, you MUST follow the brand guideline. This is mandatory even when:

  • a stakeholder says make it look like the live site
  • leadership will compare screenshots
  • the live site appears newer or more polished

Use this rule:

  1. Match the source site where it does not conflict.
  2. Follow the brand guideline where conflict exists.
  3. If unsure, default to the brand guideline.

In conflict cases, explicitly state: I will match the live site where possible, but the brand guideline is the source of truth for conflicting decisions.

When to Use

  • Cloning a marketing page, homepage, or brand hub into this repo
  • Rebuilding a live page in app/sections/ and Weaverse
  • Deciding between existing sections, new sections, app/styles/app.css, and app/weaverse/schema.server.ts
  • Mapping a reference site's section system onto this repo's registered Weaverse components

Do not use this for tiny copy-only edits or isolated bug fixes.

Required Inputs

  • reference URL or origin site to migrate
  • .guides/brand-guideline.md
  • sections.md
  • app/weaverse/components.ts

Required Outputs

  • Clone preview route: a single Hydrogen route (app/routes/clone-preview.$page.tsx) that renders the full cloned page as React + Tailwind — user must approve this before section decomposition begins
  • Design spec: section mapping, interaction model, schema boundaries, implementation direction
  • Content manifest: per-section table of real asset URLs, text content, link targets, Shopify references, and media types — all sourced from the Firecrawl scrape

The clone preview route is the verification checkpoint. The design spec and content manifest together form the complete handoff to generating-weaverse-project-json.

Source of Truth

NeedSource
Colors, type, logo, shape language, legal rules.guides/brand-guideline.md
Section order, content hierarchy, CTA flow, merchandisingcrawled reference website
Existing reusable section matches and child block constraintssections.md
Registry of currently available Weaverse componentsapp/weaverse/components.ts
Shared tokens and repeated cross-section stylesapp/styles/app.css
Sitewide editable controlsapp/weaverse/schema.server.ts
Section-local content and controlssection schema in app/sections/*

Workflow

  1. Read .guides/brand-guideline.md first.

  2. Ensure sections.md exists and is trustworthy before doing section matching.

  3. Scrape the origin page using Firecrawl with both markdown and HTML formats in a single call:

    firecrawl scrape "<url>" --format markdown,html -o .firecrawl/<site>-<page>.json
    

    This returns both clean markdown (for content extraction) and raw HTML (for layout/media analysis) in one request. For pages with JS-rendered content, add --wait-for 3000.

  4. If the page links to supporting subpages that affect the section system, crawl those too:

    firecrawl crawl "<url>" --include-paths <relevant-paths> --limit 10 --max-depth 1 --wait -o .firecrawl/<site>-crawl.json
    
  5. Extract the source page DNA from the markdown + HTML output:

    • design tokens: colors, typography, spacing, border radius, container widths
    • page structure: section order, repeated patterns, CTA flow, merch flow
    • content assets: headings, copy blocks, imagery, video, product/collection modules
    • media sources: extract <video>, <source>, <iframe>, <embed> URLs from the HTML (see Firecrawl Rules → Media source extraction)
  6. Build the content manifest (see Content Manifest section below). This is a required deliverable — the design spec is incomplete without it.

  7. Generate the clone preview route (see Clone Preview Route section below). Convert the scraped page into a single Hydrogen route at app/routes/clone-preview.$page.tsx that renders the entire page as React + Tailwind. This is a single file with all visual blocks rendered inline — no separate component files. Include desktop and mobile responsive styles. The route must be visually faithful to the origin page while using the repo's Tailwind setup and applying brand guideline tokens where they conflict with the origin. Use clearly commented section markers (e.g., {/* === HERO === */}, {/* === PRODUCT GRID === */}) to delineate each visual block — these markers become the splitting boundaries for section decomposition later.

  8. User approval checkpoint — STOP HERE and wait. Present the user with:

    • The preview URL (e.g., http://localhost:3456/clone-preview/<page-slug>)
    • A summary of what the clone covers (section count, key visual blocks, any known gaps or brand-guideline overrides applied)
    • Explicit instruction: "Review the clone preview at the URL above. When you're satisfied it matches the source page, reply 'approved' or 'proceed to sections' to continue. If something is wrong, describe what needs fixing."

    Do not proceed to step 9 until the user explicitly confirms approval.

    If the user requests changes:

    • Update the preview route
    • Re-presen
阅读完整来源 ↗