Skip to content

Turn a Claude Code setup into an agent ​

Last updated Nov 27, 2026 View as Markdown

A repository shop keeps its guidance in CLAUDE.md, a skill in .claude/skills/code-review/, and the GitHub MCP server in .mcp.json. Package the three as the agent shop-reviewer in agent/, so it runs the same on every machine and harness, while your own Claude Code keeps reading the files where they are.

Create the project ​

Create the agent project in agent/, and point its instructions at CLAUDE.md instead of the instructions.md that pandra init writes:

terminal
sh
mkdir agent && cd agent
pandra init --name shop-reviewer
pandra remove --instructions instructions.md && rm instructions.md
pandra add --instructions ../CLAUDE.md
text
Created pandra.toml for agent shop-reviewer
Removed instructions #1 from instructions.md
pandra.lock is not needed: nothing in pandra.toml is pinned
Added instructions #1 from ../CLAUDE.md
pandra.lock is not needed: nothing in pandra.toml is pinned

Add the skill and the server ​

Add the skill by its directory, and the server by its name in the MCP Registry:

terminal
sh
pandra add ../.claude/skills/code-review
pandra add --mcp io.github.github/github-mcp-server
text
Added `[skills.code-review]` to pandra.toml.
pandra.lock is not needed: nothing in pandra.toml is pinned
Method: remote, https://api.githubcopilot.com/mcp/ (requests go to api.githubcopilot.com), the only supported method
  Unsupported: oci ghcr.io/github/github-mcp-server (runtime arguments are not supported; secret input `token` is used in an argument)
Added `[mcp-servers.github]` to pandra.toml and updated pandra.lock.
  pinned MCP server github from io.github.github/github-mcp-server 2.3.0

Each server in .mcp.json becomes one pandra add --mcp:

In .mcp.jsonpandra add --mcp takes
A urlThe server's MCP Registry name, which pandra search --mcp github finds, or the URL with --name
npx -y PACKAGE@VERSIONnpm:PACKAGE@VERSION
uvx PACKAGEpypi:PACKAGE@VERSION
docker run ... IMAGE:TAGoci:IMAGE:TAG

A server that runs a program of its own, such as a script in your repository, cannot be part of an agent until you publish it to npm, PyPI, or an OCI registry, or serve it at a URL. The token in a server's headers does not go into the agent either: whoever runs the agent supplies it (give an MCP server a token). The project now holds:

agent/pandra.toml
toml
#:schema https://pandra.io/schemas/agent-definition/v0.schema.json
name = "shop-reviewer"
version = "0.1.0"
description = "Add your description here"

[[instructions]]
path = "../CLAUDE.md"

[skills.code-review]
path = "../.claude/skills/code-review"

[mcp-servers.github]
registry = "io.github.github/github-mcp-server"
version = "2.3.0"
method = "remote"

Run it ​

From the repository's root, run the agent on the repository:

terminal
sh
cd ..
pandra run ./agent --headless --prompt "Review the staged changes."
text
  Session:  7f01f7714920 (shop-reviewer)
No problems found in the staged diff.
  Skills loaded:      code-review
  Skills not loaded:  pandra

The sample leaves out the progress lines, and your session IDs, paths, answers, and loaded skills differ. Commit agent/ with the rest, and anyone who can read the repository runs the agent by its Git address.

Learn more about agent components →

Released under the Apache License 2.0