By edlovesjava
Manage virtual (logical) monorepos: one shared branch across multiple repos, with git worktrees grouped under <worktree_root>/<branch>/<repo>. Implements Pattern 4 of the Managing Claude Code Across Multiple Repositories article -- init, status, sync, test, teardown, and exec skills for branch-based workspaces.
Run the same shell command in every repo of a branch-based virtual-monorepo workspace, sequentially, with per-repo headers. Aggregates exit code so any repo failing fails the whole run. Use when the user says "run X across all repos", "exec ... in JIRA-123 worktrees", "build everything in the workspace", or wants to fan out a command across a branch-based workspace.
Initialize a branch-based virtual-monorepo workspace for a shared branch -- typically a JIRA id. Ensures each repo has a main clone under the root workspace, then creates a worktree per repo at <worktree_root>/<branch>/<repo> on a branch named after the JIRA id. Use when the user says "init virtual-monorepo", "create worktrees for JIRA-123", "set up workspace for ABC-42", or similar.
Summarise the state of every repo in a branch-based virtual-monorepo workspace -- current branch, dirty files, ahead/behind upstream, distance from the default branch, and last commit. Use when the user says "status of workspace", "where is JIRA-123", "what's the state across the repos", or wants a single overview of a multi-repo workspace.
Sync a branch-based virtual-monorepo workspace by fetching origin and rebasing the shared branch onto each repo's default branch, plus refreshing submodules in submodule mode. Use when the user says "sync workspace", "rebase JIRA-123 against main", "update worktrees", or wants to pull upstream changes into a multi-repo branch.
Tear down a branch-based virtual-monorepo workspace once a JIRA branch is merged or abandoned. Refuses to remove worktrees with uncommitted or unpushed work unless --force is given. Use when the user says "teardown workspace", "clean up JIRA-123 worktrees", "remove the workspace for ABC-42", or similar.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
A Claude Code plugin for managing virtual (logical) monorepos — one shared branch (typically a JIRA id) across multiple repositories, with all work done in git worktrees grouped per-branch under a single parent directory.
Think of it as the multi-repo counterpart to Claude Code's built-in worktree support: that gives you parallel branches in one repo; this gives you parallel branches across all the repos that need to change together.
This is the reference implementation of Pattern 4: Agent-Assisted Workspace Management from Managing Claude Code Across Multiple Repositories.
Six skills, namespaced under the virtual-monorepo plugin:
| Skill | What it does |
|---|---|
virtual-monorepo:init <branch> | Ensure a main clone exists per repo, then add a worktree per repo at <worktree_root>/<branch>/<repo> on a branch named <branch>. |
virtual-monorepo:status <branch> | Per-repo summary: branch, dirty file count, ahead/behind upstream, distance from default branch, last commit. |
virtual-monorepo:sync <branch> | In submodule mode: pull root repo and refresh submodule pointers. Then per worktree: git fetch origin && git rebase origin/<default>. Stops on first conflict. |
virtual-monorepo:test <branch> | Run each repo's configured test command (TEST_CMD_<repo> / TEST_CMD / --cmd=). Repos with no command configured are skipped. |
virtual-monorepo:exec <branch> -- <cmd> | Run an arbitrary shell command in every worktree, with per-repo headers and aggregated exit code. The general-purpose primitive that backs virtual-monorepo:test for ad-hoc commands. |
virtual-monorepo:teardown <branch> | Verify every worktree is clean (no uncommitted / unpushed work), then git worktree remove each and drop the per-branch dir. --force skips the cleanliness check. |
| Term | Meaning in this plugin |
|---|---|
| Root workspace | The directory holding shared context (rules, skills, docs) plus the main clones and the branch-based workspaces. The article's "root workspace project" lives here. |
| Main clone | A normal git clone of a repo on its default branch, kept under the root workspace at <root>/.main/<repo>. Worktrees attach to it. |
| Branch-based workspace | The per-JIRA subdirectory <worktree_root>/<branch>/ that groups one worktree per repo. This is what virtual-monorepo:init creates. |
| Worktree | A git working directory attached to a main clone, on the JIRA branch — <worktree_root>/<branch>/<repo>. |
<root_workspace>/ # the root workspace
├── .workspace.conf # manifest: which repos, where worktrees go
├── .main/ # main clones (one per repo, on default branch)
│ ├── service-a/
│ └── service-b/
└── worktrees/ # parent of branch-based workspaces
└── JIRA-123/ # <-- a branch-based workspace
├── service-a/ # worktree of .main/service-a on JIRA-123
└── service-b/ # worktree of .main/service-b on JIRA-123
Pattern enforced:
<worktree_root>/<branch_name>/<repo>
If you'd rather have branch dirs sit directly at the root workspace (no
worktrees/ parent), pass --worktree-root=$root_workspace or set
WORKTREE_ROOT="." in .workspace.conf.
Inside Claude Code:
/plugin marketplace add edlovesjava/workspace-skills
/plugin install virtual-monorepo@workspace-skills
After install, the skills are available as /virtual-monorepo:init,
/virtual-monorepo:status, etc., and Claude will auto-invoke them when the
intent matches their descriptions.
Both modes from the article are supported and can be selected per invocation by flags.
A .workspace.conf lists repos directly. See
examples/manifest-mode/.workspace.conf.
/virtual-monorepo:init JIRA-123
The root workspace points at an orchestration repo whose .gitmodules
defines the constituent repos. See
examples/submodule-mode/.workspace.conf.
/virtual-monorepo:init JIRA-123 --root=https://github.com/example/orchestration.git
/virtual-monorepo:init JIRA-123 \
--repos=service-a=https://github.com/example/service-a.git#main,service-b=https://github.com/example/service-b.git#main \
--workspace-dir=/tmp/myworkspace
All skills accept the same flags so you can drive any of them without a manifest.
npx claudepluginhub edlovesjava/workspace-skills --plugin virtual-monorepoUnity Development Toolkit - Expert agents for scripting/refactoring/optimization, script templates, and Agent Skills for Unity C# development
Complete collection of battle-tested Claude Code configs from an Anthropic hackathon winner - agents, skills, hooks, and rules evolved over 10+ months of intensive daily use
Complete collection of 30 Claude Code skills for document processing, development, business productivity, and creative tasks
Comprehensive skill pack with 66 specialized skills for full-stack developers: 12 language experts (Python, TypeScript, Go, Rust, C++, Swift, Kotlin, C#, PHP, Java, SQL, JavaScript), 10 backend frameworks, 6 frontend/mobile, plus infrastructure, DevOps, security, and testing. Features progressive disclosure architecture for 50% faster loading.
Tools to maintain and improve CLAUDE.md files - audit quality, capture session learnings, and keep project memory current.
Develop, test, build, and deploy Godot 4.x games with Claude Code. Includes GdUnit4 testing, web/desktop exports, CI/CD pipelines, and deployment to Vercel/GitHub Pages/itch.io.