/mod-authoring:mod-authoringfrom mod-authoring
Build, change, debug, test or audit a Claude Code mod (a plugin whose hooks module runs inside Claude Code: panes, bands, toasts, commands, tool-call guards). Thin index plus rules; details in references/ and examples/.
Ships in mod-authoring. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A mod is a plugin with hooks/hooks.json {"modules":["./register.tsx"]} and a module exporting register(on, options). No build step, no Node, no DOM. Needs Claude Code 2.1.287+ (desktop Code tab 2.1.286+, VS Code extension 2.1.299+).
Authority: .claude-plugin/types/claude-code/index.d.ts (this build) over the public docs over these notes.
| Need | File |
|---|---|
| files, manifest, static-analysis rules | references/anatomy.md |
events, next, matchers, .catch | references/events.md |
$ API: commands, tools, timers, sessions | references/api.md |
| panes, elements, keys, redraw, surfaces | references/ui.md |
$.state vs $.store | references/state.md |
claude plugin test | references/testing.md |
| symptom to cause | references/troubleshooting.md |
| limits and version gates | references/limits.md |
| subagent and swarm panes | references/subagents.md |
| Raster, Image, Client, Svg, control events, dialogs | references/ui-deep.md |
userConfig, settings.read, $ namespaces, sharing | references/config-share.md |
| trust, guard, managed settings, policy mods | references/security-admin.md |
| audit an existing mod | references/audit-checklist.md |
| public mods worth reading | references/examples.md |
Copyable code: examples/README.md.
$.ns.method(). Never alias or destructure $ or $.ui.$ only to functions declared at the top level of the file, or imported from a file of the mod.import only; the one bare import is claude-code.next(e) observes, next({...e, x}) rewrites, returning an object answers. e is frozen..catch(...) or they fail open.$.state; cross-session values in $.store.ui.render reads state and never writes it.key.focus, closeOnEscape, holdToasts, autoFocus accept only true. Omit them, never pass false.e.props.bodyColumns, not e.viewport.rows.$.ui.open from a timer may not be placed on a narrow terminal. Open from a command and check isPlaced./clear, /resume, /branch reset $.state without refiring session.start. Reload in classic.SessionStart.$.command.register throws on a taken name and aborts the hook. Register last.plugin-authoring skill first: it names this build's types file and the hot-reload flow.plugin.json; names starting claude-, anthropic- or cc-plugin- are rejected..claude-plugin/types/. Never edit or commit that folder.scripts/check.sh runs all three over every example.claude --plugin-dir <dir>. Prove a guard's deny by its side effect, not its log line.claude plugin validate <dir>claude --debug-file f.log --plugin-dir <dir> (hot reloads on save)claude plugin test <dir>cleanupPeriodDays)..claude-plugin/marketplace.json with one entry whose source is "./"; claude plugin validate . checks it. This repo has none; it installs through the marketplace named in README.md.version in plugin.json on every release; installs are cached by version.Workflow and sharing steps adapted from claude-mods-skill.
examples/README.md (opens in a new tab)examples/band/hooks/hooks.json (opens in a new tab)examples/band/hooks/register.tsx (opens in a new tab)examples/band/types/index.d.ts (opens in a new tab)examples/dice-tool/hooks/hooks.json (opens in a new tab)examples/dice-tool/hooks/register.example.ts (opens in a new tab)examples/dice-tool/hooks/register.ts (opens in a new tab)examples/guard/hooks/hooks.json (opens in a new tab)examples/guard/hooks/register.ts (opens in a new tab)examples/guard/smoke.sh (opens in a new tab)examples/minimal/hooks/hooks.json (opens in a new tab)examples/minimal/hooks/register.ts (opens in a new tab)examples/redact-output/hooks/hooks.json (opens in a new tab)examples/redact-output/hooks/register.example.ts (opens in a new tab)examples/redact-output/hooks/register.ts (opens in a new tab)examples/state/hooks/hooks.json (opens in a new tab)examples/state/hooks/register.tsx (opens in a new tab)examples/state/types/index.d.ts (opens in a new tab)examples/test/hooks/hooks.json (opens in a new tab)examples/test/hooks/register.example.ts (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
mod-authoring@fblgit-claude-marketplace is listed by fblgit/fblgit-claude-marketplace — review the source before installing
npx claudepluginhub fblgit/fblgit-claude-marketplace --plugin mod-authoring