Follow Discord
Sweep 02 Oct 2026 · 18:55Z Build v2.1.288 509 read Stable v2.1.285 Latest v2.1.287 Next v2.1.288 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · claude-code

Mods reference changedplugins/mods/reference

Nearest release: v2.1.287, published 2 hours before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Upstream edited this page at 1 Oct 2026 19:08 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 1 Oct 2026 19:37 UTC.

Upstream edited
Recorded here
Lines+10added
Lines−4removed
From line 4 where the diff opens
First seen 1 Oct 2026 this site's first read of the page
Recorded edits5to this page, all time

The whole hunk

from line 4, old and new numbered
/
lines
from line 4
44 
55Look up any event a [mod](/docs/en/plugins/mods/overview) can hook, mods API method it can call, or render site it can draw in, for the Claude Code CLI and the Desktop app as of v2.1.287. Each entry gives the name and a one-line description, and links to the guide section that explains it where there is one.
66 
7The complete reference is the set of TypeScript declarations that Claude Code writes for your version. Their comments describe every event, field, method, and element, with examples. They also match the version you're running, and events and methods can change between releases.
7<Note>
8 The complete reference is Claude Code's [TypeScript declarations for mods](https://github.com/anthropics/claude-code/blob/main/mods/types/claude-code.d.ts), which describe every event, method, and element, with examples. The copy on GitHub can be older than the Claude Code version you have installed. When the two disagree, trust [the copy Claude Code writes for your version](/docs/en/plugins/mods/create#get-the-types-for-your-build).
9</Note>
810 
9To open them, load a mod with `claude --plugin-dir`, as in `claude --plugin-dir ./first-mod`, then open `.claude-plugin/types/claude-code/index.d.ts` in the mod's directory. [Get type definitions for your version](/docs/en/plugins/mods/create#get-the-types-for-your-build) lists the other files Claude Code writes there.
10 
1111## Files
1212 
1313A mod is a plugin directory with these files:
from line 203
203203 
204204`e.viewport` holds `columns`, `rows`, and `isFullscreen`. It's absent until the app has measured its window. Its `rows` is the height of the whole window, not of your pane.
205205 
206In a `Pane` or `AbovePrompt` hook, size the tree's width to `e.props.bodyColumns`, and keep the first row two cells shorter, because in the terminal the mark that closes a pane is drawn over that row's last cell. For height in the terminal, `e.props.placement` is `'dock'` beside the transcript, where `e.props.scroll.bodyRows` is the number of rows the pane has, or `'inline'` above the prompt, where the pane grows with your tree up to a limit and `bodyRows` counts only the rows showing now. A tree taller than the pane scrolls as a whole. The [`rows` field of `$.ui.open`](/docs/en/plugins/mods/interface#open-a-pane-at-the-right-time) asks for a different limit.
206To fit a tree to its site, read these props in the hook:
207 
208* **Width of a `Pane` or the band**: draw to `e.props.bodyColumns`
209* **Height of a `Pane` beside the transcript**: where `e.props.placement` is `'dock'`, `e.props.scroll.bodyRows` is the number of rows the pane has
210* **Height of a `Pane` above the prompt**: where `e.props.placement` is `'inline'`, the pane grows with your tree up to a limit, and `bodyRows` counts only the rows showing now. The [`rows` field of `$.ui.open`](/docs/en/plugins/mods/interface#open-a-pane-at-the-right-time) asks for a different limit.
211 
212A tree taller than the pane scrolls as a whole.
207213 
208214## Elements
209215 
Feedback