npx claudepluginhub smacfiggen/agent-annexPlace agent worktrees outside <repo>/.claude/worktrees, where the CLI's compiled-in sandbox deny prefix blocks writes
Serialize session state to a per-worktree payload stored outside the repo, auto-saved before context loss and auto-injected after
7-day visitors to each marketplace page
Agent worktrees and session handoffs, kept next to your repo instead of inside it.
An annex is a building attached to the main one but standing outside it. These two Claude Code plugins do the same thing for the two places an agent leaves a mess in your checkout: the worktree it works in, and the handoff payload it writes for the next session. Both move out of the repo and sit beside it.
| Plugin | Problem | Fix |
|---|---|---|
worktree-placement | Agent worktrees land in <repo>/.claude/worktrees/, where the CLI's sandbox refuses to write. | Puts them in ~/worktrees/<repo>/<name> instead. |
handoff-state | Handoff payloads land in the repo — so they get committed by accident, or die with the throwaway worktree that wrote them. | Stores one payload per worktree, outside the repo. Saves before context is lost, restores after. |
The two plugins share no code. Install either on its own.
/plugin marketplace add smacfiggen/agent-annex
/plugin install worktree-placement@annex
/plugin install handoff-state@annex
From a local clone instead, which is what you want while iterating:
/plugin marketplace add ~/repos/agent-annex
Plugins are enabled per project in .claude/settings.json, so do this once per repository.
handoff-state also runs on Codex CLI, unmodified — but its hooks must be trusted there or they
are skipped silently. See the handoff-state README.
worktree-placement is Claude Code only; Codex has no worktree event to hook.
Plain bash scripts. No runtime, no package manager, nothing to build. You need:
gitjq — for reading the JSON hook payloadsha1sum, shasum, or openssl — any one of themEverything else is POSIX or coreutils. macOS and Linux both work, and a worktree keyed on one resolves to the same directory on the other.
If something is missing, you get told rather than silently guessed around. handoff-state
degrades to a no-op with a warning; worktree-placement aborts. (Why they differ:
here.)
worktree-placement needs no interaction. Create a worktree as usual and it lands outside the
repo. Override the location with a .worktreeroot file or $CLAUDE_WORKTREE_ROOT.
handoff-state is explicit to save, automatic to restore:
/handoff-state:handoff before you stop, and you get a dense, deliberate payload.PreCompact / SessionEnd hooks write a mechanical snapshot as a backup.MIT.
Anthropic example skills
Anthropic's Claude Code plugins, installed from the claude-plugins-official repository
Ultra-compressed communication mode. Shortens prose while preserving technical terms, code, commands, and exact errors.