web-reverse-engineer
v0.1.0
Published
Agent skill for clean-room web reverse engineering: inspect a public reference site, extract high-level animation/design principles, and rebuild an original, brand-distinct implementation.
Maintainers
Readme
Web Reverse-Engineer Skill
This skill defines the workflow and helper scripts used to reverse-engineer public websites for the purpose of clean-room reimplementation.
Overview
The web-reverse-engineer skill provides instructions and automation to audit reference sites, extract design and animation patterns, and reimplement them cleanly without copying proprietary assets or source code.
Core Philosophy
The primary focus is clean-room reimplementation. This is NOT for copying a website, brand, or exact page expression. The goal is to:
- Analyze: Understand how a page does canvas animations, WebGL rendering, scroll triggers, etc.
- Translate: Extract high-level mathematical/design principles (e.g. "three blurred canvas blobs moving procedurally").
- Rebuild: Implement a distinct, original version (e.g. "SignalForge with teal and purple palettes, new copy, and different speeds").
Folder Structure
skills/web-reverse-engineer/
SKILL.md # The main instruction frontmatter/workflow file
README.md # This documentation file
templates/
clean-room-notes.md # Template for documenting reimplementations
DESIGN.md # Portable design-system template for demos/projects
scripts/
scrape_site_assets.js # Playwright deconstruction crawlerClarification Contract
Before an agent proposes or implements a reference-inspired demo, it must make the transfer contract explicit. Ask only for missing context, but cover these dimensions:
Target mode
Motion-only transfer: preserve layout, copywriting, assets, and brand; apply only animation/background/interaction principles.Visual restyle: preserve core content and brand; allow palette, surfaces, spacing, section rhythm, typography treatment, and composition changes.Editorial redesign: allow larger layout and copywriting changes while preserving the underlying product/theme.Full concept demo: create a new fictional brand/page inspired by the reference, not tied to the existing baseline.
Default: when the user says "dựa trên /sample", "giữ brand/copy", or "không sửa /sample", choose
Motion-only transferorVisual restyle. Do not substantially rewrite copy or layout unless explicitly approved.Baseline preservation
- Confirm whether the source page is protected.
- Confirm the output route.
- In this repo,
/sampleis immutable and experiments go under/demos/....
Light vs dark direction
- Ask or propose light/dark direction when either could work.
- Default to light when the user asks to keep the current brand feel.
- If the reference is dark or the user wants maximum visual impact, propose dark but ask first.
- Never silently convert a light baseline into dark mode.
Layout and copywriting permission
- State what will be preserved.
- State what may change if approved.
- Do not rewrite headlines, replace product copy, change core layout, or change brand identity unless the transfer mode allows it.
Asset generation permission
- Default to no new image assets.
- Programmatic canvas/CSS/SVG shapes are allowed when they are part of the implementation and do not copy reference assets.
- Ask before generating new supporting assets, and never download or reuse proprietary assets from the reference site.
Motion intensity
Calm production: subtle, premium, low distraction.Showcase demo: clearly visible within 3 seconds.Debug/analysis: exaggerated motion or overlays for testing only.
Default for public demo routes is
Showcase demo. If a normal user cannot perceive the animation within 3 seconds without debug mode, the demo fails.Technical preference
- Ask only when relevant: CSS gradients/keyframes, Canvas 2D, WebGL, Framer Motion, simplest robust approach, or matching the reference mechanism where feasible.
- Default to the simplest robust clean-room approach that achieves the visible effect.
Design documentation
- Every demo or real project application must include a
DESIGN.md. - Demo routes use
docs/demos/<demo-slug>/DESIGN.mdanddocs/demos/<demo-slug>/clean-room-notes.md. - If an existing demo uses flat docs such as
docs/demos/<demo-slug>.md, keep that file working and link it to the folder-basedDESIGN.mdif adding one. - Real projects use root-level
DESIGN.md, updated carefully if it already exists.
- Every demo or real project application must include a
Use the full Step 2 response format and post-clarification implementation plan in SKILL.md.
How to Run the Audit Script
The local helper script crawls a target URL and records metadata about active canvas elements, style overrides, and network asset payloads.
Prerequisites
Ensure you have playwright dependencies installed:
pnpm install
pnpm exec playwright install chromiumExecution Command
node skills/web-reverse-engineer/scripts/scrape_site_assets.js <target-url>For example, to audit JoinClyde:
node skills/web-reverse-engineer/scripts/scrape_site_assets.js https://www.joinclyde.comExpected Output & Caveats
- Manifest File: Saved to
.tmp/reverse-engineer/[clean-domain]_manifest.json. To prevent massive file sizes, large lists like loaded assets and animated elements are saved as a summary count with a capped sample of up to 50 items. - Screenshot: Full-page view saved to
.tmp/reverse-engineer/[clean-domain]_screenshot.png. - Terminal Output: A concise text printout showcasing viewport metadata, canvas styles/counts, and request breakdowns.
- Canvas/WebGL Caveat: Detection of WebGL or 2D contexts is best-effort. If a site already initialized a WebGL context, the canvas may reject subsequent
.getContextcalls in our evaluator script. Therefore, context type is checked defensively and might show asalready_bound_or_errororunknown.
Clean-Room Rules
Every developer/agent building a demo inspired by a reference site must:
- State the transfer contract before coding.
- Keep
/sampleunchanged unless the user explicitly requests otherwise. - Create a copy of
skills/web-reverse-engineer/templates/clean-room-notes.mdinsidedocs/demos/<demo-slug>/clean-room-notes.mdfor new demos. - Create a
DESIGN.mdfromskills/web-reverse-engineer/templates/DESIGN.mdinsidedocs/demos/<demo-slug>/DESIGN.mdfor new demos. - Document all observed principles, implementation strategies, and differences.
- Keep
.tmp/out of Git commits. Keep reference screenshots and manifests local. - Never use branding elements, copywriting, or logos from the reference site.
- Avoid public wording that implies exact copying. Use "inspired by", "reconstruction", or "style transfer".
