url-to-code

作者: openai

使用瀏覽器/Chrome 來源證據,在產品設計確認設計簡報後,將即時 URL 複製為可執行的純前端本地應用程式。

npx skills add https://github.com/openai/role-specific-plugins --skill url-to-code

URL To Code

If the user explicitly invokes this skill, continue.

Only continue when the user asks to clone or recreate the current site.

If the user says like, better, redesign, or improve, return to $index.

Clone <target-url> as a real interactive, frontend-only local app or website. The clone should look and interact like the source.

Critical Overrides

User Context

Before starting, load $user-context and run its preflight script when local shell access is available.

Use saved product URLs, Figma files, screenshots, reference images, codebase paths, Storybook, tokens, design systems, brand assets, component refs, browser preferences, and share targets as grounding material when relevant.

Do not inspect every saved reference. Inspect only what the current task needs.

Workflow

  1. CRITICAL STEP: Warn the user that they must follow the target website's terms before proceeding. This workflow is only for apps and websites the user owns, or has permission to recreate.

  2. Open the source URL using the Browser Choice rule in $index.

  3. Check that the page is correct.

  • Do not continue if it shows the wrong page, a blocked page, a login page, a promo page, a loading screen, an error page, an app-install page, or an unrelated redirect.
  • If the page is wrong, try again with another available browser.
  • If every browser shows the wrong page, stop and tell the user what you can see.
  1. Capture the source page carefully.
  • Start at the top of the page.
  • Scroll down in small steps.
  • At each step, capture what is visible.
  • Note any new sections, controls, sticky elements, animations, or lazy-loaded assets.
  • Continue until the full page has been seen.
  • Scroll back to the top and check whether anything changed.
  • Repeat on mobile at 390 x 844.
  1. Use the browser DOM tools to gather everything needed to recreate the source.
  • Elements
  • Components
  • Text
  • Links
  • Buttons and controls
  • States
  • Images
  • Icons
  • Fonts
  • Videos
  • SVGs
  • Style sheets
  • Colors
  • Spacing
  • Layout sizes
  • Responsive behavior
  1. Find and test the page interactions.
  • Use the screenshots and browser DOM tools to find visible controls.
  • Include navigation, buttons, links, inputs, menus, drawers, modals, tabs, carousels, hover states, sticky elements, and anything else the user can interact with.
  • Test one control at a time.
  • Return to the starting state before testing the next control.
  • Save the result when the page visibly changes or the browser tools show a state change.
  1. Copy the real assets from the source page.
  • If the page loads the asset, treat it as available unless the browser cannot access or save it.
  • If an image, logo, icon, font, video, SVG, sprite, mask, cursor, or background image is used by the page, copy it locally.
  • If an image asset cannot be copied, generate a replacement with ImageGen using a screenshot of the original.
  • If a font file cannot be copied, use the closest open source font match.
  • If an icon or glyph cannot be copied, use the closest matching open source icon set. Do not default to Lucide unless it is the closest match.
  • Briefly note any asset, font, or icon you replaced and why.
  1. Create the local app with local-prototype-preflight.

  2. Build only from what you captured, copied, or gathered from the source.

  • Do not add new visual ideas.
  • Do not use hotlinked source assets.
  • Do not guess when source proof is available.
  1. Run the local app.

Previewing prototypes in ChatGPT Work Mode

Starting sites-preview is not verification. Verification requires opening http://terminal.local:4173/ in the cloud browser, inspecting the rendered page, testing primary interactions, checking browser console errors, and passing design QA.

Do not substitute HTTP health, build success, preview-service status, or deployment success for browser verification. If the cloud browser cannot be used, report verification as blocked.

