agentleFS
acentristacentrist/web-clone-skills/web-clone/SKILL.md

web-clone

Skill1 starsChanged 6 months agoMITView on GitHub

Use when a user asks to clone, mirror, replicate, rebuild, copy, or convert a single public webpage URL into local frontend code; when extracting webpage layout/assets/styles/interactions with Playwright; or when generating a Vite React Tailwind page clone with local verification.

  • Installs packages

5 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions5 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 5

    1. Jane-xiaoer/claude-skill-web-clone★ 981same name
    2. lza6/claw-code-tingfeng★ 5same name
    3. an8079/take-skills★ 4same name
    4. betterlmy/agent-skills★ 3same name
    5. imMamdouhaboammar/Mimera★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When source.json includes a source_set, contracts include desktop/tablet/mobile layout, image, background, and pseudo-element observations …

    line 44
  2. Very specific:

    Read references/code-generation.md, contracts/integration_plan.json, and relevant contracts/contracts/*.json.

    line 55
  3. Very specific:

    Keep mirrored /assets/... paths, source class names, wrappers, section order, button styling, and motion markers.

    line 57
  4. Very specific:

    Do not claim completion from npm run build alone.

    line 79
  5. Distinctive:

    Keep clone outputs outside this skill folder and outside the distribution repo.

    line 86

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Web Clone

Clone one public webpage into a local Vite + React + Tailwind app. Use extracted contracts to generate and refine components. The completion gate is build plus desktop/tablet/mobile visual, runtime, asset, favicon, and motion verification.

Scope is single public page only. Do not crawl multiple pages, recreate backend/auth/CMS behavior, or publish captured source content unless the user owns or is authorized to reproduce it.

Workflow

  1. Install Node dependencies when needed:
    cd /path/to/installed/web-clone
    sh setup.sh
  2. Prepare source extraction:
    cd /path/to/installed/web-clone
    SKILL_DIR="$(pwd)"
    TARGET_URL="https://www.example.com/"
    TARGET_HOST="$(node -e 'const raw = process.argv[1]; const value = /^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(raw) ? raw : `https://${raw}`; const host = new URL(value).hostname.toLowerCase().replace(/^www\./, ""); console.log(host || "page");' "$TARGET_URL")"
    RUN_DIR="${WEB_CLONE_RUN_DIR:-$HOME/web-clone-runs/$TARGET_HOST}"
    PROJECT_NAME="${WEB_CLONE_PROJECT_NAME:-$TARGET_HOST}"
    
    node "$SKILL_DIR/scripts/prepare-clone.mjs" \
      "$TARGET_URL" \
      --run-dir "$RUN_DIR" \
      --viewports desktop=1440x1200,tablet=768x1024,mobile=390x844 \
      --wait 4000
    This writes run_manifest.json, sources/<viewport>/source.json, desktop-compatible source.json, screenshots, annotated DOM, computed styles, image/background/pseudo-element metrics, CSS, assets, favicon data, motion samples, and mirrored local assets in public/assets. By default, output goes under a host-named run directory such as $HOME/web-clone-runs/<hostname>.
  3. Create section contracts:
    node "$SKILL_DIR/scripts/create-contracts.mjs" \
      --source "$RUN_DIR/source.json" \
      --out "$RUN_DIR/contracts"
    When source.json includes a source_set, contracts include desktop/tablet/mobile layout, image, background, and pseudo-element observations so generated fidelity CSS can use viewport-specific media queries.
  4. Assemble the Vite app:
    node "$SKILL_DIR/scripts/assemble-vite-app.mjs" \
      --run-dir "$RUN_DIR" \
      --output "$RUN_DIR/app" \
      --project-name "$PROJECT_NAME"
  5. Component refinement:
    • Read references/code-generation.md, contracts/integration_plan.json, and relevant contracts/contracts/*.json.
    • Improve generated src/components/sections/<namespace>/*.jsx and .css only when verification shows fidelity gaps.
    • Keep mirrored /assets/... paths, source class names, wrappers, section order, button styling, and motion markers.
  6. Build and verify:

    cd "$RUN_DIR/app"
    npm install
    npm run build
    npm run dev -- --host 127.0.0.1 --port 3230

    Then run:

    node "$SKILL_DIR/scripts/verify-clone.mjs" \
      --run-dir "$RUN_DIR" \
      --app-url http://127.0.0.1:3230 \
      --out "$RUN_DIR/verification" \
      --viewports all \
      --motion

Completion Rules

  • Do not claim completion from npm run build alone.
  • Verification must pass for desktop, tablet, and mobile.
  • Default visual thresholds:
    • desktop: first viewport <= 12%, full page <= 18%
    • tablet: first viewport <= 16%, full page <= 22%
    • mobile: first viewport <= 18%, full page <= 24%
  • Verification must also check header/nav/hero/footer presence, button styling, image visibility and aspect ratio, important background colors/images, horizontal overflow, mobile nav usability, local favicons/assets/fonts, console errors, network failures, practical motion, and absence of dangerouslySetInnerHTML.
  • Keep clone outputs outside this skill folder and outside the distribution repo.

Resources

  • scripts/prepare-clone.mjs: multi-viewport Playwright extraction, stable element ids, visual metrics, motion sampling, and asset/favicon/font mirroring.
  • scripts/create-contracts.mjs: layout analysis, section contracts, prompts, shared data, motion manifest, and integration plan.
  • scripts/assemble-vite-app.mjs: Vite + React + Tailwind scaffold, local URL rewrite, favicon head tags, original CSS, fidelity CSS, and motion runtime.
  • scripts/verify-clone.mjs: desktop/tablet/mobile screenshot diff plus DOM/runtime/asset/image/background/region/motion checks.
  • references/code-generation.md: fidelity and section-generation rules.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.