Skip to Content

Extending zerd

MCP servers, hooks, slash commands, project tools, prompts and repo profiles.

I want to...Use
Give the model more tools from another programMCP
Run my own command at a point in a runHooks
Save a prompt I reuseSlash commands
Expose a shell command as a toolProject tools
Change zerd's instructionsPrompt
Set per-project rulesRepo profiles

Trust

A cloned repo's config can't turn on hooks, MCP servers or verify commands until you trust that exact file. See Safety.

MCP

zerd connects to stdio and streamable HTTP servers. In a project, they only start once you trust it.

Hooks

Hooks run your own commands at points in a run:

before_agent, after_agent, before_tool, after_tool, on_error, pre_compact, post_compact, session_start, stop and subagent_stop.

  • A before_tool hook can veto a call.
  • A stop hook that exits with code 2 sends its stderr back and keeps the agent working.
  • Whatever a before_agent hook prints is handed to the model with your request.

Slash commands

Markdown files in .claude/commands and .zerd/commands become commands. They take $1, $@ and ${1:-default}.

Project tools

Each .zerd/tools/*.toml becomes a tool that runs a shell command. Arguments arrive as JSON on stdin and as ZERD_ARG_<NAME>.

Prompt

.zerd/APPEND_SYSTEM.md adds to zerd's prompt. SYSTEM.md replaces it.

Repo profiles

profiles/<name>.toml carries per-project instructions, forbidden paths and commands, and verify rules. profiles/tunyt.toml is a worked example.

All slash commands

/help /clear /compact /context /cost /model /effort /approval /permissions /plan /challenge /verify /diff /agents /hooks /skills /config /stats /tools /mcp /connect /save /sessions /resume /checkpoint /restore /undo /rewind /jobs /copy /learn /forget /layout /exit

On this page