/model-citizen:worktree-per-agentfrom Model Citizen
Isolates an agent's work in its own git worktree branched off the default branch, preventing conflicting changes on the shared checkout. Use at the start of implementation tasks in repos where others may be working.
Ships in Model Citizen. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The shared checkout belongs to the human. An agent that edits it directly races every other agent and every uncommitted human change. So: branch a worktree off the default branch, work there, land the result through the repo's normal path, remove the worktree.
REPO=$(git rev-parse --show-toplevel)
NAME=<task-slug>
DEST=$(citizen worktree create "$NAME" "$REPO")
cd "$DEST"
The dedicated root keeps temporary task checkouts separate from permanent clones. It defaults to
~/worktrees/<repo>/<task>; HARNESS_WORKTREE_ROOT may replace ~/worktrees. The helper fetches
origin and defaults to origin/main. Confirm the repository's default branch first and pass
--base origin/<default> when it differs, or the explicit base required by the task. Follow
repository-specific location instructions.
Never create a task worktree as a sibling under the directory holding permanent repositories.
node_modules or virtualenv is reachable.verification.md.cd back into the shared checkout to run something "quickly".Where PRs are required, push the task branch and merge through a PR. Where the repository permits direct pushes, land the verified change through that route. With merged-PR removal proof:
citizen worktree remove "$NAME" "$REPO" --merged
--merged deletes the local branch as well, and only once gh reports a merged pull request
whose head commit is the branch tip. A repository that squash-merges leaves the branch's own
commits out of the default branch, so git branch -d refuses work that did land; that proof is
the check instead. Direct-push repositories have no merged-PR proof: remove the clean worktree
without --merged, retain the branch, and inspect its reachability before any separate cleanup. Removal does not count regenerable caches
such as __pycache__ that a gate run wrote, and still refuses any other modified, untracked or
ignored entry; --also-clear <name> adds a regenerable top-level directory the built-in list
misses.
git status and history rewrites. git worktree list before
any operation that touches every branch. citizen worktree audit "$REPO" reports dirty and
stale checkouts; a clean checkout can still contain unpublished commits, so audit branch history
before removal.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub jakeselby/model-citizen --plugin model-citizen15 skills in this plugin
/api-verificationProve a search, filter or API answer is real before relying on it, and budget web search across a fan-out. Use when querying an unfamiliar API, a filter returns suspiciously clean results, a per-item error may have been swallowed, or briefing research agents./architecture-viewerOpen or update an architecture diagram with the selected builtin or custom viewer, preserving a neutral session handoff. Use when asked to inspect architecture interactively or continue an existing diagram session./code-quality-instrumentsMeasure whether a test suite is any good, not only that it passes — branch coverage, mutation score, complexity-times-coverage risk, duplication. Use when adding or reviewing tests on a change that matters, a suite passes but a bug still shipped, coverage is high and confidence is not, or before promising a module is well tested./delegation-tieringDecide whether to spawn a subagent, and on which model tier and reasoning effort. Use when planning a fan-out, choosing a subagent model, writing a workflow script's opts.model, authoring an agent definition, setting a repo's cost posture, or when a delegation decision is non-obvious./design-loopRaise the visual quality of something that renders through a build, screenshot, independent scored critique and fix loop, against rubrics with hard accessibility, design-token, runtime and asset-licensing gates. Use when asked to make a UI, page, HTML doc, dashboard, game scene or 3D asset look dramatically better, more polished or more professional; to improve the visual design, look, styling or visual quality of a surface; to iterate toward a reference, mockup or screenshot; and proactively after building or substantially changing a user-facing surface. Not for deciding what screens exist or how flows behave./harness-authoringDecide where an instruction belongs and write it there, then sync and lint. Use when asked to add, change or remove a rule, skill, instruction, hook, setting or CLAUDE.md line, to "remember" something that should persist beyond this session, or when a correction should apply to future sessions.Other plugins' skills for the same job