Razshy/Wiggle / mnt-skills/examples/pages
pages
VerifiedALWAYS start here when the user wants a page OR a doc: page, living page, doc, document, living doc, bongo or bongo doc (the old name; new ones are made here, not by a Bongo connector), shared or collaborative doc, write-up, one-pager, memo, brief, proposal, plan, spec, report, meeting notes, notes, checklist, tracker, or anything to read, edit, comment on and share together — 'write this up', 'put this in a doc', 'draft a brief', 'jot this down somewhere we can share and edit', 'turn this file into a page' — the DEFAULT for any of these when no file format is named; a Word/.docx, PDF, .pptx or .xlsx FILE asked for by name goes to that format's skill instead. Also whenever the pages connector is about to be used to create a page. Not for READMEs, code or docstrings. A lowercase /pages as its own word anywhere in the message (not in a URL, path or longer name) invokes this skill whatever else is asked — a summary, an answer, a comparison, a plan: the page is the reply.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 11.1 KB |
| charts-and-data.md | markdown | 11.0 KB |
| failure-branches.md | markdown | 9.7 KB |
charts-and-data.md
View on GitHub# Charts, data, files, images, chips, diagrams
Companion to SKILL.md; the page is born first (steps 1–3), everything here comes after it, as `update`s or plain `create`s on that page. Ids used below, all printed by the birth acknowledgement (or from a `read` of an existing page, whose `files` list each tab's FID and its `content.id` = NID): PID = the page (`created.minted`, also the UUID ending its viewer URL), the viewer URL = the ack's `frame.artifactUrl` (the trailer spells it out; for an existing page, the link the user gave), FID = the tab's file (`lids.f`), NID = the document node (`lids.n`, the node member's `id`), a placeholder = `<session>.<clock>` from that member's `session` + one `keys.empty` clock per heading, in order. Full chart grammar: CHART FIELDS on the `create` tool's `payload` parameter.
## The file road — anything already on disk
A .md, .html, .docx, .csv, .json, image or export on disk never passes through the model: never read it to retype it (read or crunch it locally only to summarize, type its columns or shrink it) — and if you already read it, it STILL goes up by upload, not from your context. Try the upload whatever file types the artifact tool's text lists. Three calls — upload to the page's viewer (your artifact tool's `upload_asset`, `url` = the viewer URL), register the returned 32-hex id (never a `_blob/…` path) as a blob of the page, cite the blob's `blob/<id>`:
```
Artifact tool {action:"upload_asset", url:"<viewer URL>", file_path:"/abs/path/review.md"} → "9f2c…" (32 hex)
create {object:"blob", engine:"blob", container:{kind:"project", id:PID}, payload:{asset:"9f2c…"}} → {id:"blob/b7"}
update {ref:{object:"node", id:NID}, engine:"prose", container:{kind:"project", id:PID}, payload:{engine:"prose", ops:[{op:"replace", target:{kind:"blocks", ids:["<FULL placeholder id>"]}, ifHash:"e3b0c442", with:{from:{kind:"blob", id:"blob/b7"}, as:"markdown"}}]}}
```
- Cite the id the blob `create` ANSWERED (`blob/b7` above) — never `blob/<the 32-hex asset id>` and never the `_blob/…` path the upload printed (that path is for HTML files, not for a living page). Blob `payload` is exactly `{asset}`; blobs are immutable — new bytes = a new upload + a new blob, then repoint what cites it. ONE blob-cited op per `update`, never inside `batch`, ≤1 MiB of text.
- A document: .md → that `replace`, `as:"markdown"`; .html → `as:"html"`. A .docx never rides `replace` (its `as` has no docx): `create` a prose node FROM the blob — `create {object:"node", engine:"prose", container:{kind:"project", id:PID}, payload:{engine:"prose", parent:{object:"file", id:FID}, source:{from:{kind:"blob", id:"blob/b7"}, as:"docx"}}}` → its `id` — then point the tab at it: `update {ref:{object:"file", id:FID}, engine:"json", container:{kind:"project", id:PID}, payload:{engine:"json", kind:"value", value:{birthName:"Doc.ldoc", content:{kind:"node", id:"<that id>"}}}}`.
- Importing a document whole ("make this file a page", "don't rewrite it"): the birth skeleton is the title, the byline and ONE `<?claude block empty?>` — the file's own headings arrive with it through that one `replace`; never re-outline it from a file you read, never retype it. Headings of your own only for parts the ask ADDS around the file (`## Open questions`), each over its own placeholder. Anything the ask wants placed INSIDE the imported text (a chart under one of its sections) goes in after the import with an `insert` at a `{kind:"find", text:"<words of that heading>"}` target, or `read` once for the block id.
- An image (screenshot, photo, drawn diagram — never a picture of numbers): the same `replace` with an INLINE source whose markdown cites the blob, `with:{from:{kind:"inline", content:"What users saw:\n\n"}, as:"markdown"}` — the src is always `blob/<id>`; it goes ON the page where the ask puts it, never described instead.
- No artifact tool in this session (nothing to `upload_asset` with) = say so plainly; a document's text may then land inline by `replace` only if the user agrees, a dataset as in the next sentence.
- `upload_asset` refusing the file's TYPE (.csv/.json on an older client — the refusal lists what it takes) = say so to the user plainly FIRST; then a dataset may be charted inline (≤5,000 rows, the file named in the caption) — a document's text is still never pasted in unless the user explicitly asks; convert-and-upload when a supported type fits.
## Data → chart
Decide by the numbers' shape; never an image, SVG or screenshot of numbers, never invented rows:
- RICH — four or more numbers with a second dimension (a time series, many categories, a distribution, a split) → a CHART: a widget node whose `code` is one `<claude.Visualize>` tag over an UPLOADED file, cited `{kind:'ref', ref:'blob/<id>'}`. Rows from a file on disk, a query, a fetch or a computation go to a .csv on disk FIRST, then the file road — never typed into `{kind:'data'}`, not at birth (the chart is never a birth member; its section keeps a placeholder) and not later. New or corrected data is then a new upload and a repointed `ref`, not a code rewrite.
- A handful of numbers typed in the ask itself → inline rows in the code (`{kind:'data', data:[…]}`), no upload. Only then may the widget ride the birth, as an extra member BEFORE the prose member — `{"$lid":"w","verb":"create","object":"node","engine":"widget","payload":{"engine":"widget","parent":{"object":"file","id":"$lid:f"},"code":"export default () => <claude.Visualize data-claude-component='nps' sources={{rows:{kind:'data', data:[{quarter:'Q1', nps:32}, {quarter:'Q2', nps:35}]}}} definition={{kind:'chart', source:'rows', title:'NPS by quarter', axes:{x:[{column:'quarter', type:'band'}]}, marks:[{type:'line', y:'nps'}]}}/>;"}}` — and the skeleton shows it under its heading with a `<?claude block chart?>` line whose spec in `blocks` is `"chart":{"type":"embed","ref":"node/$lid:w","caption":"typed in chat"}`. On an existing page: a plain `create` (parent FID), then an embed op.
- Fewer than four numbers → a sentence or a small table. A list of records with one numeric column (vendors and their cost) → the table is the record; chart only the column worth comparing, if any.
Source typing: a `.csv` blob carries `adapter:{kind:'csv', hasHeader:true, columns:[…]}` and no other key — `columns` POSITIONAL, one `{type:{kind:'literal', type:'string'|'number'|'bool'|'date'}}` per column in file order, covering the file exactly (without it the chart shows axes and no marks, silently). A `.json` array of row objects carries NO adapter. The definition names columns by the file's header strings and computes nothing, so aggregate, bucket and sort BEFORE uploading: one row per x value per series, whatever the file's size. One source holds ≤5,000 rows / 256 KiB; past that, filter or aggregate locally into a smaller .csv, upload that, and say which cut you made.
Worked example — monthly revenue by region, queried, written to `revenue.csv` (`month,region,usd`), uploaded and registered as above → `blob/c3` (its own call: a blob id inside widget code cannot be a `$lid`); widget + embed then ride ONE `batch`:
```
batch {container:{kind:"project", id:PID}, batch:[
{$lid:"w", verb:"create", object:"node", engine:"widget", payload:{engine:"widget", parent:{object:"file", id:FID}, code:"export default () => <claude.Visualize data-claude-component='revenue' sources={{rows:{kind:'ref', ref:'blob/c3', adapter:{kind:'csv', hasHeader:true, columns:[{type:{kind:'literal', type:'string'}}, {type:{kind:'literal', type:'string'}}, {type:{kind:'literal', type:'number'}}]}}}} definition={{kind:'chart', source:'rows', title:'Revenue by month', axes:{x:[{column:'month', type:'band'}]}, marks:[{type:'bar', y:'usd', stack:{by:'region'}}]}}/>;"}},
{verb:"update", ref:{object:"node", id:NID}, engine:"prose", payload:{engine:"prose", ops:[{op:"replace", target:{kind:"blocks", ids:["<FULL placeholder id>"]}, ifHash:"e3b0c442", with:{from:{kind:"inline", content:"EMEA passed NA in May.\n\n<?claude block chart?>"}, as:"markdown", blocks:{chart:{type:"embed", ref:"node/$lid:w", caption:"revenue.csv · Jan–Jun"}}}}]}}
]}
```
Show the second dimension the rows carry: a `group` or `stack` split (`{by:'<column>'}`), a target `rule` annotation, a `time` axis (`type:'time'` + `period` over a `date` column, e.g. weekly rows) — one untinted series is the floor, not the goal. A widget ack with `outcome` "staged-with-errors" names the field to fix: correct the code with an `update` on the widget, never fall back to an image or SVG.
## Rich by default — block choices
A page is scanned, not read: per section pick the block that makes the point fastest; prose is the fallback and no paragraph runs past four lines. Comparisons, options, owners → a table (≤60 rows lands whole in one op); steps → an ordered list; open decisions → a check list; the line to remember → a `>` callout; the number to catch → **bold**; sources → links on their names. A screenshot, diagram or photo the user gave you goes ON the page by the file road, never described instead. Rich never means invented: chart only numbers you were given; a cell nobody supplied is "—".
People, dates and states are CHIPS — `blocks` specs seated by `<?claude block key?>` tokens in any markdown you send (birth or fill), exactly as `empty` is; a token inside running text is an inline chip; one key may seat several tokens:
- the person you work with: `{type:"mention", user:"me"}` ("me" IS the value, no lookup); someone else is a chip only by an account id already on the page (read off an existing mention) or one the connector resolves for you — never a guessed id;
- a deadline, milestone, start or as-of date the ask gives: `{type:"date", value:"YYYY-MM-DD"}`; another tab of this page: `{type:"mention", ref:"file/<FID>"}`;
- a Status / Stage / Priority column: ONE `enum` per page, an extra birth member before the prose member (on an existing page, a plain `create`): `{"$lid":"s","verb":"create","object":"enum","engine":"json","payload":{"engine":"json","value":{"name":"Status","options":[{"name":"Not started"},{"name":"In progress"},{"name":"Done"}]}}}` with the ask's own state names as options; each cell under it a chip `{type:"dropdown", enum:"<enum id>"}` (`lids.s` from the birth ack; "$lid:s" only inside that same batch) — no `index` = unset; add `index:N` (0-based) only when the ask states that row's state; changed later by `set` on its char with `attrs:{index:2}`; never the option as typed text. The enum rides the birth batch; the tracker's table — one row per item, owner and date chips, a dropdown cell each — lands in the first fill, not in the skeleton.
Diagrams: a fenced ```mermaid block in the section's markdown, drawn live. The column is ~680px wide: 3–4 short boxes a row at most, few-word labels; longer chains go top-down (`flowchart TD`) or split into `subgraph` stages. Carry meaning — the real steps, branches and failure paths with labelled edges (`-- on error -->`); `sequenceDiagram` for calls between parties, `stateDiagram-v2` for states, `timeline` for dates — never three generic boxes in a row.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |