Docs menu

Copy between agents

Give other agents the MCPs and skills one agent already has, without changing that agent.

If your tools are already set up in one agent, you don’t have to declare them again. Name that agent, then the agents that should get the same tools:

pegboard replicate claude-code codex opencode

The source can be any detected agent, so this works in every direction:

pegboard replicate codex claude-code gemini
pegboard replicate hermes:work cursor

If the source has a context file, Pegboard asks where it should go. Then it shows the plan and asks before writing anything:

Copy ~/.claude/CLAUDE.md to ~/.codex/AGENTS.md, ~/.config/opencode/AGENTS.md?
  [s]kip, [b]efore what's there, [a]fter what's there, [r]eplace it: a
warning: secrets were replaced with ${env:…}; export: GITHUB_TOKEN, LINEAR_TOKEN
codex · global
  + mcp github         (~/.codex/config.toml) [ad-hoc]
  + mcp linear         (~/.codex/config.toml) [ad-hoc]
opencode · global
  + mcp github         (~/.config/opencode/opencode.json) [ad-hoc]
  + mcp linear         (~/.config/opencode/opencode.json) [ad-hoc]
codex · global
  + skill review       (~/.agents/skills/review → ~/.config/pegboard/skills/review) [ad-hoc]
opencode · global
  + skill review       (~/.config/opencode/skills/review → ~/.config/pegboard/skills/review) [ad-hoc]
codex · global
  ~ context AGENTS.md  (~/.codex/AGENTS.md ← claude-code, after)
opencode · global
  + context AGENTS.md  (~/.config/opencode/AGENTS.md ← claude-code, after)
Plan: 7 create, 1 update, 0 remove, 0 conflicts.
Apply? [y/N]

It works on the global and project scopes. Use --scope to pick one, --dry-run to see the plan and stop, and -y to skip the questions.

What it copies

Resource What the targets get
MCPs The same servers, written in each agent’s format
Skills placed by Pegboard The same source and content
Skills linked from your own directory A link to that same directory
Other skills A link to a copy in ~/.config/pegboard/skills, or ./skills in a project
Context Only if you choose it. See Context

The source agent’s files don’t change. Neither does anything else in the targets’ config.

Secrets

Secrets aren’t copied. Plain-text values in env and headers reach the targets as ${env:…} references, so export those variables before you use the targets:

export GITHUB_TOKEN=…
export LINEAR_TOKEN=…

Agents that can only store plain text, like Hermes, need the variable when you run replicate, because Pegboard has no other value to write. Remote MCPs that sign in with OAuth may also ask you to sign in again on each target.

When something is already there

An entry with the same name and content is only recorded. If its content differs, the plan marks a conflict and nothing is written. Use --force to overwrite it, with a backup of the file.

Anything declared in pegboard.yaml on a target is skipped with a warning, so change it there.

Context

The source’s CLAUDE.md, AGENTS.md, or GEMINI.md can go into each target’s context file. When you run replicate, it asks where. To choose ahead of time, use --context:

pegboard replicate claude-code codex --context after
Value What the target’s file ends up with
before The source’s text, then what it already had
after What it already had, then the source’s text
replace Only the source’s text
skip No change

Each changed file is backed up first, and the plan lists it before you confirm. before and after keep the text in a marked block:

<!-- pegboard:replicated from claude-code -->

Be concise.

<!-- /pegboard:replicated from claude-code -->

Run replicate again and the block is updated where it is, so it doesn’t pile up. To move it, delete the block and run it again.

With -y, --json, or --dry-run nothing is asked, so context only changes if you pass --context.

A few cases are handled differently:

  • Files that are already the same. If a target’s file links to the source’s file, or already imports it with an @ line, it’s skipped.
  • The @AGENTS.md line. This is Pegboard’s bridge in CLAUDE.md, so it isn’t copied.
  • Other @ imports. They’re copied as text with a warning, because not every agent follows them.
  • Hermes. SOUL.md is its persona rather than project instructions, so it’s left out in both directions.

Keep it in a stack

What replicate installs is ad-hoc. To manage it from pegboard.yaml from then on:

pegboard adopt

MCPs and skills stay limited to the agents that have them, with an agents: list on each entry.

pegboard import is different: it brings an agent’s MCPs into pegboard.yaml, and apply then rewrites that agent’s own entries too.