Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/djrhails/dotfiles/cmux-fork-sessionnpx skills add DJRHails/dotfiles --skill cmux-fork-sessiongit clone --depth 1 https://github.com/DJRHails/dotfilesWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/djrhails/dotfiles/cmux-fork-session)<a href="https://agentmods.dev/skills/djrhails/dotfiles/cmux-fork-session"><img src="https://agentmods.dev/badge/skills/djrhails/dotfiles/cmux-fork-session.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00137 | $0.02990 |
| Opus 5 | $0.00068 | $0.01495 |
| Sonnet 5 | $0.00027 | $0.00598 |
| Haiku 4.5 | $0.00014 | $0.00299 |
Grade A, and why
cmux-fork-session scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 178 lines — stays where its author put it; the contents beside it link to each section on GitHub.
cmux: fork this session into a new split (or tab)
Forks the current agent session into a new cmux split pane (or tab) so you can branch the
conversation and keep working in both, side by side. The new surface gets a new session id with
the same history up to the fork point, is titled fork: <session-name>, and keeps that title.
Both agents are supported; the flavour is autodetected (override with FORK_AGENT):
| agent | detected by | fork command |
|---|---|---|
| Claude Code | CLAUDE_CODE_SESSION_ID |
claude --resume <id> --fork-session |
| pi | PI_CODING_AGENT=true |
pi --fork <session.jsonl> --provider … --model … --thinking … |
pi is checked first: when nested (a pi session launched from Claude Code) pi is the innermost, and is the session the caller is actually talking to.
Usage
Run the reference script — it reads everything from the environment:
bash .../cmux-fork-session/reference/fork-session.sh # split right, title "fork: <name>"
bash .../cmux-fork-session/reference/fork-session.sh "branch: " down # split downward, custom prefix
bash .../cmux-fork-session/reference/fork-session.sh "fork: " tab # new tab instead of a split
Second arg where: right (default) | left | up | down for a split, or tab for a sibling
tab. (The skill base directory is printed when the skill loads.)
Env overrides: FORK_AGENT=claude|pi forces the flavour; PI_SESSION_FILE / PI_SESSION_DIR
pin pi's session log; CMUX_DURABLE_HOST / CMUX_APP_HOST override the remote and app hosts;
CMUX_APP_BIN pins the cmux binary.
What it does
- Resolve the session from env, never the process tree:
CLAUDE_CODE_SESSION_ID+CLAUDE_CONFIG_DIR, or pi'sPI_SESSION_FILE/PI_SESSION_ID. Read the session name and project cwd from$CLAUDE_CONFIG_DIR/sessions/<pid>.json(Claude), or the session JSONL's firstsessionentry plus lastsession_infoentry (pi). - Resolve this session's live cmux surface. Locally, trust the freshly-injected
CMUX_SURFACE_ID. On a remote, find the surface whose title contains a match key — see Surface resolution. The resolved id also heals the live-ids sidecar socmux-session-tabrecovers too. - Create the surface:
cmux rpc surface.splitbeside the caller, orsurface.createfor a tab. - Launch the fork. Claude:
cd <cwd> && <launcher> --resume <id> --fork-session, choosing the launcher that matches the session's config dir —~/.claude-ant→claude::ant(sources.env.antauth + ensure step),~/.claude→claude, otherwiseCLAUDE_CONFIG_DIR=<cfg> claude. Matching the wrapper matters: a bareCLAUDE_CONFIG_DIR=… claudeskipsclaude::ant's auth and lands "Not logged in". pi:cd <cwd> && pi --fork <session.jsonl> --provider … --model … --thinking …(see pi specifics). - Title the new tab
fork: <name>viarpc tab.action.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 178 lines · 137 tokens per session scan A 00ac2c6d3e87
cmux-fork-session is a skill published in the GitHub repository DJRHails/dotfiles (2 stars, last pushed today), licensed MIT. It adds 137 tokens to every session and 2,990 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
autopilot-batch
Fan out a batch of autopilot-queued issues to parallel background worktree subagents — each runs /autopilot at the build model from its 'model:' label — with a gating review at Opus 5 or above and never below the build (Opus reviews Sonnet and Opus builds, Fable reviews Fable builds).
todoist-cli
Manage Todoist tasks, projects, labels, filters, sections, comments, reminders, and workspaces via the td CLI. Use when the user wants to view, create, update, complete, or organize Todoist items, or mentions tasks, inbox, today, upcoming, projects, labels, or filters.
autopilot
Carry a well-scoped GitHub issue through the full dev loop autonomously, stopping at a per-run tier boundary (PR-ready, or merge+deploy for small reversible changes).
qa-handoff
Generate a hands-on QA testing guide as a self-contained HTML page — for Rails apps or static (Hugo) sites. --publish uploads the HTML to the project's configured QA host.
walkthrough
Generate a hands-on browser walkthrough of a PR's user-facing changes to exercise before review; --publish posts the final version to the PR for QA.
dustoff
Assess a project that's been dormant for months and produce a prioritized re-entry plan — lifecycle stage, what's stale or broken, and how far the project's tooling has drifted from current conventions — delegating every fix to the skill that owns it, and optionally capturing the plan as a tracking issue that survives…