shape-image — Claude Code prompt for spreadsheet shapes
The shape-image prompt guides Claude Code in adding shapes, labels, and in-cell trend charts to spreadsheets. Use it to annotate key figures or show a data pattern without adding chart objects.
Apache-2.0 ★ 12,746 updated 2026-10-29
.claude/commands/shape-image.mdWhat shape-image does
The prompt covers shape operations with a type, anchor cell, optional fill color, and text. It also gives formula patterns for line, column, and win/loss SPARKLINE charts, plus IMAGE for embedding a picture. For clickable links, it points to set_hyperlink.
Shape operations can be batched with content and formatting changes, but not structural operations. This mode applies to imported xlsx files, and changes are written with ⌘S. So a new workbook does not meet that requirement. The guide distinguishes formula-driven sparklines from chart objects, which sit on separate layers.
What it helps with
- place a text callout beside a key cell
- build a flow diagram from rectangles and arrows
- frame a group of metrics with a filled shape
- show a row’s trend inside a cell
- add an embedded image or clickable link
Example prompts for the agent
- Add a text callout beside the key metric with a short explanation.
- Show the values in
B2:M2as a column sparkline inN2. - Build a process diagram from rectangles and arrows on sheet
s1.
How to install shape-image
Manually: put the files in place
.claude/commands/shape-image.mdHow to use
Paste the text at the start of a chat or into project instructions
Questions about shape-image
How do I install shape-image in Claude Code?
Save the prompt at .claude/commands/shape-image.md in your project.
What does shape-image do?
It guides Claude Code through adding spreadsheet shapes, text boxes, in-cell sparklines, and images. Trend lines use the SPARKLINE formula.
Can shape-image add shapes to a new xlsx workbook?
The documented shape workflow is for imported xlsx files. Save its changes with ⌘S.
Source text
shape-image.md · Apache-2.0
# Shapes & images guide (shape-image)
## Inserting a shape/text box (supported)
`{op:"add_shape", sheetId, shapeType, anchorCell:"E2", fillColor?, text?}`
- shapeType: any OOXML prstGeom name from the insert gallery — rectangles ("rect", "roundRect", snip/round corner variants), basic shapes ("ellipse", "triangle", "diamond", "hexagon", "heart", "cloud", "donut", "smileyFace", …), block arrows ("rightArrow", "quadArrow", "chevron", …), stars/banners ("star5", "star12", "ribbon", "wave", …), flowchart nodes ("flowChartProcess", "flowChartDecision", "flowChartDocument", …), callouts ("wedgeRectCallout", "cloudCallout", …), or "textbox"
- textbox defaults to a white background with "Text"; other shapes default to a light-blue fill. text can carry the annotation directly.
- Layout-class: can share a batch with content/format, not with structural operations; only works on imported xlsx, written with ⌘S.
### Common uses
- **Callout/annotation boxes**: put a `textbox` next to key data with the interpretation as text (e.g. "+23% YoY, all-time high").
- **Flow/relationship diagrams**: combine `rect`/`roundRect` + `rightArrow`, staggering anchorCells for layout.
- **Emphasis blocks**: a `roundRect` with a translucent fill framing a group of key metrics.
## In-cell sparklines (SPARKLINE, supported)
No chart object needed — draw a mini trend chart inside a cell with a formula:
- Line sparkline: `=SPARKLINE(B2:M2)`
- Column sparkline: `=SPARKLINE(B2:M2, {"charttype","column"})`
- Win/loss: `=SPARKLINE(B2:M2, {"charttype","winloss"})`
Great for a "Trend" column at the end of each summary row — the trend is visible at a glance and is lighter than inserting many charts.
```json
{
"op": "set_formula",
"sheetId": "s1",
"address": "N2",
"formula": "=SPARKLINE(B2:M2,{\"charttype\",\"column\"})"
}
```
## In-cell images / links (supported)
- Embedded image: `=IMAGE("https://example.com/logo.png")`
- Clickable link: prefer `set_hyperlink` (see the data guide); formula version `=HYPERLINK("https://...", "Click here")`.
## Rules
- Shapes/images are for **supporting expression** — don't let them upstage the data; correctness first.
- Sparklines/IMAGE are formulas that update with their cell's values; chart objects are independent layers (see the charts guide).
- For lots of trend displays prefer SPARKLINE (light); for a single focused analysis use add_chart (heavy).
© genspark-ai · Apache-2.0 · genspark-ai/genoffice