/git-hygiene:setupfrom git-hygiene
Sets up Git Hygiene's optional project worktree location guard by choosing the project and worktree folders and writing them to user-owned configuration. Use when the user asks to configure or enable the worktree location guard, or invokes /git-hygiene:setup.
Ships in git-hygiene. 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.
Configure the optional worktree location guard in ~/.claude/git-hygiene.config.json.
Do not edit files inside the installed plugin directory.
node "${CLAUDE_PLUGIN_ROOT}"/scripts/configure-worktree-location.js --show
If a setting already exists, show its two paths and include them in the confirmation below. Do not replace it silently.
If the current directory is inside a Git repository, find its primary checkout. Git lists it first:
git worktree list --porcelain
Use the path on the first worktree line. Do not use git rev-parse --show-toplevel: inside a linked worktree it names that worktree, and proposing
its parent would put future worktrees inside an existing one.
By default, propose the primary checkout's parent as projectRoot and <projectRoot>/Worktrees as worktreeRoot. If the surrounding folder layout clearly indicates a different shared project folder, propose that instead. If there is no current repository, ask for both paths together. Both must be absolute paths, or start with ~/.
Show both proposed paths and ask once:
Use these project and worktree folders? (yes / give me different paths)
If changing an existing setting, say that it will be replaced. Do not write anything until the user confirms the displayed paths. A correction gives the paths to use and counts as confirmation for that pair; do not ask the same question twice.
For a new setting:
node "${CLAUDE_PLUGIN_ROOT}"/scripts/configure-worktree-location.js --project-root "{projectRoot}" --worktree-root "{worktreeRoot}"
To replace an existing setting, include --replace-existing after the user's confirmation. The script validates the project folder and nesting, preserves other keys, and writes atomically. If validation fails, show the error and leave the prior configuration untouched.
Then verify:
node "${CLAUDE_PLUGIN_ROOT}"/scripts/configure-worktree-location.js --show
Report the configured paths. The hook reads this user-owned file for each Bash command, so the new setting applies to the next command.
What SKILL.md sets; muted values are Claude Code's defaults
4 skills in this plugin
/merge-strategyRecommends squash-and-merge, rebase-and-merge, or a merge commit for the branch in front of you, based on its actual commits, whether the branch is shared, and whether its history is already public. Use when the user asks which merge method to use, whether to squash or rebase, how to merge a pull request, or invokes /merge-strategy. Read-only: it recommends and explains; it never merges, rebases, pushes, or deletes./stale-branchesLists old branches and separates the ones proved safe to delete from the ones not proved safe, then deletes the proved-safe ones after you approve them. Works on the current checkout, on a named GitHub repository, or across every repository you own. Use when the user asks "what branches can I delete", "clean up my branches", "do I have stale branches", "am I still carrying old branches", "tidy up git", or explicitly invokes /stale-branches. Never deletes anything without an explicit yes, and never routes a held branch into deletion.Other plugins' skills for the same job
/worktree-hygieneInspects, creates, relocates, finishes, or removes linked Git worktrees through deterministic checks. Use when the user asks to create an isolated worktree, clean up worktrees, explain duplicate project folders, move branch checkouts out of a project directory, or show which worktrees are finished. Never moves, unlocks, or removes a worktree without exact-path approval.npx claudepluginhub sarahcallmesmadds/infra-plugins --plugin git-hygiene