Agent skill

Dom Clone

by cth9191 in cth9191/site-clone

Extract and rebuild the DOM/CSS layer of a web page — layout, typography, colors, spacing, real content, assets, and normal interactions — into clean components, section by section, from exact…

MITAuto-check passedGame Development

Install Dom Clone

skills CLI
$ npx skills add cth9191/site-clone --skill dom-clone -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install cth9191/site-clone dom-clone --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/cth9191/site-clone.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/dom-clone .claude/skills/dom-clone && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
dom-clone
GitHub stars
133
Token cost
~2k tokens
SKILL.md length
1,008 words
Files
3 (incl. references)
Skills in repo
3
Repo updated
First seen
Licence
MIT

At a glance

Extract and rebuild the DOM/CSS layer of a web page — layout, typography, colors, spacing, real content, assets, and normal interactions — into clean components, section by section, from exact…

  • Works in 5 steps: Foundation first (sequential, do it… → Extract each section with exact values → Write a spec file — the contract → …
  • Wants to rebuild a pages markup/styling and there are no GPU-rendered effects
  • SKILL.md covers Inputs, The method: extract → spec →…, Output and What not to do
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Dom Clone is an agent skill from cth9191/site-clone. Extract and rebuild the DOM/CSS layer of a web page — layout, typography, colors, spacing, real content, assets, and normal interactions — into clean components, section by section, from exact getComputedStyle() values rather than guesses. This is the DOM/CSS track: it deliberately does NOT handle WebGL/WebGPU/canvas shader surfaces (those go to shader-extract). Usually driven by the clone-site coordinator, but can be used directly when the user wants to rebuild a page's markup/styling and there are no…

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/asset-resolution.md` and `references/interaction-fingerprints.md`).

It sits in Game Development, covering 3D graphics and WebGL and Typography. The repository describes itself as: Point Claude Code at a URL, get a teardown + a verified near pixel-identical rebuild. Runtime probes, evidence-tagged TEARDOWN.md, Playwright pixel-diff QA. The licence is MIT.

When your agent uses it

  • Wants to rebuild a pages markup/styling and there are no GPU-rendered effects
  • Rebuild this section
  • Extract the CSS/layout
  • Clone the markup and styling of this page

Example prompts

  • “s markup/styling and there are no GPU-rendered effects. Trigger on”
  • “extract the CSS/layout”
  • “clone the markup and styling of this page”
  • “/dom-clone”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Foundation first (sequential, do it yourself)
  2. Extract each section with exact values
  3. Write a spec file — the contract
  4. Build — size agents to the model, not to dogma
  5. Verify with a real diff

What it can do on your machine

Read from SKILL.md and the folder at commit f01d396. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Dom Clone loads about 2k tokens when it runs, and up to ~4.4k if it reads all its reference files. Until then it costs about 171 tokens; SKILL.md has 1,008 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~171
When it runs · the whole SKILL.md, loaded when a task matches
~2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from cth9191/site-clone at commit f01d396, republished under its MIT licence (© cth9191). 1,008 words, ~1,984 tokens.

Download SKILL.mdSave it as .claude/skills/dom-clone/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
dom-clone
description
Extract and rebuild the DOM/CSS layer of a web page — layout, typography, colors, spacing, real content, assets, and normal interactions — into clean components, section by section, from exact getComputedStyle() values rather than guesses. This is the DOM/CSS track: it deliberately does NOT handle WebGL/WebGPU/canvas shader surfaces (those go to shader-extract). Usually driven by the clone-site coordinator, but can be used directly when the user wants to rebuild a page's markup/styling and there are no GPU-rendered effects. Trigger on "rebuild this section", "extract the CSS/layout", "clone the markup and styling of this page", or the DOM half of a full site clone.
argument-hint
<url> | <output-dir with surface-map.json + ROUTING.md>
user-invocable
false

DOM Clone

Rebuild the DOM/CSS layer of a page as clean components whose every value is measured, not estimated. The difference between a clone that reads as "pixel-perfect" and one that reads as "AI slop" is almost entirely whether the spacing, type scale, and colors are the site's real computed values or an approximation. So the whole method is built to remove guessing.

Scope boundary — read this first. This track handles DOM/CSS only. Any <canvas> painting WebGL/WebGPU/2D pixels is invisible to getComputedStyle() and belongs to shader-extract. When you meet a GPU surface (the surface map tags them, or you see a <canvas> you can't style your way into), do NOT rebuild it — leave a placeholder mount (below) and move on. Rebuilding a shader as HTML is the classic failure that makes a clone look empty.

Inputs

  • Driven by clone-site: you get an output dir containing surface-map.json and ROUTING.md. Build only the sections routed to the DOM track; leave mounts for GPU surfaces.
  • Standalone: you get a URL. Do a quick recon first (screenshots + the interaction sweep below). If you spot GPU <canvas> surfaces, tell the user those need the shader-extract track and build the DOM around them.

Requires a browser MCP (Chrome/Playwright/Puppeteer). Keep large extraction artifacts in the output dir, not the conversation.

The method: extract → spec → build → verify

1. Foundation first (sequential, do it yourself)

Nothing can be built until the shared ground exists, because every later component depends on it:

  • Design tokens — run ../clone-site/scripts/tokens-probe.js (tokensProbe()) at 1440/768/390 if the coordinator hasn't already left tokens-*.json in the output dir. Its frequency-ranked palette, type scale, spacing, radii, shadows, and :root custom props ARE the tokens — write them as CSS variables / Tailwind theme, keeping the site's own --names when it has them. Colors and fonts wrong here poison every component.
  • Motion params — likewise take motion.json (../clone-site/scripts/ motion-probe.js) as the source for every GSAP/ScrollTrigger/Lenis/WAAPI value a spec needs. A spec that says scrub: 1.2, start: "top top", end: "+=200%" came from the runtime; one that says "scrubs on scroll" is a guess.
  • Fonts — identify actual font-family on headings/body/labels; wire up the same families (self-hosted or Google) so metrics match.
  • Global assets — favicons, logos, and site-wide images to the project. Resolve each through the asset ladder in references/asset-resolution.md: download the REAL file first; only fall back to reconstructing, generating (Higgsfield, for decorative assets — never brand identity), or a placeholder, and label which tier was used. This keeps the clone honest about what's real.
  • Global behaviors — smooth-scroll library (Lenis/Locomotive), scroll-snap, global keyframes. See references/interaction-fingerprints.md to detect and reproduce these; they change how sections must be built.

Verify the empty shell builds before going further.

2. Extract each section with exact values

For each DOM section top-to-bottom, use the browser to capture — don't hand- measure:

  • A section screenshot (for the builder's reference and later QA).
  • Computed styles for every meaningful element via getComputedStyle() — real px/color/weight values, not "looks like text-lg".
  • Real content — verbatim text, alt text, and every image/<img>/background image in the section, including layered/overlay images (a hero is often a background + a foreground mockup + an icon; miss the overlay and it looks bare). Resolve each asset through references/asset-resolution.md (REAL → RECONSTRUCT → GENERATE → PLACEHOLDER), tagging any that couldn't be downloaded.
  • All states, not just the default — for tabs/accordions click each and record per-state content; for scroll- or hover-triggered changes, capture the before AND after computed styles and the transition (duration/easing) plus the exact trigger. See references/interaction-fingerprints.md.
Show full SKILL.md (438 more words)Show less
3. Write a spec file — the contract

Write one spec per section to <output>/specs/<section>.spec.md BEFORE building. This is the contract between measurement and construction: the builder works from the spec, not from its memory of a browser session, so it can't drift into guessing. A spec has: target file, screenshot path, interaction model (static / click / scroll / hover / time), exact computed styles per element, per-state content, assets with local paths, verbatim text, and responsive behavior at 1440 / 768 / 390. If a builder would have to invent any value, the spec isn't done yet.

For GPU surfaces in this section, the spec says only: placeholder mount — a positioned empty container with the id, size, z-index, and pointer-events from the surface map, for shader-extract to fill later. Nothing more.

4. Build — size agents to the model, not to dogma

Dispatch builders that each receive their spec inline (never "go read the spec"). On agent granularity: splitting a page into many tiny builders is a choice for speed and edit-isolation, not a fidelity requirement — a capable model holds a whole section's spec fine. So prefer one builder per section by default, and split further only when a section contains genuinely independent pieces (three distinct card variants, separate interactive widgets) that benefit from parallel isolation. Over-splitting just adds merge and coordination cost.

If builders run in parallel and might touch shared files, isolate them (git worktrees or separate output subtrees) and merge with the section topology in hand. Each builder verifies its own typecheck/build before finishing.

5. Verify with a real diff

After assembly, run an automated pixel diff (Playwright toHaveScreenshot()), original vs clone, at all three breakpoints — masking any GPU placeholder regions so their emptiness/animation doesn't dominate the result. Tune maxDiffPixelRatio rather than demanding zero diff (anti-aliasing causes false positives). For each real discrepancy, decide: was the spec value wrong (re-extract, fix spec) or did the builder ignore a correct spec (fix component)? Fix at the source, not with a compensating fudge.

Output

  • site/ (or the coordinator's chosen substrate) with styled sections + mounts
  • specs/*.spec.md — one per section, the audit trail
  • Downloaded assets under the project's public dir
  • QA diff results per breakpoint + list of placeholder mounts left for GPU track

What not to do

  • Don't clone from a screenshot; extract the real DOM/CSS/content.
  • Don't rebuild a <canvas> shader/3D effect as HTML — leave a mount.
  • Don't approximate a computed value you could have measured.
  • Don't freeze a <video> or animated SVG to a static image — re-embed / keep it.
  • Don't build a click-based UI when the original is scroll-driven; settle the interaction model before building (it's a rewrite, not a tweak, to change later).

© cth9191, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/dom-clone of cth9191/site-clone.

  • SKILL.md
  • references/asset-resolution.md
  • references/interaction-fingerprints.md

Open the folder on GitHubat commit f01d396

Compare with similar skills

Dom Clone next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Dom Clone compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Dom Clone this skillcth9191/site-clone133—~2kAutomated safety check: PassMIT
Motion Webfeitangyuan/motion-web680—~18kAutomated safety check: PassCC-BY-NC-4.0
Video To Superpromptnirholas/three.ws2281 repos~1.4kAutomated safety check: PassApache-2.0
Scroll World Storytellingnirholas/three.ws2281 repos~3kAutomated safety check: PassApache-2.0
Epic Designalirezarezvani/claude-skills28k1 repos~4kAutomated safety check: PassMIT
Oma Designfirst-fluke/oh-my-agent1.3k—~2.9kAutomated safety check: PassMIT

Similar skills

  • Motion Web

    feitangyuan/motion-web

    Design and build motion-first creative websites — page design (structure, type scale, palette, spacing) plus interaction choreography: scroll animation, Framer Motion, GSAP, and light 3D via…

    680 GitHub stars~18k tokensUpdated 24 days ago
    Game DevelopmentAuto-check passed
  • Video To Superprompt

    nirholas/three.ws

    Turn a reference video into a super detailed recreation or inspiration prompt.

    228 GitHub starsUsed in 1 repo~1.4k tokens
    Game DevelopmentAuto-check passed
  • Scroll World Storytelling

    nirholas/three.ws

    Turn an article, case study, brand narrative, product journey, or long-form story into a cinematic scroll-driven landing page using one of three renderers: scrubbed video, a real-time Three.js…

    228 GitHub starsUsed in 1 repo~3k tokens
    Frontend & DesignAuto-check passed
  • Epic Design

    alirezarezvani/claude-skills

    Build immersive, cinematic 2.5D interactive websites using scroll storytelling, parallax depth, text animations, and premium scroll effects — no WebGL required.

    28k GitHub starsUsed in 1 repo~4k tokens
    Frontend & DesignAuto-check passed
  • Oma Design

    first-fluke/oh-my-agent

    AI design specialist skill with DESIGN.md management, anti-pattern enforcement, optional Stitch MCP integration, and component library guidance.

    1.3k GitHub stars~2.9k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Co Op Game Intro Generator

    tl2012tl/comfyUI-llama-TE

    For users creating a two-player co-op game menu or opening animation.

    241 GitHub starsUsed in 4 repos~2k tokens
    Game DevelopmentAuto-check passed

More from cth9191/site-clone

  • Remix Site

    cth9191/site-clone

    Turn a cloned (or any measured) website into YOUR site: re-skin it with your brand, copy, and assets; generate three deliberately different design directions as token/motion/shader overrides and…

    133 GitHub stars~2.6k tokensUpdated 1 mo ago
    Auto-check passed
  • Shader Extract

    cth9191/site-clone

    Extract, reproduce, and locally replay a single WebGL / WebGPU / Canvas / shader / animated-3D visual effect from a web page — the GPU-rendered surface that DOM/CSS cloning is blind to.

    133 GitHub stars~1.4k tokensUpdated 1 mo ago
    Auto-check passed

Questions about Dom Clone

What does Dom Clone do?

Extract and rebuild the DOM/CSS layer of a web page — layout, typography, colors, spacing, real content, assets, and normal interactions — into clean components, section by section, from exact…. Dom Clone is an agent skill from cth9191/site-clone. Extract and rebuild the DOM/CSS layer of a web page — layout, typography, colors, spacing, real content, assets, and normal interactions — into clean components, section by section, from exact getComputedStyle() values rather than guesses.

When should I use Dom Clone?

Dom Clone fits situations like: wants to rebuild a pages markup/styling and there are no GPU-rendered effects; rebuild this section; extract the CSS/layout; clone the markup and styling of this page.

How do I install Dom Clone in Claude Code?

Run `npx skills add cth9191/site-clone --skill dom-clone -a claude-code`. Or copy the skill folder (skills/dom-clone in cth9191/site-clone) into .claude/skills/dom-clone in your project. Claude Code loads it when a task matches its description.

How do I install Dom Clone in Codex?

Run `npx skills add cth9191/site-clone --skill dom-clone -a codex`. Or copy the skill folder (skills/dom-clone in cth9191/site-clone) into .agents/skills/dom-clone in your project. Codex loads it when a task matches its description.

Can I use Dom Clone in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cth9191/site-clone --skill dom-clone -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dom-clone, .gemini/skills/dom-clone, .github/skills/dom-clone and .opencode/skills/dom-clone in your project.

What does Dom Clone need to run?

SKILL.md names no scripts, command-line tools or credentials: Dom Clone is instructions for the agent only.

Does Dom Clone access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Dom Clone safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Dom Clone use?

Dom Clone is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Dom Clone use?

About 2k tokens (SKILL.md is roughly 7.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.4k tokens, read only when the agent opens those files.

What are the alternatives to Dom Clone?

Skills that share tags, products or a category with Dom Clone: Motion Web (feitangyuan/motion-web, 680 stars), Video To Superprompt (nirholas/three.ws, 228 stars), Scroll World Storytelling (nirholas/three.ws, 228 stars) and Epic Design (alirezarezvani/claude-skills, 28k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Dom Clone?

cth9191 (a GitHub user) maintains it in cth9191/site-clone, which has 133 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on August 21, 2026.

Source: cth9191/site-clone on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.