Skip to main content
prompt GP ChatGPT

text — Claude Code prompt: what it does, how to install

Defines instructions for updating and styling slide text using setText and setFont operations. Useful when automating presentation edits in Claude Code.

Apache-2.0 ★ 12,746 updated 2026-10-29

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/text.md
Open on GitHub

What text does

This prompt explains JSON operations for editing text, shapes, and tables in slides. It covers full-body rewrites with setText alongside run-level restyling with setFont. Every action targets a specific slide index and element ID.

The setText operation overwrites the entire text body. Sending just one paragraph deletes the rest of the block. Omitted style properties inherit formatting from the previous run. For nested shapes, you must provide the parent group field, because child IDs alone will not resolve on the slide.

What it helps with

  • replace slide text while preserving untouched formatting
  • update font color or size across an element
  • configure list indentation and paragraph alignment
  • modify text inside grouped slide shapes

Example prompts for the agent

  • Update slide 0 title to 'Quarterly Review' with 36 pt bold text using setText
  • Make all text in e_TEXT bold with color #1A73E8 via setFont
  • Set bullet points for step 1 in e_CHILD inside group e_GROUP

How to install text

Manually: put the files in place

.claude/commands/text.md

Questions about text

How to install text in Claude Code?

Add the prompt file to your repository at .claude/commands/text.md.

What is the difference between setText and setFont?

Use setText when changing the actual words or paragraph structure, and use setFont when restyling existing text without modifying content.

How do you target a child element inside a group?

Set target.el to the child element ID and include the parent group ID in the group field so the resolver finds it.

Source text

text.md · Apache-2.0
# Text ops

> Replace or restyle the text of a text box, shape or table: whole-body rewrite (setText), run-level font patch (setFont), paragraph format patch (setParagraphFormat), typeset math (insertEquation).

All three take `target:{slide, el}`. `el` is an element id from the outline or
`read_slide` (`e_*` ids are durable). For a direct child of a group put the
child id in `target.el` and add `group:"<group id>"`.

Font sizes are points. Colors are `"#RRGGBB"`.

### setText

`{paragraphs:[{runs:[{text,bold?,italic?,fontSize?,color?}],align?}]} (group children: add group:"<group id>")`

Replaces the element's entire text with the given paragraphs. Runs you do not
restyle inherit the formatting of the run they replace (position-wise), so a
plain `{text}` run keeps the original size, color and font. A shape that has
never had text gets a text body created (autoshapes default to centered text).

| Field                                                    | Type                                                                                          | Notes                                                                                                                                                                                                                  |
| -------------------------------------------------------- | --------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| paragraphs                                               | array                                                                                         | Required, one object per paragraph; an empty array clears the text                                                                                                                                                     |
| paragraphs[].runs                                        | array of `{text, bold?, italic?, underline?, strike?, fontSize?, fontFamily?, color?, link?}` | `fontSize` in pt; `link` is `{kind:"url",url}`, `{kind:"slide",slideIndex}`, `{kind:"action",action}` (`nextslide` / `previousslide` / `firstslide` / `lastslide` / `lastslideviewed` / `endshow`) or `null` to remove |
| paragraphs[].align                                       | `"left"` / `"center"` / `"right"` / `"justify"`                                               | Optional                                                                                                                                                                                                               |
| paragraphs[].level                                       | 0..8                                                                                          | Indent level for multi-level lists                                                                                                                                                                                     |
| paragraphs[].bullet                                      | `"char"` / `"number"` / `"none"`                                                              | Optional; `bulletChar` sets a custom glyph                                                                                                                                                                             |
| paragraphs[].lineSpacingPct, spaceBeforePt, spaceAfterPt | number                                                                                        | Optional paragraph spacing                                                                                                                                                                                             |
| paragraphs[].rtl                                         | boolean                                                                                       | Optional base direction                                                                                                                                                                                                |
| group                                                    | string                                                                                        | Only for a direct child of a group: the group id                                                                                                                                                                       |

```json
{
  "op": "setText",
  "target": { "slide": 0, "el": "e_TEXT" },
  "paragraphs": [
    { "runs": [{ "text": "Quarterly Review", "bold": true, "fontSize": 36 }], "align": "left" },
    { "runs": [{ "text": "Q3 highlights and outlook" }] }
  ]
}
```

```json
{
  "op": "setText",
  "target": { "slide": 0, "el": "e_CHILD" },
  "group": "e_GROUP",
  "paragraphs": [{ "runs": [{ "text": "Step 1" }] }]
}
```

Common mistakes

- Passing only the changed paragraph: the array replaces the whole body, so send every paragraph that should remain.
- Targeting a picture, chart or connector: only text boxes, shapes and table cells (`setTableCell`) hold text.
- Writing text into a group child without `group`: the child id alone does not resolve on the slide.

Related: `setFont` (restyle without changing the words), `setTableCell` (table cells), `findReplace` (deck-wide substitutions).

### setFont

`{font:{fontFamily?,fontSizePt?,fontSizeStep?,bold?,italic?,underline?,strike?,color?}} — merges onto every run of the element`

Applies the given properties to every run of the element (or every cell of a
table) and leaves everything else untouched. Use it for "make the title blue
and bold" style requests; use `setText` when the words change.