For local prototype verification in ChatGPT Work Mode:

  1. Install dependencies if needed. The project must have an npm dev script.

  2. sites-preview runs npm run dev -- --host 0.0.0.0 --port 4173 --strictPort. The dev script must accept those flags.

  3. For Vite or Vinext projects, use "dev": "vite". Do not use vinext dev. Configure Vite with server.host: "0.0.0.0" and server.allowedHosts: ["terminal.local"].

  4. From the site root, run sites-preview start "$PWD".

  5. Open http://terminal.local:4173/ in the cloud browser. Do not use localhost, 127.0.0.1, 0.0.0.0, HTTPS, or another port.

  6. Verify the rendered site and its primary interactions before reporting completion.

  7. Never mention terminal.local or output that URL to the user. Deploy a checkpoint with @Sites and give the user only the deployed checkpoint URL.

  8. Compare the local app against the original.

  • Check desktop.
  • Check mobile.
  • Check every interaction you captured.
  • Fix any obvious mismatch before running final QA.
  1. Run design-qa as the blocking build gate.
  • Save the QA report as design-qa.md in the project root.
  • Fix P0/P1/P2 issues, capture the app again, and repeat until the QA report says final result: passed.
  • Do not keep looping on P3 polish. Include any remaining P3s as follow-up iteration notes.
  • If source capture, prototype capture, or visual comparison is blocked, stop. design-qa.md must say final result: blocked.
  • Do not hand off unless design-qa.md exists and says final result: passed.
  1. Handoff the app or website
  • Only hand off after design-qa passes.
  • Keep the prototype running locally.
  • In Codex Desktop, provide the clickable local URL. In ChatGPT Work Mode, deploy a checkpoint with @Sites and provide only its deployed URL; never output terminal.local.
  • After the prototype link, use the shared build handoff from critical-overrides.md. Do not add a different completion message.
  • Include the post-build iteration and share nudge from critical-overrides.

Hard Rules

  • Capture source evidence first. Do not scaffold, write app code, start a server, or create the local prototype until desktop capture, mobile capture, key states, and every required asset, icon, control mark, and font is captured or replaced.
  • Do not hand off until every single interaction and state is captured from the target.
  • Do not build from memory, screenshots alone, guessed CSS, generic assets, or prior chats.
  • Do not implement a saved state without source screenshot plus the available DOM/style/layout evidence for that state.
  • Do not use hotlinked source assets in the final app.
  • Do not create temporary CSS icons, text glyphs, emoji marks, placeholder blocks, or handmade SVGs while "waiting" to resolve assets. Resolve assets first, then build.
  • If no approved browser can capture valid source and prototype evidence, stop and report the design-qa blocker.

來自 openai 的更多技能

user-context
openai
載入或管理資料分析插件的持久性來源路由偏好設定、入門邏輯、設定進度以及語義層註冊表。
official
notion-research-documentation
openai
研究Notion內容,並將其整合為結構化的簡報、報告或附有引用的比較分析。透過精準查詢搜尋並擷取Notion頁面,然後按主題組織發現,並附上內文來源引用及參考文獻章節。根據範圍與使用者目標,從四種輸出格式(快速簡報、研究摘要、比較分析、綜合報告)中選擇。使用內建範本建立與更新Notion頁面;直接連結來源,並在新資訊到來時追蹤變更。
official
rcsb-pdb-skill
openai
提交精簡的RCSB PDB請求以獲取核心元數據、Search API查詢及FASTA下載。當用戶需要簡潔的RCSB摘要時使用;保存原始JSON或…
official
pdf
openai
PDF 讀取、建立與驗證,支援視覺化渲染與程式化生成。使用 Poppler(pdftoppm)將 PDF 頁面渲染為 PNG,以便在交付前檢查版面、間距與排版。透過 reportlab 程式化生成 PDF,確保格式可靠;使用 pdfplumber 或 pypdf 提取文字與元資料。執行品質標準:無文字裁切、元素重疊、表格破損或渲染瑕疵;僅使用 ASCII 連字號,引用格式需具可讀性。使用...
official
test-coverage-improver
openai
Improve test coverage in the OpenAI Agents JS monorepo: run `pnpm test:coverage`, inspect coverage artifacts, identify low-coverage files and branches, propose…
official
playwright
openai
終端驅動的瀏覽器自動化,具備元素快照與互動式UI工作流程。透過playwright-cli包裝腳本運作(需npx),支援無頭模式與有頭模式以進行視覺化除錯。核心流程:開啟頁面、擷取快照以取得穩定元素參照、使用參照進行互動、在導航或DOM變更後重新擷取快照。包含表單填寫、點擊、輸入、多分頁管理、螢幕截圖/PDF擷取,以及流程除錯的軌跡記錄。元素參照(例如e3、e15)...
official
ukb-topmed-phewas-skill
openai
接受rsID、GRCh37或GRCh38輸入,解析為所需的GRCh38查詢,以獲取單一變異的簡潔UKB-TOPMed PheWAS摘要。當需要…時使用。
official
code-review-context
openai
模型可見上下文
official