Publish to Fiddle

Prototypes

HTML your agent writes or you upload, a page or a small site, for people to try and comment on.

A prototype is read-only in Fiddle: people try it and comment, and your agent publishes the next version. Anyone with it open sees Refresh when a new one lands.

Get one in

  • From an agent: it calls publish_artifact with the files, or uploads a zip through create_upload_url.
  • By hand: New → Import… an HTML file or a zip of a site. A single wrapping folder is lifted off.

Anything no other type covers is a prototype.

Rules that help

  • Use relative URLs for your own files (./app.js). For Vite, set base: "./". Root-absolute paths work too.
  • Use hash routes (#/settings) for several pages. Comments remember the route.
  • Put a stable data-anchor="kebab-name" on each meaningful block so comments follow it into the next version.
  • Add data-fiddle-source="file:line" to an element to say where it comes from. Comments on it carry that.

Limits

1,000 files, 20 MB per file. Each version is capped by your plan: 10 MB on Free, 50 MB on Pro, 100 MB on Team.

Inside the page

Each prototype runs on its own origin, https://<id>.fiddle.page, isolated from Fiddle and other artifacts. It has localStorage, IndexedDB and service workers to itself, per person. To keep what people enter and share it with others, use page data. What it can fetch is set by the network policy.

Fiddle's header floats over the top of the page. A sticky header of your own can sit behind it:

css
header {
  position: sticky;
  top: 0;
  padding-top: var(--fiddle-inset-top, 0px);
  margin-top: calc(-1 * var(--fiddle-inset-top, 0px));
}

Thumbnails

Fiddle screenshots each new version for its tile and link previews, in light and dark. To pick the image yourself:

html
<meta name="fiddle:thumbnail" content="cover.png">

An og:image works too. Refresh thumbnail in the artifact's menu takes a new screenshot.