This guide takes you from scratch to a working hub with two child sessions running in parallel and your first routing decisions on screen. Each step tells you what to do and what you should see as confirmation, so you can verify that everything works before moving on to the next step.
Before you start: requirements
Before installing the plugins, make sure your environment meets these requirements:
| Requirement | Value |
|---|---|
| Claude Code (for mods) | Version 2.1.329 or later. Both plugins declare engines["claude-code"]: ">=2.1.329" and have been tested on 2.1.329 and 2.1.330. |
| Claude Code (for cross-session messaging) | Version 2.1.224 or later (required by session-hub). |
| Mods enabled | Required for both the session-hub mod (send guard, shell check, origin tagging, scope line, child sessions panel, /session-hub) and the model-router mod (routing, measurements, 🔀 line under Agent calls, /model-router). |
node | Available on your PATH. The scope guard, the record script, the panel, and all model-router scripts run on Node with zero external dependencies. |
| Operating system | macOS or Linux. |
What if mods are disabled? Skills and the scope guard still work, but you lose message and shell command guards, the child sessions panel, automatic routing when subagents launch, measurements, and the /session-hub and /model-router commands.
1. Install the plugins from the marketplace
Both plugins are available in the mrbogomips marketplace. Install them directly from inside a Claude Code session:
/plugin marketplace add MrBogomips/claude-plugins
/plugin install session-hub@mrbogomips
/plugin install model-router@mrbogomips
Alternatively, run the same commands from your terminal:
claude plugin marketplace add MrBogomips/claude-plugins
claude plugin install session-hub@mrbogomips
claude plugin install model-router@mrbogomips
Each plugin works on its own, and together they complement each other: when both are installed, session-hub:spawn uses model-router:choose-model to pick the model and effort level for each child session. Without model-router, child sessions simply inherit the master's model and effort, and spawn notes this in its report.
2. Verify that mods are active
Before setting up a hub, run a quick check to make sure the mods loaded properly. Open Claude Code and type /session-hub or /model-router.
If everything is working, /session-hub replies like this in a session that does not yet have a hub role:
session-hub: This session has no session-hub role. It becomes a master when it uses session-hub:spawn or session-hub:dispatch.
If Claude Code does not recognize the command, the mod is not active: check that mods are enabled and that your Claude Code version is at least 2.1.329 (run claude --version in your terminal to check).
3. Set up your hub
Remember that a hub needs no special layout: it is any directory that holds multiple git repositories as subdirectories or submodules.
Open Claude Code in the hub's root directory and ask in plain language:
set up session-hub for this hub
This triggers the session-hub:setup skill, which automatically inspects the directory (subdirectories with .git, any .gitmodules, each repository's base branch, and worktree rules). Based on what it finds, it drafts a ## Child sessions section for the hub's AGENTS.md (or CLAUDE.md), previews it for you, and writes it only after your explicit confirmation, without making any commits.
Every key is optional: even without this section, spawn still works using default values and suggests running setup in its report.
Where to create test hubs: keep test hubs inside your home directory. During testing, a hub created under the system temporary directory failed to load any project instruction files.
4. Spawn your first child sessions
For the best experience, start the master inside Herdr or tmux: that way spawn opens each child session in a dedicated pane next to yours, with the scope guard already active.
Now ask the master for a task that requires changes across two repositories:
T-42: add GET /export to product (CSV, at most 10 000 rows) and document the limit in design/docs/api/export.md.
Here is what happens behind the scenes:
- The master loads the
dispatchskill, evaluates the request, and states its plan in a short table (one write child session forproduct, one fordesign). - It calls
spawnonce for both, so each child's handoff immediately lists the other as a sibling session. - When finished, it prints a detailed report for each spawned session: name, repository, write root, chosen model and effort, environment, instructions to open it, and any warnings.
First run in a nested repository: trust granted to the hub directory does not automatically carry over to the repositories inside it. On the first run, a child session may pause at the trust prompt in its pane, while claude --bg fails with Workspace not trusted. Accept the prompt (or open that repository once with claude) and ask the master to retry.
5. Monitor child sessions with /session-hub
Once child sessions are working, check on them at any time by typing /session-hub. The command adapts to where you run it:
- In the master, it shows the path to the children record and a summary table with the recorded status, the live status from the session list, the assigned model and effort, and the last message received. It also opens the child sessions panel next to the chat, which refreshes automatically every 30 seconds.
- In a child session, it shows its role, write root, and received handoff, and confirms whether guards are active.
/session-hub in the master. A child session that has finished and dropped off the session list shows not listed.6. Watch your first routing decision
Next, watch model-router in action. With the plugin installed, the choose-model skill steps in whenever the agent is about to launch a subagent.
To see it right away, ask for a task that calls for a subagent—for example, a search across a fairly large repository. Before launching the subagent, the agent prints a single line:
🔀 haiku ▰▱▱▱ low -> find callers of parseConfig, easy to check
This line captures the whole decision at a glance:
- the chosen model (
haiku); - a four-pip effort bar (from one pip for
lowup to four forxhigh); - the effort level in plain text;
- the reason for the choice in under twelve words.
With the mod active, the same line also appears in color right under the Agent call, reflecting the model and effort actually applied after any router or judge intervention:
⏺ Agent([mr:read-search] Find the CSV writer)
⎿ 🔀 haiku ▰▱▱▱ low -> judge: read-search; lowered from sonnet
If the agent launches multiple Agent calls in the same message, Claude Code collapses them into a single "background agents launched" line: press ctrl+o to expand them and read each call's 🔀 line.
7. Check measurements with /model-router
To see how your routing decisions are performing, type /model-router. This opens the interactive usage view, defaulting to the user-level Overview tab for the last 7 days.
Navigate the data from your keyboard:
Tab/Shift+Tab— switch between the Overview, Models, Classes, and Decisions tabs;d,w,m,a— change the time range (day, week, month, all);p— toggle between your global data and the current project only;o— generate and open the full report page;Esc— close the view.
Why are the numbers still zero? That is normal in the first few minutes. A task is counted only once its rework window closes—either 30 minutes after the subagent reports back or when the session ends. See a real session for what kind of data to expect after a day, a week, and a month.
8. Customize project exceptions with model-router:setup
The default grid covers most cases well, but every project has its own sensitive areas—or, conversely, repetitive parts where a lightweight model is plenty. When you want to record those exceptions, ask inside the project session:
set up model routing for this project
The model-router:setup skill asks which defaults and exceptions you want to set and scans the repository to suggest common candidates (migrations, infrastructure, billing, generated code, bulk refactors). Like session-hub:setup, it previews the exact ## Model routing section first and writes it to the project's AGENTS.md only after your explicit confirmation. For full details, see the model-router page.
Keep the manual handy
Prefer having everything in a single offline reference? The full manual collects every command, keybinding, and option for both plugins, along with an end-to-end walkthrough and a troubleshooting guide.