copy-web-design
Skill2 starsChanged 52 days agoMITView on GitHub
Use when reverse-engineering, deconstructing, benchmarking, or replicating web designs, design tokens, layout structures, animations, or components from URLs or screenshots. Don't use for backend architecture (use codebase-design) or database design (use schema-migration).
In this repository35 other files it gives its agents.
- agent-planningSkill
- brainstormingSkill
- codebase-designSkill
- code-reviewSkill
- conventional-commitSkill
- executing-plansSkill
- frontend-designSkill
- i18nSkill
- laravelSkill
- prototypeSkill
- pull-requestSkill
- reactSkill
- recursive-researchSkill
- reflect-to-skillSkill
- review-a-skillSkill
- s13nSkill
- schema-migrationSkill
- security-auditSkill
- skill-testingSkill
- summarizeSkill
- systematic-debuggingSkill
- t3-operational-guardrailSkill
- technical-writingSkill
- testing-patternsSkill
- ui-motionSkill
- ui-ux-reviewSkill
- unslopSkill
- upsert-codebase-docsSkill
- verification-before-completionSkill
- vibe-wiseSkill
- web-advisor-promptSkill
- wizardSkill
- workspace-onboardingSkill
- writing-for-agentsSkill
- writing-plansSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 35
Follow these five phases in sequence:
- Distinctive: line 39
Verify target eligibility and establish intellectual property boundaries before inspecting code:
- Distinctive: line 44
Verify trade dress differentiation and asset protocol.
- Very specific: line 100
Verify script execution. Run node -e syntax checks on extracted script blocks to confirm zero syntax errors before declaring completion.
- Distinctive: line 110
Run this check before completing any replication task:
≈ “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.
Files
Copy web design
Reverse-engineer and replicate web designs within legal boundaries by extracting tokens, deconstructing layouts, profiling animations, and writing production code.
Progressive disclosure
This runbook defines sequential execution steps. Read detailed reference manuals when executing specific phases:
| Phase / Topic | Reference manual |
| Legal doctrines, AFC test, trade dress, and clean-room protocol | references/legal-and-ethics.md |
| OKLCH colors, variable typography, fluid clamp scales, and shadow layering | references/visual-tokens-and-typography.md |
| Semantic landmarks, CSS Grid, CSS Subgrid, and container queries | references/layout-and-dom-decomposition.md |
| DevTools animation timelines, easing curves, scroll dynamics, and WebGL | references/motion-and-microinteractions.md |
| CDP extraction, SVG sanitization, Tailwind compilation, and Core Web Vitals | references/tooling-and-code-synthesis.md |
| Browser console token extraction helper | scripts/extract_tokens.js |
<HARD-GATE>
Write-Target Boundary. Read-only against target URLs and external sites. Write only under the repository `src/`, `app/`, or `components/` trees after Phase 1 legal and ethical triage passes. Never save vendor source to disk. Never authenticate, bypass paywalls, or reuse authenticated browser sessions. If a page requires authentication, stop and record `target_ineligible: authentication` in `.agents/state/copy-web-design/legal-triage.md`.
</HARD-GATE>Modes
Select the replication mode before Phase 1:
- Audit mode. Extract visual tokens, typography scales, and motion curves from live pages without writing application code.
- Synthesis mode. Deconstruct DOM structure and compile production components into the target framework.
Workflow
Follow these five phases in sequence:
Phase 1. Legal and ethical triage
Verify target eligibility and establish intellectual property boundaries before inspecting code:
- Confirm public access. Never inspect pages behind authentication walls, paywalls, or encrypted client sessions.
- Filter protected content. Strip all narrative marketing copy, brand logos, trademarks, and client photography. Replicate only uncopyrightable functional layout wireframes and user interaction flows.
- Establish clean-room isolation. Document target behavior as an abstract specification. Build implementation code without copying vendor minified bundles.
- Verify trade dress differentiation and asset protocol. Ensure the target brand identity, unique color trademarks, and logos are replaced with authentic project SVG or PNG assets. Never substitute hand-drawn CSS silhouettes or colored rectangles for required product imagery.
Completion criterion. An abstract specification listing wireframe regions, user flows, and placeholder asset requirements with zero vendor text or trade dress elements.
Phase 2. Visual tokens and typography ingestion
Extract design tokens and typography metrics from the live page:
- Extract custom properties. Run
scripts/extract_tokens.jsin the browser console to gather declared CSS custom properties. - Ingest color systems. Identify primary, neutral, and accent colors. Convert hex values to OKLCH Display P3 definitions. Derive interactive hover and active states using
color-mix(). - Ingest typography scales. Inspect
@font-facedeclarations for variable font axes (wght,wdth,slnt,opsz). Measure heading font sizes across mobile (320px) and desktop (1280px) viewports to extract modular scale ratios and fluidclamp()formulas. - Measure spatial rhythm. Determine the base grid multiplier (4px or 8px). Classify padding and gaps into Inset, Squish, Stack, and Inline patterns.
- Deconstruct elevation shadows. Identify layered umbra and penumbra tiers, and apply chromatic tinting from the background color.
- Code over screenshots. When both source code and screenshots are available, inspect source stylesheets and DOM structures directly rather than estimating token values from visual imagery. Source code provides verified token values, while visual estimation introduces lossy discrepancies.
Completion criterion. A written design token catalog defining OKLCH colors, variable font rules, fluid clamp formulas, spatial scales, and shadow tiers.
Phase 3. Structural layout decomposition
Deconstruct the DOM tree into semantic landmarks and modern CSS layout primitives:
- Strip DOM nesting. Discard framework wrapper divisions. Map visual regions to HTML5 landmarks (
<header>,<nav>,<main>,<article>,<section>,<aside>,<footer>). - Construct macro layout. Implement page-level arrangements using CSS Grid with named template areas. Avoid rigid 12-column row wrappers.
- Align components with Flexbox and Subgrid. Use Flexbox for one-dimensional component alignment. Use CSS Subgrid on card grids to align nested titles and footers across siblings.
- Implement container queries. Add
container-type: inline-sizeto modular components. Define internal responsive variations with@containerqueries rather than global viewport media queries. - Eliminate layout shifts. Assign explicit
aspect-ratioproperties to all media elements to guarantee zero Cumulative Layout Shift.
Completion criterion. A semantic HTML5 component skeleton verified in the browser Accessibility Tree with zero layout shift during rendering.
Phase 4. Motion and physics deconstruction
Deconstruct animations, micro-interactions, and scroll dynamics:
- Profile animation curves. Open Chrome DevTools Animations drawer (
Cmd + Shift + PthenShow Animations). Trigger animations, slow playback to 10 percent, and copy four-point cubic-bezier coordinates. - Enforce duration budgets. Confirm functional UI transitions complete within 150ms to 250ms. Restrict active button compression to
transform: scale(0.97)over 100ms to 140ms. - Profile scroll architecture. Identify whether scroll dynamics use native CSS scroll-driven animations, Lenis smooth scrolling, or GSAP ScrollTrigger. Verify that page search (
Cmd + F) and keyboard navigation remain functional. - Isolate compositor execution. Run the DevTools Performance panel and enable Paint Flashing. Confirm transitions use only
transformandopacitywithout triggering main-thread repaints. - Provide reduced-motion fallbacks. Ensure every spatial animation falls back to a clean opacity fade when
prefers-reduced-motion: reduceis active.
Completion criterion. Recorded cubic-bezier values, confirmed compositor-only execution with zero paint flashes, and verified reduced-motion fallbacks.
Phase 5. Code synthesis and quality gates
Synthesize the final production code into the target framework:
- Select synthesis target:
- For Modern React, synthesize to Next.js or React 19, Tailwind CSS v4
@themetokens, Radix UI headless primitives, andnext/image. - For pure web, synthesize to semantic HTML5, modern CSS with custom properties and CSS Grid, native
<picture>tags, and vanilla ES modules.
- For Modern React, synthesize to Next.js or React 19, Tailwind CSS v4
- Sanitize vector assets. Process all inline SVGs through DOMPurify and SVGO, and replace fixed fills with
currentColor. - Audit accessibility. Run Axe-core checks. Verify keyboard tab order, modal focus traps, and visible focus rings (
:focus-visible). - Validate performance. Run automated Lighthouse audits. Confirm zero Cumulative Layout Shift, passing Largest Contentful Paint, and low Interaction to Next Paint.
- Replicate standalone single-file HTML mockups. When exporting or synchronizing framework code (React, Next.js) to a single-file HTML document:
- Audit external runtime dependencies. Map npm packages to matching public CDN scripts placed before application logic, such as Lenis smooth scroll (
https://unpkg.com/lenis@1.1.18/dist/lenis.min.js) and GSAP core with ScrollTrigger (https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.5/gsap.min.js). - Convert reactive state hooks to explicit DOM computations. Calculate coordinates for active indicators and sliding pills using
offsetLeft,offsetTop,offsetWidth, andoffsetHeight. Recalculate positions inside a window resize listener. - Enforce modal scroll containment. Add
data-lenis-prevent="true"to modal dialogs and scroll containers. Calllenis.stop()when opening a modal and calllenis.start()when closing it. - Prevent shell interpolation during automated edits. Never execute inline shell commands containing unescaped
${...}JavaScript expressions. Write scripts using quoted heredocs (python3 << 'EOF') or dedicated Python runner files. - Verify script execution. Run
node -esyntax checks on extracted script blocks to confirm zero syntax errors before declaring completion.
- Audit external runtime dependencies. Map npm packages to matching public CDN scripts placed before application logic, such as Lenis smooth scroll (
Completion criterion. Working production components passing all Axe-core accessibility checks and Core Web Vitals performance gates, with standalone HTML mirrors verifying CDN script parity, modal scroll locks, and passing Node.js script syntax checks.
Boundary isolation
Confine replication strictly to client-facing layout, CSS tokens, and component UI. Never modify backend API controllers, database schemas, server environments, or data access layers.
Quick audit checklist
Run this check before completing any replication task:
| Check | Passing condition |
| Legal bounds | Zero scraped marketing copy, zero proprietary logos, and clean-room isolation verified |
| Token accuracy | Colors converted to OKLCH, typography fluid via clamp, and base grid documented |
| DOM semantics | Converted from divitis to HTML5 landmarks with verified accessibility tree |
| Layout stability | Explicit aspect-ratio on all media elements with zero Cumulative Layout Shift |
| Motion budgets | Durations under 250ms, compositor-only GPU properties, and reduced-motion supported |
| Standalone parity | External libraries load matching public CDN scripts in the document head |
| Shell safety | Automated file edits use quoted heredocs or script files without variable interpolation errors |
| Modal scroll lock | Modals pause smooth scroll instances and contain localized scroll events |
| Script validation | Inline script tags pass Node.js syntax parsing with exit code 0 |
| Quality gates | Zero console errors, passing Axe-core accessibility tests, and clean code formatting |
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
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.

