Skip to content

Connect your agent

This page says what rb installs for each coding agent, how to add it later, and what stays yours whichever agent writes.

rb init, run in your own terminal, installs rb’s instructions for each agent it finds in the repository. It makes the files that are not there, and says what it wrote. A file that was there before, an AGENTS.md, a .mcp.json or an agent’s hook file, changes only once you agree: rb asks once, shows exactly what it would add, and anything but y or yes keeps the file as it is. --yes answers up front, for a script. Where rb cannot ask, it leaves the file as it is and names the command that adds its part.

rb init --dry-run lists every file rb init would write, and writes nothing. rb with Claude Code, Codex and Cursor shows both with real output.

When it finds .claude/, CLAUDE.md or a Claude Code session, rb init installs three things:

  • the skill, in .claude/skills/rabbit-brain/SKILL.md;
  • rb’s MCP server, as one entry in .mcp.json;
  • rb’s session hook, SessionStart and Stop in .claude/settings.json.

To add them later, or to a repository rb did not set up, run what rb init names:

Terminal window
rb skill add --claude --project
claude mcp add --scope project rabbit-brain -- rb mcp

rb skill add with no flag installs the skill once for all your projects, in ~/.claude/skills/rabbit-brain/. A session that is already running loads no skill or MCP server added during it: start a new session after you install.

  • rb context: the record as one briefing a fresh session reads first, instead of anyone’s summary. The skill tells the agent to run rb context --model <your model id> before anything else in a project with .rb/. rb keeps that model with the session’s writes.
  • rb docs: the whole manual, built into rb, so it always matches the installed version. rb docs --start is the protocol for a project already under way.
  • --json on every command: one JSON object, the envelope, with the same facts as the text.
  • rb mcp: the same commands as tools over the Model Context Protocol, each call recorded as the agent’s.

With each agent’s instructions, rb installs a session hook in that agent’s project file. The hook runs rb journal scan --hook <agent> as a session starts and as each turn ends, so rb looks at the repository whether the agent reads rb’s instructions or not. It has a 10-second limit. rb says nothing, tells the session nothing and records nothing. It keeps the look in the journal as the agent’s.

AgentWhere
Claude CodeSessionStart and Stop, in .claude/settings.json
CodexSessionStart and Stop, in .codex/hooks.json
CursorsessionStart and stop, in .cursor/hooks.json

A hook file that was there changes only once you agree, as AGENTS.md and .mcp.json do. rb’s handler goes beside the hooks there, and every byte that was there is kept. Where rb cannot ask, it names the command that adds the hook: rb skill add --claude --project --yes, --agents-md --yes or --cursor --yes. A handler that runs rb journal scan in a form no rb wrote is yours: rb leaves it as it is. rb remove takes rb’s handler out and leaves every other hook.

On Windows, Claude Code runs the hook in Git Bash. Without Git Bash it runs it in PowerShell, which does not read it: the hook fails, the session goes on, and rb does not look. Cursor’s hook and Codex’s on Windows look for rb on the PATH alone.

Your agent records as it works, and rb records who made each write. Calls on results (accept, reject, investigate) and on lines of work (continue, park, stop, pivot, ship) are yours. A call recorded in an agent session is proposed, not made, and an experiment’s design an agent wrote reads “design not confirmed”. Both wait until you confirm them with rb confirm in your own terminal, and rb refuses rb confirm in an agent session. Calls has the details.

Rabbit Brainrabbitbrain.ai · GitHub · PyPI · Privacy · Apache-2.0