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.

概覽

AI 產生的概覽

在 Chrome 中讀取並量測任意線上網站,為編碼助理產生可 1:1 重建頁面的提示詞、精確 HTML 與截圖。

可以做什麼
  • 讀取並量測頁面,把建置提示詞、精確 HTML、規格與截圖寫入本機資料夾
  • 在實際網站上用工具列點選元素,支援框選區域、上下層切換與懸停選單保持
  • 依選擇器複製單一元件,包含其狀態、關鍵影格與字型
  • 把助理依區塊撰寫的視覺說明補進產生的提示詞
  • 將你建置的元件與所選原版比對,並依區段為重建結果評分
  • 把所選元素拆解為圖層、規格圖或 3D 爆炸檢視,並附上每層說明卡
適用情境
適合需要複製或研究某個網站介面的情況:把元件搬進自己的專案、把重建結果與原版比對,或了解某個版面、效果、動畫是如何做出來的。
執行需求
透過 npx 執行的本機 stdio 程序,需要 Node 22+ 以及電腦上已安裝的 Chrome(使用自己的瀏覽器需 Chrome 144+ 並開啟遠端偵錯,否則會另開一個 Chrome 視窗)。安裝指令會修改各助理的設定檔;其他 MCP 用戶端需手動加入此 stdio 伺服器。選用環境變數 SITE_PROMPT_WAIT 控制點選模式的等待時間。
安裝前請注意
安裝程式會尋找並修改電腦上每個助理的設定檔(修改前備份為 .bak),可用 --only 限定範圍、用 --uninstall 移除。預設會傳送匿名使用計數(隨機 id、事件、工具名稱、助理名稱、版本、作業系統、Cloudflare 所見國家);可用 SITE_PROMPT_TELEMETRY=0 或 DO_NOT_TRACK=1 關閉。需要登入的頁面可能無法載入;發布重建成果須使用自己的名稱、標誌、文案與圖片。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Site Prompt,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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

npx site-prompt 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.

AgentWhere it goes
Claude Codeuser MCP server + ~/.claude/skills/site-prompt (or /plugin marketplace add johntony1/site-prompt, then /plugin install site-prompt@site-prompt)
Codex~/.codex/config.toml + ~/.agents/skills/site-prompt
Cursor~/.cursor/mcp.json + ~/.cursor/skills/site-prompt
Gemini CLIan extension in ~/.gemini/extensions/site-prompt
Grok CLI~/.grok/user-settings.json
Windsurf~/.codeium/windsurf/mcp_config.json
VS Code (Copilot)your user mcp.json
Claude Desktopclaude_desktop_config.json
opencode~/.config/opencode/opencode.json + its skills folder
Zedcontext_servers in your settings (comments kept)

Any other MCP client: add a stdio server that runs npx -y site-prompt@latest, for example:

json
{ "mcpServers": { "site-prompt": { "command": "npx", "args": ["-y", "site-prompt@latest"], "env": { "SITE_PROMPT_WAIT": "50" } } } }

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

node test/test.mjs     # end to end against a local page with known answersnode test/view.mjs     # the breakdown viewnode test/pick.mjs     # pick mode end to end

MIT licence.

來源:README.md,提交 43714a3

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.2.1最新Nov 7, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分