Skip to content

Cue file format

A cue file is a small JSON file that describes a page’s cues. Claude writes them for you; this page is for when you want to write one, ship cues with a page, or build a tool that does.

The JSON Schema is pagecue.schema.json.

{
"pagecue": 1,
"title": "Q3 business review",
"cues": [
{
"id": "revenue",
"title": "Revenue up 24% in Q3",
"notes": ["Driven by new EU customers", "Key number: 24%"]
},
{
"id": "churn",
"near": "Churn",
"title": "Churn down to 2.1%",
"notes": ["Was 3.4%", "Q: will it hold? → two cohorts so far"]
}
]
}
Field Required Description
pagecue Yes Always 1, the format version.
title The presentation’s name.
cues Yes The cues, in page order.
Field Required Description
id Yes Unique within the file. Keep it stable: it’s how your own edits stay attached when the file changes.
title Yes The headline. About eight words reads best.
notes The points: an array of strings, or one string with a point per line. Three or fewer read best.
anchor Where the cue starts. Without it (and without near), the cue attaches to the element with data-pagecue="<id>".
near Instead of an anchor: the exact visible text where the cue starts, usually a heading. For pages you can’t mark. Small differences are tolerated.
startAt Fine-tunes where the cue starts, as a share of its part of the page. Set when you drag a section line.

An anchor is either a data-pagecue value as a string, or an object describing the element:

Field Description
tag Required. The element’s tag, such as h2 or section, or * for any.
cue Its data-pagecue value.
id Its id.
testId A test id, as { "attr": "data-testid", "value": "…" }.
selector A CSS selector.
text Its text, matched loosely.
heading The text of the heading it sits under.

pagecue tries the data-pagecue value first, then the id, the test id, the selector, and finally the text. If none matches, the cue is left out and the prompter says so; it’s never moved to the wrong place.

On pages you control, mark where each cue starts with data-pagecue. It’s the sturdiest anchor: it survives text changes and redesigns.

<section data-pagecue="revenue">…</section>
<figure data-pagecue="churn">…</figure>

Cues follow the page from top to bottom: each runs from where its element starts down to where the next cue starts. So mark parts that sit one below another. Don’t mark an element inside another marked one, or two elements side by side (columns, a chart beside its text, cards in one row); mark the container that holds both instead.

An element with data-pagecue but no matching cue still becomes a cue, titled after the element.

Way How Use it for
Linked <link rel="alternate" type="application/vnd.pagecue+json" href="report.cues.json"> in <head> Pages on the web. The file must be on the same site, up to 1 MB.
Inline <script type="application/vnd.pagecue+json">{ … }</script> Files opened from disk, which can’t use a linked file.
Import ··· menu → Add cues from Claude… → Choose a file Private notes for a public page.
Handed over by Claude The publish_cues tool Any page, yours or not.
  • Cues you wrote or edited in the prompter are never overwritten.
  • Otherwise a newer cue file replaces the cue with the same id.
  • When a page’s cue file drops a cue, the prompter drops it too, unless you’ve edited it.

pagecue is free and open source under the MIT licence. Made by Paco the Alpaca.