| Field                                | Type        | Notes                                          |
| ------------------------------------ | ----------- | ---------------------------------------------- |
| font.fontFamily                      | string      | Omit to keep the theme font (recommended)      |
| font.fontSizePt                      | number > 0  | Points                                         |
| font.fontSizeStep                    | {dir, mode} | Relative per run: 'ladder' rung or 'point' ±1  |
| font.bold, italic, underline, strike | boolean     | Only the keys you pass change                  |
| font.color                           | `"#RRGGBB"` | Explicit color; clears theme-color inheritance |
| group                                | string      | Only for a direct child of a group             |

```json
{
  "op": "setFont",
  "target": { "slide": 0, "el": "e_TEXT" },
  "font": { "color": "#1A73E8", "bold": true }
}
```

```json
{ "op": "setFont", "target": { "slide": 0, "el": "e_TABLE" }, "font": { "fontSizePt": 12 } }
```

Common mistakes

- Color names such as `"blue"`: only hex `"#RRGGBB"` is accepted.
- `fontSizePt` of 0 or negative: must be a positive number of points.
- Expecting a partial-run change: the patch is element-wide; for one word use `setText` with per-run styling.

### setParagraphFormat

`{format:{align?,bullet?,lineSpacingPct?,spaceBeforePt?,spaceAfterPt?}}`

Paragraph-level formatting for every paragraph of the element: alignment,
bullets, spacing, direction, indent level.

| Field                                     | Type                                            | Notes                                        |
| ----------------------------------------- | ----------------------------------------------- | -------------------------------------------- |
| format.align                              | `"left"` / `"center"` / `"right"` / `"justify"` |                                              |
| format.bullet                             | `"char"` / `"number"` / `"none"`                | `"char"` uses `bulletChar` or a round bullet |
| format.bulletChar                         | string                                          | Custom glyph, with `bullet:"char"`           |
| format.bulletSizePct                      | number >= 0                                     | Percent of text size (100 = same)            |
| format.bulletColor                        | `"#RRGGBB"`                                     |                                              |
| format.bulletHangEmu                      | number >= 0                                     | Hanging indent in EMU                        |
| format.lineSpacingPct                     | number >= 0                                     | 100 = single spacing                         |
| format.spaceBeforePt, format.spaceAfterPt | number >= 0                                     | Points                                       |
| format.rtl                                | boolean                                         | Base direction                               |
| format.indentDelta                        | 1 or -1                                         | Shift the list level (clamped 0..8)          |
| group                                     | string                                          | Only for a direct child of a group           |

```json
{
  "op": "setParagraphFormat",
  "target": { "slide": 0, "el": "e_TEXT" },
  "format": { "bullet": "char", "lineSpacingPct": 120, "spaceAfterPt": 6 }
}
```

Common mistakes

- Negative spacing values: all `...Pct` / `...Pt` / `...Emu` fields must be >= 0.
- Using `setParagraphFormat` to change font size: that is a run property, use `setFont`.

### insertEquation

`{latex,position?} — target:{slide, el}; or {latex,box:{x,y,cx,cy}} to create a text box for it`

Adds a typeset equation (PowerPoint's own math format) as a centered paragraph
at the `position` (`"end"`, default, or `"start"`) of a text or shape element,
or in a new text box at `box` (EMU, unit suffixes allowed). Older readers and
the GenOffice preview show the linearized text (`E=mc²`); PowerPoint 2010+
renders the formula. LaTeX subset: `\frac`, `\sqrt[n]`, `^`, `_`,
`\sum`/`\int`/`\prod` with limits, `\left(` `\right)`, matrices, Greek
letters, accents, `\text{}`.

```json
{
  "op": "insertEquation",
  "target": { "slide": 0, "el": "e_TEXT" },
  "latex": "E = mc^2"
}
```

```json
{
  "op": "insertEquation",
  "target": { "slide": 0 },
  "box": { "x": 914400, "y": 2743200, "cx": 4572000, "cy": 914400 },
  "latex": "\\frac{a}{b} + \\sqrt{x^2 + y^2}"
}
```

© genspark-ai · Apache-2.0 · genspark-ai/genoffice

Similar prompts

All prompts for Office documents →

From the same set65

The whole set →
table Tells the agent when to turn a range into a real Excel table and when to fake the look with plain formatting instead. GP ChatGPT ★ 12,746repo stars charts This Claude Code prompt creates and edits spreadsheet charts. It helps select a chart type and specify the source data. GP ChatGPT ★ 12,746repo stars table table is a Claude Code prompt for editing existing slide tables, from cell text and merges to sizing and styles. Invoke it to change a table in a presentation. GP ChatGPT ★ 12,746repo stars writing writing tells the agent how to edit a spreadsheet: formulas instead of hand-computed numbers, bulk range ops instead of cell-by-cell writes. GP ChatGPT ★ 12,746repo stars base The base prompt guides Claude Code through reading and editing workbooks in an Excel-compatible desktop app. Use it to inspect data, make changes, or create documents from workbook content. GP ChatGPT ★ 12,746repo stars slide slide is a prompt for Claude Code and ChatGPT that handles page-level presentation edits: deleting, duplicating, inserting by layout, moving, and changing backgrounds. GP ChatGPT ★ 12,746repo stars insert Prompt detailing slide insertion commands for genoffice. It specifies parameters for placing shapes, text containers, and smart connectors on slides. GP ChatGPT ★ 12,746repo stars system The system prompt guides the GenOffice Slides assistant through deck creation and slide edits. Use it when you want the assistant to choose a workflow based on the change you request. GP ChatGPT ★ 12,746repo stars

Project sponsors

Companies that keep this analytics open