
Site Prompt
io.github.johntony1由 GitHub 账号 johntony1 发布v0.2.1更新于 Nov 7, 2026
Point at any part of a website and get a prompt that rebuilds it 1:1, or see how it is made.
概览
在 Chrome 中读取并测量任意线上网站,为编码助手生成可 1:1 重建页面的提示词、精确 HTML 与截图。
- 可以做什么
- 读取并测量页面,把构建提示词、精确 HTML、规格与截图写入本地文件夹
- 在实时网站上用工具栏点选元素,支持框选区域、上下级切换与悬停菜单保持
- 按选择器克隆单个组件,含其状态、关键帧与字体
- 把助手按区块写的视觉说明补充进生成的提示词
- 将你构建的组件与所选原版比对,并按区段为重建结果打分
- 把所选元素拆解为图层、规格图或 3D 爆炸视图,并附每层说明卡
- 适用场景
- 适合需要复刻或研究某个网站界面的场景:把组件搬进自己的项目、把重建结果与原版比对,或了解某个布局、效果、动画是如何实现的。
- 运行要求
- 通过 npx 运行的本地 stdio 进程,需要 Node 22+ 以及本机已安装的 Chrome(使用自己的浏览器需 Chrome 144+ 并开启远程调试,否则会另开一个 Chrome 窗口)。安装命令会修改各助手的配置文件;其他 MCP 客户端需手动添加该 stdio 服务器。可选环境变量 SITE_PROMPT_WAIT 控制点选模式的等待时间。
安装
在 SourceWeft 中
- 打开 控制台中的 Site Prompt,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Site Prompt
Paste any website and get what it takes to rebuild it pixel perfect: a build prompt with every measurement, an exact copy of the page, and a check that your rebuild matches. Click any part of a page to clone just that component.
A skill for coding agents: Claude Code, Codex, Cursor, Gemini CLI, Grok CLI, Windsurf, VS Code (Copilot), Claude Desktop, opencode, Zed, and anything else that speaks MCP. Plain Node 22+ and the Chrome already on your machine; nothing else to install.
Install
(or from GitHub: git clone https://github.com/johntony1/site-prompt && node site-prompt/install.mjs)
It finds every agent on your machine and adds site-prompt to each one (the MCP server, and the skill where the agent
reads skills). Only installed agents are touched, every file it edits is backed up first (.bak), and running it
again updates. --only codex,cursor picks agents, --dry-run shows what it would do, --uninstall takes it out.
Then restart your agent and ask: "pick from https://linear.app". In Claude Code: /site-prompt pick https://linear.app.
Any other MCP client: add a stdio server that runs npx -y site-prompt@latest, for example:
SITE_PROMPT_WAIT is how long pick mode waits inside one tool call (default 240 s). Set it below your client's tool
timeout; the agent is told to call again while you are still picking.
What you get
~/Documents/Site Prompts/<site>/ (the prompt is also shown in the chat and copied to the clipboard)
- PROMPT.md: the build prompt. Stack it was built with (framework, styling, motion libraries, host, with the evidence), every colour, type style, radius, shadow, blur and spacing value, each section with its exact copy and structure, hover states, the header on scroll, scroll reveals, keyframes, fonts, breakpoints, tablet and phone.
- exact.html: the page as the browser rendered it, with the site's own CSS inlined in cascade order. Every size, position and breakpoint is the original's. Checked against the live page (SSIM per band; Linear scores 1.0 at 1440 px and 0.997 at 390 px).
- shots/: desktop, tablet and phone full pages, every section at 1440 px.
- spec.json, css/: every measurement, and the compiled stylesheets.
~/Documents/Site Prompts/<site>/components/<name>/ for a component: component.html (standalone, exact, with its hover,
focus and press states, keyframes and embedded fonts), COMPONENT.md, and screenshots of the original and the
clone, checked pixel by pixel.
Pick mode: point at what you like
/site-prompt pick <link> puts a small toolbar on the live site. Hover anything and it says what it is (Button,
Text, Illustration, Section, Component); click what you like, optionally say what you like about it, pick as many as
you want, press Get prompts. Each pick becomes a prompt with its exact code, states, type or artwork, shown in
the chat, saved under picks/, and copied to the clipboard.
- Area. Press Area (or A) and drag a rectangle to take everything inside it.
- Bigger, smaller. ↑ picks what holds the hovered thing, ↓ goes back.
- Hold. A menu that opens on hover closes when the pointer leaves. Open it, press Hold (or H) and the page stays as it is while you pick inside it; H again lets go.
No extension and no app: it runs in your own Chrome when remote debugging is on (chrome://inspect/#remote-debugging,
Chrome 144 or later; Chrome asks you to allow each session), and otherwise in a Chrome window it opens for you.
While you build
Run it inside your project and the toolbar also offers Add to . Pick the button, card or section
you like (the note box takes "put it on my pricing page"), press Add, and your agent builds it into your code in
your stack (Next.js, React, Vue, Svelte, Tailwind, TypeScript...) with the original's exact values, then checks it
in your running dev server against the original with site_match and fixes what is off.
- Show where it goes. With your dev server running, Add opens your site in a new tab: click where each pick goes (a line shows above or below, hold Alt to replace). Your agent gets the spot and the source file and line it is in (React, Vue, Svelte and Astro dev info, else a search of your code).
- Exact or My style. Exact copies it pixel for pixel. My style keeps the layout, spacing and motion and dresses it in your fonts, colours, radius and CSS variables, read from your running site.
- Phones too. Every pick is also read at 390 px wide, so the prompt says what the original changes there.
- Answers in the toolbar. When it is built, your agent says so in the toolbar ("✓ Added to Hero.tsx, 99% match").
Motion and interaction
Every pick also records how it moves. A Chrome of its own replays a person on the page (load, scroll it into
view, wait, hover, move across it, leave, press) and records every animated property, frame by frame. The prompt
gets each move by trigger with its timing and curve: exact where the page says so (CSS transitions and animations,
element.animate from Motion and Framer Motion, GSAP calls and their ScrollTrigger), measured and fitted otherwise
(a cubic-bezier, or a spring's stiffness and damping), plus scroll-linked moves, pointer-following tilts, loops and
staggers, and a filmstrip of the key frames (motion.png).
Break it down
Want to learn how something is made, or make your own version? Pick it and press Break it down in the note
card. You get a lesson instead of a copy: an exploded view of its layers, what each layer is and the technique
behind it (stacked shadows, gradient masks, ::before layers, tilts, what is hidden until hover), and the build in
steps, each with a picture of how far yours should look.
It is also taken apart right on the page, in a second:
- Specs for flat things (a nav bar, a card list): laid flat, with callout cards for fills, type, radius and padding joined to each part, like a Figma spec. 3D for stacked things (an illustration, a card over a glow): the layers lift off and split apart; drag to turn, one click switches between seen from above and facing you.
- A card per layer on the right: why it works, design and engineering details (spacing grid, corner nesting, elevation, tokens, states, hit size, focus style), the site's own CSS as written, and Copy prompt or Copy CSS.
- The thread. Each layer lists its parts as a tree: a card opens into its title, its text and its drawing, a drawing into its lines and circles. Click a part (or double click it on the canvas) for its own card, with the way back above it.
- Live. Animations and canvas drawings keep playing inside the view, in step with the page.
- Every size. Phone, Tablet, Laptop and Big screen tabs show how it lays out at each width. Zoom with the wheel or the + and - buttons.
Tools
site_read: read and measure a page, write the folder above.site_prompt: add the agent's visual notes per section to PROMPT.md.site_pick: pick mode (above).site_component: clone one component by selector.site_match: check a component you built (local url + selector) against the one you picked.site_compare: score a rebuild against the original, band by band, with original | clone | difference sheets.
Limits
The browser only receives the built site, so the stack is named from fingerprints and the original source is never claimed. Pages behind logins or heavy bot protection may not load. Canvas, WebGL and video are photographed, not measured. For learning, redesigns or your own product: if you publish a rebuild, use your own name, logo, copy and images.
What it counts
Site Prompt sends anonymous counts so I can see how many people use it and in which agents: a random id made on your
machine, the event (an install, a first run, a tool used, an install command copied on the project page), the tool's name and whether it worked, the agent's name,
the version, your OS, and the country Cloudflare sees. Never URLs, page content, prompts, files or names. The code
that receives it is in stats/. Turn it off with SITE_PROMPT_TELEMETRY=0 or DO_NOT_TRACK=1, or by
creating ~/.site-prompt/no-telemetry.
Tests
MIT licence.
来源:README.md,提交 43714a3
工具
0版本历史
1- v0.2.1最新Nov 7, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分