Agent integration

Agent integration

How rig and Claude Code work together. What gets installed for the agent, what the agent does on its own.

Rig is designed for agents as well as humans. When Claude Code is running in a rig workspace, it can read the rig's state, understand what's missing, and repair gaps without you having to babysit it.

This section explains exactly what's installed for the agent, what the agent is allowed to do, and how to lean on it.

What rig installs for the agent

InstallerPathPurpose
npm install -g @rigxyz/cli (postinstall)~/.claude/skills/rig/SKILL.mdUser-level skill. Teaches Claude what rig is, in any folder.
rig init./.claude/skills/rig/SKILL.mdProject-level skill. Specific to this rig: declared env, MCP, repair table.
rig init./.claude/CLAUDE.mdMinimal hint at the project root pointing Claude at the skill.
rig install./.rig/setup.jsonCached rig doctor output for the agent to read.

Combined, an agent dropped into either an empty folder or an existing rig workspace has enough context to do the right thing.

What the agent can do unsupervised

Read state, propose actions, run safe commands. Specifically:

  • Run rig doctor and parse --json.
  • Run rig status, rig status, rig hub list, rig hub search.
  • Read rig.toml, .rig/setup.json, .rig/instance.toml.
  • Create declared directories (mkdir -p data/portfolios).
  • Append env values to .env after asking the user for them.

What the agent must ask before doing

  • Running [install].commands shell hooks.
  • Anything destructive: deletes, --purge, rig disconnect.
  • Publishing (rig hub publish).
  • Inviting collaborators (rig share).
  • Joining a binding (rig join).

What the agent should never touch

  • .rig/tap-binding.local.json — device secrets.
  • ~/.config/rig/config.json — auth tokens.
  • Other people's .env values.

Pages