跳到正文
Skillpedia
网站与界面(前端)38k · #7491

clone-website

它能做什么

这项技能在你的项目中把现有网页重新创建为可运行的代码。适合希望获得网站本地可编辑版本的开发者,包括带动画或使用 Framer 构建的页面。

适用场景

  • ✓当你想把现有网页重新创建为可运行的本地代码的时候。
  • ✓当你想要一份页面布局和交互的响应式副本的时候。
  • ✓当你想在同一个应用中重建同一网站的多个页面的时候。

技能链接

https://github.com/JCodesMore/ai-website-cloner-template/blob/master/.agents/skills/clone-website/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/JCodesMore/ai-website-cloner-template/blob/master/.agents/skills/clone-website/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请把这个网站的定价页和关于页作为可运行的代码在我们的应用中重建,并保持布局和动画一致。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会梳理源页面及其资源,然后在浏览器中打开它们,观察其外观和行为。它会以项目自身的结构,把每个页面重建为可编辑的代码,而不是使用截图或 iframe。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Clone a website

Recreate the supplied pages in the current app. Match the source before adding a new design direction. Deliver working, editable code: screenshots, iframes, and downloaded production bundles are references, not the implementation.

1. Map the work

Read project instructions, the actual framework/scripts, and existing routes. Open the source URLs with the available browser. Prefer direct HTTP, asset tools, or APIs for extraction when practical; use the browser to establish appearance and behavior.

Record a short source-to-local route map and the files each page owns. Follow the app's conventions; in this template use src/app/, src/components/sites/<site>/, public/sites/<site>/, and docs/research/<site>/. Give origins, pages, and downloads distinct names; add a port or URL hash when readable names collide.

  • A first root clone may replace the untouched template homepage.
  • Preserve source pathnames for multiple pages from one origin. Query/fragment variations usually represent states of the same route; reproduce those states.
  • Preserve existing authored routes/assets. Update them when requested; resolve unrequested route collisions before replacing anything.
  • When adding pages to an existing clone, extend its layout and global styles without replacing the styles used by existing pages.
  • Use separate apps for different origins unless the user wants a combined app. Combined sites need distinct route prefixes and scoped fonts, styles, and layout.
  • Escape literal URL segments that conflict with framework syntax (_, @, brackets, parentheses) using its supported mechanism, then verify the actual requested URL.

Existing clones are useful starting points: compare them with the current source and record what was reused. Finish when every requested URL has a destination and file ownership is clear.

2. Observe before building

Inspect the whole page at desktop and mobile widths. Scroll top to bottom to load lazy media and reveal sticky/pinned scenes. Then exercise menus, tabs, accordions, carousels, hover states, and primary links. Distinguish changes driven by scroll, click, hover, or time; a click imitation of a scroll-driven section is a different product.

Treat each observation as one sample of a rule. Read declared values (computed styles, CSS variables, a library's live options) rather than inferring them from one rendering, and vary viewport width (including wider than the design), viewport height, input, and state until you know what drives each change. Drive the page with the inputs visitors use (wheel, touch, keyboard, pointer); scripted scrolling bypasses behavior attached to them, such as smooth scrolling.

Save source screenshots labeled with viewport, scroll position, and interaction state. Capture alternate-state content/assets. Keep one compact page brief: section order, typography, layout measurements, asset mapping, and interactions. Add section briefs only when they help independent builders.

Read the inspection reference for extraction and state comparison. For Framer-generated pages, sticky scenes, reveal animations, or animated media, read Framer and motion.

Use the source's real text and the files it actually loads: fonts, images, SVGs, and video. A same-named substitute from another provider or icon set has different metrics or shapes. Measure important geometry/computed styles. Inspect layered images and media elements before rebuilding a visual as HTML. Track source URL → local asset path and verify content type/dimensions: a .png URL may return AVIF.

Finish when every section and meaningful state has enough evidence to build, with unavailable details identified. A large DOM dump does not replace looking at the page.

3. Build a complete first pass

Establish fonts, page width, colors, assets, routes, page-wide behavior, and shared components first. Build each shared component with every observed state (hover, focus, breakpoints) so builders reuse it as-is. Reuse fitting components. Prefer CSS for layout/simple motion and an animation library when source behavior needs it.

Build coherent sections with real content. Delegate independent pages/sections after shared files have an owner. Give builders screenshots, relevant measurements/state notes, asset paths, destination files, and a concrete finish line. A concise brief with precise file references is enough; no fixed age

常见问题

它只是复制截图吗?

不是。截图和 iframe 只是参考,结果是可编辑的代码。

它会覆盖我现有的页面吗?

不会。它会保留现有路由和资源,并在替换任何内容之前处理冲突。

它适用于带动画的页面吗?

适用。它既涵盖带动画的页面,也涵盖 Framer 网站以及普通页面。

详情

作者的原始描述

Rebuild existing web pages as working local code, matching their real content, assets, responsive layout, and interactions. Use for website cloning, replication, or reverse engineering, including Framer sites and animated pages.

repo: JCodesMore/ai-website-cloner-template

热度

GitHub 星标
38k
排名
#7491
许可证
MIT
更新时间
2026/10/19

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

相似技能