Chuyển đến nội dung
Skillpedia
Giao diện (UI/UX)5.5k · #14800

clone-website

Skill này làm gì

Skill này dạy agent cách nghiên cứu một trang web đang chạy và tái tạo nó thành một dự án mới. Skill dùng trình duyệt để ghi lại từng phần, viết đặc tả cho từng phần, và giao việc dựng cho các agent trợ giúp.

Khi nào nên dùng

  • ✓Khi người dùng muốn dựng lại một trang mà họ có quyền sao chép hoặc dùng làm tham chiếu.
  • ✓Khi một đội muốn bản sao sát bố cục của một trang để làm prototype.
  • ✓Khi người dùng muốn một trang được dựng lại trong dự án Next.js và Tailwind.

Liên kết skill

https://github.com/yournextstore/yournextstore/blob/main/.agents/skills/clone-website/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/yournextstore/yournextstore/blob/main/.agents/skills/clone-website/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Dựng lại trang đích này theo từng phần trong dự án Next.js của tôi. Tôi có quyền dùng thiết kế của nó.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent mở trang trong trình duyệt, kiểm tra bố cục và kiểu dáng từng phần, rồi viết một file đặc tả cho mỗi phần. Các agent xây dựng sau đó tạo từng phần trong worktree riêng.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Clone Website

You are about to reverse-engineer and rebuild $ARGUMENTS as a pixel-perfect clone.

This is not a two-phase process (inspect then build). You are a foreman walking the job site — as you inspect each section of the page, you write a detailed specification to a file, then hand that file to a specialist builder agent with everything they need. Extraction and construction happen in parallel, but extraction is meticulous and produces auditable artifacts.

Tool: This skill uses agent-browser for all browser automation — screenshots, DOM inspection, JavaScript evaluation, clicking, scrolling, and viewport control. If you need detailed command reference beyond what's shown here, invoke the /agent-browser skill.

Pre-Flight

  1. agent-browser is required. Test it immediately by running agent-browser open about:blank. If it's not installed, run npm install -g agent-browser && agent-browser install. This skill cannot work without browser automation. If you need detailed command reference, invoke the /agent-browser skill.
  2. Read TARGET.md for URL and scope. If the URL doesn't match $ARGUMENTS, update it.
  3. Verify the base project builds: npm run build. The Next.js + shadcn/ui + Tailwind v4 scaffold should already be in place. If not, tell the user to set it up first.
  4. Create the output directories if they don't exist: docs/research/, docs/research/components/, docs/design-references/, scripts/.

Guiding Principles

These are the truths that separate a successful clone from a "close enough" mess. Internalize them — they should inform every decision you make.

1. Completeness Beats Speed

Every builder agent must receive everything it needs to do its job perfectly: screenshot, exact CSS values, downloaded assets with local paths, real text content, component structure. If a builder has to guess anything — a color, a font size, a padding value — you have failed at extraction. Take the extra minute to extract one more property rather than shipping an incomplete brief.

2. Small Tasks, Perfect Results

When an agent gets "build the entire features section," it glosses over details — it approximates spacing, guesses font sizes, and produces something "close enough" but clearly wrong. When it gets a single focused component with exact CSS values, it nails it every time.

Look at each section and judge its complexity. A simple banner with a heading and a button? One agent. A complex section with 3 different card variants, each with unique hover states and internal layouts? One agent per card variant plus one for the section wrapper. When in doubt, make it smaller.

Complexity budget rule: If a builder prompt exceeds ~150 lines of spec content, the section is too complex for one agent. Break it into smaller pieces. This is a mechanical check — don't override it with "but it's all related."

3. Real Content, Real Assets

Extract the actual text, images, videos, and SVGs from the live site. This is a clone, not a mockup. Use element.textContent, download every <img> and <video>, extract inline <svg> elements as React components. The only time you generate content is when something is clearly server-generated and unique per session.

Layered assets matter. A section that looks like one image is often multiple layers — a background watercolor/gradient, a foreground UI mockup PNG, an overlay icon. Inspect each container's full DOM tree and enumerate ALL <img> elements and background images within it, including absolutely-positioned overlays. Missing an overlay image makes the clone look empty even if the background is correct.

4. Foundation First

Nothing can be built until the foundation exists: global CSS with the target site's design tokens (colors, fonts, spacing), TypeScript types for the content structures, and global assets (fonts, favicons). This is sequential and non-negotiable. Everything after this can be parallel.

5. Extract How It Looks AND How It Behaves

A website is not a screenshot — it's a living thing. Elements move, change, appear, and disappear in response to scrolling, hovering, clicking, resizing, and time. If you only extract the static CSS of each element, your clone will look right in a screenshot but feel dead when someone actually uses it.

For every element, extract its appearance (exact computed CSS via getComputedStyle()) AND its behavior (what

Câu hỏi thường gặp

Nó có cần công cụ trình duyệt không?

Có. Skill nói nó không thể hoạt động nếu thiếu tự động hóa trình duyệt, và yêu cầu cài agent-browser.

Kết quả được lưu ở đâu?

Mỗi phần có một file đặc tả, và dự án được kiểm tra bằng một lệnh build.

Nó trích xuất những gì?

Skill nói nó trích xuất tài nguyên, CSS và nội dung theo từng phần.

Chi tiết

Mô tả gốc của tác giả

Reverse-engineer and clone a website in one shot — extracts assets, CSS, and content section-by-section and proactively dispatches parallel builder agents in worktrees as it goes. Use this whenever the user wants to clone, replicate, rebuild, reverse-engineer, or copy any website. Also triggers on phrases like "make a copy of this site", "rebuild this page", "pixel-perfect clone". Provide the target URL as an argument.

repo: yournextstore/yournextstore

Độ phổ biến

Sao GitHub
5.5k
Vị trí xếp hạng
#14800
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự