cd /news/ai-agents/install-once-run-anywhere-a-four-pha… Β· home β€Ί topics β€Ί ai-agents β€Ί article
[ARTICLE Β· art-179773] src=dev.to β†— pub= topic=ai-agents verified=true sentiment=↑ positive

Install once, run anywhere: a four-phase Claude Code plugin migration

A developer migrated the Relay six-role multi-agent frontend pipeline (PM, Architect, Implementer, Reviewer, Prod-Readiness, Verifier) into a distributable Claude Code plugin, collapsing per-repo scaffolding into a single install command. The four-phase migration moved slash commands, role contracts, orchestrators, conventions and a JSONL memory helper out of target repos and into the plugin, relying on Claude Code's auto-namespacing so plugin commands like /frontend-team:pipeline coexist with repo-local ones. The work shipped across PRs #7 and #8, taking the plugin from version 0.5.0 to 0.6.0.

recommendation

Package agent roles, orchestrators and slash commands inside the plugin using ${CLAUDE_PLUGIN_ROOT} paths and namespaced commands so users install once and skip per-repo bootstrap.

more in playbook: Designing agent systems
by read7 min views6 publishedDec 1, 2026

Before β€” to use my Claude Code pipeline in a new frontend repo:

  claude plugin marketplace add rgadda/frontend-eng-team --scope user
  claude plugin install frontend-team@frontend-team-marketplace --scope user
  cd /path/to/your-frontend-project
  ft-bootstrap   # a shell script that copies roles, slash commands, memory helper, conventions

After β€” four PRs later:

  claude plugin marketplace add rgadda/frontend-eng-team --scope user
  claude plugin install frontend-team@frontend-team-marketplace --scope user

Done. In any git repo: /frontend-team:pipeline <task>. No per-repo setup.

This post walks through the four-phase migration that got me there, the Claude Code plugin-spec details I had to figure out along the way (some are

not well-documented), and what I learned about the shape of plugin-distributed tooling.

Relay is a six-role multi-agent pipeline for shipping frontend changes with AI assistance β€” PM β†’ Architect β†’ Implementer β†’ Reviewer β†’

Prod-Readiness β†’ Verifier, each a focused role contract with bounded self-critique (RCC) inner loops. It's tuned for React 18 + TS 5 strict + Vite +

Axios + CSS Modules + Jest/RTL + Playwright, but the role contracts are stack-agnostic.

Pre-migration, the plugin shipped only the subagents and skills. The pipeline itself β€” role contracts, slash commands, JSONL memory helper, stack

conventions β€” lived inside each target repo, copied there by scripts/ft-bootstrap.sh. That meant every new project needed scaffolding before

anything would work.

If you've distributed a Claude Code plugin yourself, you know the pattern: easy to start with subagents + skills, hard to keep everything else out

of the user's repo. This migration is the "hard part."

Six things ended up in every repo that ran ft-bootstrap:

.agents/roles/*.md β€” role contracts (PM, Architect, etc.).agents/pipeline.md, pipeline-lite.md β€” orchestrators.agents/conventions.md β€” stack conventions.agents/memory/{schema.md,append.sh,*.jsonl} β€” JSONL memory + helper.claude/commands/*.md β€” slash commands (/pipeline, /architect, etc.) AGENTS.md β€” the cross-tool entry point Every team repo carried a ~2-3K-line chunk of scaffolding that wasn't really "theirs." When I updated a role contract in the central repo, every

project needed to re-run ft-bootstrap. Users had a ~/bin/ft-bootstrap symlink and a shell rc entry pointing at the team repo. It worked, but it

was heavy.

I wanted to collapse all of that to one command.

PR: #7 Β· version: 0.5.0

This was the load-bearing uncertainty. Could Claude Code plugins actually ship slash commands at all? The docs said yes, but I needed to confirm the

specifics.

The key findings (worth documenting because they weren't obvious):

commands/ directory. commands/architect.md becomes the slash command.frontend-team becomes /frontend-team:architect, not ${CLAUDE_PLUGIN_ROOT} substitutes to the plugin's install directory at load time. Use it exactly like that β€” curly-brace form, literal. The auto-namespacing was the breakthrough. It meant /frontend-team:pipeline (plugin) and /pipeline (repo-local from ft-bootstrap) could

coexist cleanly β€” no collision. Users of bootstrapped repos keep their un-namespaced commands; new users get the namespaced plugin ones. No

forced migration.

The actual move was mechanical:

.claude/commands/ into .agents/roles/<role>.md β†’ ${CLAUDE_PLUGIN_ROOT}/roles/<role>.md..agents/roles/ into roles/ verbatim.pipeline.md, Tested by running /frontend-team:architect <small task> in a clean repo that had never been bootstrapped. The Architect role loaded from the

plugin, produced its plan, and wrote branch-plan.md to the repo root. Works.

PR: #8 Β· version: 0.6.0

The pipeline's roles write persistent branch-scoped JSONL summaries that downstream phases read instead of re-parsing full artifacts. This is where

90% of the token discipline comes from across a branch's lifecycle.

Pre-migration, memory lived at .agents/memory/*.jsonl in each repo via a append.sh helper copied by bootstrap. I wanted memory to work for

non-bootstrapped repos without creating per-repo directories.

Design decision: where does memory live?

Three options I considered:

basename(git toplevel) as the key β€” readable but collides when you have two repos with the same folder name (common with worktrees or multiple clones).sha256(toplevel) β€” collision-safe but unreadable: ls ~/.claude/memory/a8f3c91b.../ means nothing.basename + first 8 chars of sha256 β€” readable AND unique. I went with the hybrid. Example key for my own repo: frontend-eng-team-fcb7bad0. You can ls ~/.claude/memory/ and know which memory belongs to

which project.

Shape of the helper:


  ./bin/append.sh --resolve-dir                                    # prints the dir
  ./bin/append.sh plans.jsonl architect 1 final "..." --tags "..." # appends a record

Roles call --resolve-dir to get the current repo's memory path, then grep as before (filtering by branch via the existing "branch":"<name>" JSON

field). I kept one file per phase and filtered by branch in the grep, rather than sharding files by branch β€” simpler migration, no schema change,

and plans.jsonl growing to a few hundred records doesn't hurt grep performance.

The helper exits cleanly outside a git repo (slug can't be computed), and every role has graceful degradation if memory writes fail β€” a warning

line, no stall.

What stayed per-repo: branch-plan.md and branch-prd.md still land at the repo working-tree root. Users paste from these into PR

descriptions; stuffing them under ~/.claude/scratch/ would hurt the UX more than it would clean the repo. They're already gitignored, and that's

good enough.

PR: #9 Β· version: 0.7.0

Role files reference "conventions" β€” the stack-specific rules about TypeScript strictness, no raw fetch, no inline styles, Jest+RTL co-located,

etc. Each rule tagged CRITICAL / RECOMMENDED / OPTIONAL by severity. Historically these lived at .agents/conventions.md.

The design decision here was about overridability. I wanted:

I settled on: plugin default, optional repo override, repo wins on direct conflict. Not merge β€” too fiddly. Each role's Conventions section

says:

${CLAUDE_PLUGIN_ROOT}/conventions.md first (plugin default). Added a short "Conventions" section to each of the 8 role files, mandating this load order. Fixed one hardcoded .agents/conventions.md reference

in the Verifier that had been living below my grep. Cleaned up remaining .agents/roles/, .agents/pipeline.md, and .agents/pipeline-lite.md

prose references that Phase 1 missed.

ft-bootstrap to narrow legacy Also in #9 Β· version: 0.8.0

With commands, roles, memory, and conventions all plugin-shipped, ft-bootstrap had nothing load-bearing left to do in the default flow. I didn't

want to delete it, though β€” three use cases still need it:

So the script body is unchanged β€” anyone's ~/bin/ft-bootstrap symlink still works. I just added a prominent deprecation-and-use-cases header

at the top so new readers know when to reach for it. Docs (README.md, scripts/setup-global.md, AGENTS.md, docs/architecture.md,

docs/plugin.md) got rewritten to lead with the plugin-only install and relegate bootstrap to an optional section.

Three things that aren't well-documented but are worth knowing if you're shipping a plugin:

1. Command namespacing is automatic and non-configurable. If your plugin is named my-plugin and ships commands/foo.md, users call it as

/my-plugin:foo. This is great for coexistence with repo-local commands, but it means your plugin's command names are permanently prefixed β€” plan

your naming accordingly.

2. ${CLAUDE_PLUGIN_ROOT} is substituted at load time, not at exec time. When a command or role file is loaded into Claude's context, the

variable is replaced with the absolute path to the plugin's install directory. In code blocks and prose it reads a bit ugly

($(${CLAUDE_PLUGIN_ROOT}/bin/append.sh --resolve-dir)/plans.jsonl is not pretty), but functionally it's clean. In shell-form hooks, wrap it in

double quotes to preserve as one argument.

3. Local-vs-plugin command precedence is undocumented. If a user has both a project-scoped .claude/commands/foo.md and a plugin that ships

commands/foo.md, which wins? The official docs don't say. In my case, auto-namespacing sidestepped this entirely β€” the two have different names.

If you can't rely on namespacing, test both-present carefully before relying on precedence.

The script lives on as the escape hatch for:

Most users don't need it. If you're not on that list, skip it.

  claude plugin marketplace add rgadda/frontend-eng-team --scope user
  claude plugin install frontend-team@frontend-team-marketplace --scope user

Then in any git repo: /frontend-team:pipeline <task>.

The four skills (component-conventions, pr-prep, pm-clarify, loop-engineering) also install standalone via skills.sh

for Cursor, Copilot, Windsurf, Gemini, Cline, and any other skills-compatible agent:

  npx skills add rgadda/frontend-eng-team

Subagents and the full pipeline require Claude Code.

Open questions I'd love outside eyes on: whether the basename + sha256[:8] memory-key scheme holds up for people juggling many clones of the same

repo, and whether the plugin-default + repo-override pattern for conventions is a reasonable convention or if someone has a sharper model. Replies

welcome.

── more in #ai-agents 4 stories Β· sorted by recency
── more on @claude code 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/install-once-run-any…] indexed:0 read:7min 2026-12-01 Β· β€”