Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By smorinlabsv1.6.0MITIn 1 marketplace
Fork a Claude Code or Codex session into its own branch and Git worktree with every uncommitted file copied and verified; the /agent-fork skill drives the agent-fork CLI.
Claude loads one when your task matches it, or you run it by name.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Forking a session is easy; forking your files isn't. This Claude Code / Codex skill gives the forked session its own branch and worktree with every uncommitted file copied and verified.
You are deep in a Claude Code, Codex, Muse, OpenCode, or borg1 session. The agent has context you do not want to rebuild, and your working tree is full of uncommitted work. Now you want to try a second approach — without stashing, without losing the first one, and without starting the conversation over.
The agent-fork skill does that without leaving the conversation. Type
/agent-fork try-redis (Claude Code) or $agent-fork try-redis (Codex) and it
creates a new branch and a linked Git worktree, copies your current staged,
unstaged, and untracked files into it, verifies the copy matched, and prints
the exact command that continues this conversation in that new worktree. Your
original worktree and session are never touched.
Underneath the skill is a standalone agent-fork CLI that does the same work
from any terminal. Outside an agent session it prints a cd command instead of
a session-continuation command, so the same tool covers plain Git workflows.
From inside your Claude Code or Codex session (the skill installs into those two; inside OpenCode, run the agent-fork CLI):
/agent-fork try-redis # fork without leaving the conversation
Don't have the skill yet? One command installs it for both agents:
npx skills@latest add smorinlabs/agent-fork
The skill previews the fork — target branch, destination worktree, the files it would carry — and asks for confirmation before creating anything. It drives the CLI below, which works directly from a terminal too:
$ agent-fork fork try-redis --dry-run
branch: create fork/try-redis
worktree: create /Users/you/code/myapp-fork-try-redis
files-to-carry: staged=3 unstaged=7 untracked=2 ignored=0
setup-hook: none
paste command: cd /Users/you/code/myapp-fork-try-redis && claude --session-id 9b74b9f2-f3d2-4060-b233-0121ac17ed7c --resume c854b79c-16b2-4863-a095-03d35d195ec9 --fork-session -n try-redis
validation: local-only; no mutation performed
Drop --dry-run and the fork is created. Paste the final line into a fresh
terminal and the agent picks up where it left off — same context, new branch,
your uncommitted work already there.
The full set of skill invocations:
/agent-fork try-redis # explicit fork name
/agent-fork try-redis --now # fork immediately, no confirmation
/agent-fork # fork with context-aware naming
/agent-fork --session # inspect this agent session
/agent-fork --session-only # print only the native session-fork command
Codex invokes the same skill as $agent-fork; every form above is otherwise
identical.
The skill delegates operations to the CLI. It first validates a session inspection, then uses the selected runner for the operation's command:
| Skill form | CLI call | Result |
|---|---|---|
| The fork forms | agent-fork fork ... --require-agent --json | The branch, the worktree, and the paste command |
--session | agent-fork session --json | The session inspection plus its transcript path and its native fork and resume commands |
--session-only | agent-fork session --json | Only that native fork command |
The fork's name comes from one of three places:
"Review Auth" becomes review-auth).Every fork is confirmed before it exists: the skill runs a dry run, shows you
the target branch, the destination worktree, and the files it would carry,
and creates the fork only after you approve. --now skips that confirmation;
the name is still chosen the same way.
The skill uses the installed agent-fork CLI when its output supports the
requested operation. If the CLI is missing or lacks a required field, the
assistant runs the operation through uvx from the official Git repository.
It uses uv tool run when only uv is available. Fetching the tool does not
add a confirmation question; the environment's execution permissions apply.
npx claudepluginhub smorinlabs/agent-fork --plugin agent-forkPlugins from other owners that cover similar ground
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.