Use Sites to build websites, including landing pages, portfolios, dashboards, portals, trackers, hubs, and internal tools. Always use Sites when the project contains `.openai/hosting.json`.
Use this skill to create or modify sites.
.openai/hosting.json is present, use Sites and preserve the existing project structure.For every site creation or multi-step site modification, when update_plan is available:
update_plan before the first product-source edit or long-running action.in_progress until the work is complete. Call update_plan whenever the active step changes. Advance the plan when the active milestone's outcome actually finishes. Do not perform several sequential milestones under one active step and batch-complete them later.completed and leave any genuinely unfinished steps pending with the blocker explained.Use the tool itself instead of merely writing an equivalent checklist in chat. Skip plan creation only for a trivial, single-action request.
Open a First Meaningful Preview as early as it can accurately represent the product while continuing the complete implementation. Correctness takes priority over the earliest possible handoff.
templates/vinext-starter into the project and preserve its structure. For an existing site, preserve its structure. Read an existing starter file before applying a context-dependent patch to it. Keep first-slice page and style edits independent from optional metadata edits so uninspected metadata context cannot reject the product patch.npm ci as a yielded background process and retain its session ID. For an existing site, inspect its documented package manager, lockfiles, scripts, and dependency state before installing. Start the project's established locked install as a yielded process only when dependencies are required and not already usable; use npm ci only when package-lock.json or npm-shrinkwrap.json is present and npm is the established package manager. Skip installation for buildless or dependency-ready projects. Never create or update a lockfile, switch package managers, or replace the established install flow merely to enter this fast path. While any required install runs, or immediately when none is needed, choose the smallest coherent vertical slice defined below. If that slice needs product changes before the handoff, make the first product implementation patch intentionally bounded to it across only the minimum necessary files.open_in_codex without threadId with target: { type: "browser", url: previewUrl }.sites-hosting flow unless the user explicitly asks to keep the work local.Make the pre-preview deliverable the smallest coherent vertical slice that lets a reasonable person recognize the requested product and its intended visual direction. Require all of the following:
The slice must be accurate for what it shows. Do not hand off a knowingly incorrect, misleading, or structurally disposable implementation merely to optimize preview latency. Take the bounded inspection or setup time required to make the slice trustworthy.
The slice may be static or partially inert. Do not use fixed product-category checklists to expand it. Until after the handoff, defer anything not required for recognition or safe compilation, including secondary surfaces or routes, comprehensive interaction logic, complete data models, exhaustive components or icons, responsive refinements, animation and polish, and advanced capabilities. Security-sensitive or compile-critical prerequisites are exceptions.
For an existing site, use the current coherent experience as this slice when it compiles and still represents the requested product. If the request changes the product's primary direction, apply only the smallest representative part first. Hand off before implementing every part of a non-trivial multi-part update.
This is sequencing, never deletion. Preserve every requested feature and finish all deferred content, interactions, responsive behavior, accessibility, authentication, storage, and other advanced capabilities after the handoff through HMR. For a non-trivial request, if essentially no material requested product work remains after the handoff, the preview happened too late. For a genuinely trivial request, do not manufacture pointless post-preview edits.
Never hand off an untouched starter, blank or loading-only page, generic skeleton, compilation error, or empty browser tab. Treat the preview as an early milestone, never as completion.
Sites hosts Cloudflare Worker-compatible sites.
ESM), not CommonJS (CJS)..openai/hosting.json.sites() Vite plugin to generate Sites-compatible build outputs..env and .env.example files aligned with runtime environment keys needed during development; hosted runtime values are managed by Sites instead of repo metadata.Use another Cloudflare Worker-compatible site layout only when the user explicitly wants a different stack or the existing project already uses one. Refer to Cloudflare's web application framework guides: https://developers.cloudflare.com/workers/framework-guides/web-apps/
Choose only the flows the requested site needs.
templates/vinext-starter/app/chatgpt-auth.ts.Each flow may also be used independently for an existing site, such as adding D1, adding authentication, or validating a current build without rebuilding the whole project.
When creating a new site:
templates/vinext-starter for sites, including sites that need route-level ChatGPT sign-in via dispatch-owned SIWC.When modifying an existing site, preserve its current structure unless the user explicitly asks for a larger rework.
For new sites, default to a static or server-rendered vinext site unless the product needs persistent state, file storage, authentication, or the user explicitly wants a different stack.
references/persistence-and-storage.md) before implementing that capability.references/authentication.md) before implementing that capability.Treat these as hard requirements. Represent the work needed for the First Meaningful Preview as an early build milestone without naming the preview in the visible plan. These rules override generic Browser visibility and tab guidance.
open_in_codex with the exact healthy local URL printed by the server. Do not first open a blank browser, untouched starter, or empty tab. Never substitute browser.tabs.new(), an agent or background tab, visibility.set(true), a screenshot, or other Browser automation. Omit threadId so the target defaults to the calling thread; never retarget the preview to another conversation.open_in_codex reports status: "opened" or status: "existing". If it fails, confirm the server is healthy and retry the same call once without adding threadId. If the handoff alone still fails, report it, do not claim the preview opened, and continue creation, non-browser validation, and hosting. Treat dependency, server, build, artifact, and deployment failures as real failures to fix.Keep the server open after the handoff and finish the complete implementation through HMR before required non-browser validation and hosting.
Before calling the site work complete:
npm run build.After creating or modifying a site, finish local validation and use the sites-hosting skill for local publication preparation, unless the user explicitly asks to keep the work local. Follow the Sites connector descriptions for site creation, versions, deployments, environment variables, and access control.
Use sites-hosting for requests to save without deploying, deploy a saved version, inspect versions, or manage production access.