claude/skills/wt-git/SKILL.md
Run git and GitHub operations inside a worktree without triggering Claude Code's safety heuristics. Use this skill whenever you need to commit, push, create PRs, or run any git command in a worktree you're not currently inside — especially from orchestrator agents, /fromage, /move-my-cheese, or /cheese-convoy. Also use when you catch yourself about to write "cd <path> && git" or "gh pr create --body" with a heredoc. This skill exists because Claude Code's Seatbelt sandbox blocks two legitimate patterns: compound cd+git commands ("bare repository attack" heuristic) and heredoc PR bodies with markdown headers ("# hides arguments" heuristic).
npx skillsauth add paulnsorensen/dotfiles wt-gitInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Git and GitHub operations for worktrees without triggering safety heuristics.
Claude Code's bash safety checks block two common worktree patterns:
cd /path && git commit — triggers "bare repository attack" warninggh pr create --body "$(cat <<'EOF' ## Summary ...)" — triggers "# hides arguments" warningBoth cause approval prompts that break automated workflows. Neither can be suppressed via permissions.allow or bypassPermissions.
wt-gitThe wt-git wrapper runs git -C <path> under the hood — a single command, no cd &&.
# Instead of: cd .worktrees/my-task && git status
wt-git .worktrees/my-task status
# Instead of: cd .worktrees/my-task && git add -A && git commit -m "feat: thing"
wt-git .worktrees/my-task add file1.rs file2.rs
wt-git .worktrees/my-task commit -m "feat: add feature"
# Instead of: cd .worktrees/my-task && git push origin claude/my-task
wt-git .worktrees/my-task push origin claude/my-task
# Instead of: cd .worktrees/my-task && git log --oneline -5
wt-git .worktrees/my-task log --oneline -5
# Instead of: cd .worktrees/my-task && git diff --cached
wt-git .worktrees/my-task diff --cached
wt-git accepts any git subcommand — it's a transparent passthrough to git -C.
For PR creation, use the GitHub MCP plugin instead of gh pr create. MCP tools don't go through bash at all, so no heuristic fires.
mcp__plugin_github_github__create_pull_request(
owner: "paulnsorensen",
repo: "my-repo",
title: "feat: add feature",
body: "## Summary\n- Added feature X\n\n## Test plan\n- [x] Tests pass",
head: "claude/my-task",
base: "main"
)
For operations MCP doesn't cover, write the body to a temp file to avoid heredoc:
# Write PR body to file (no # heuristic trigger)
cat > /tmp/pr-body.md << 'BODY'
## Summary
- Added feature X
## Test plan
- [x] Tests pass
BODY
# Create PR reading body from file
gh pr create --title "feat: add feature" --body-file /tmp/pr-body.md --base main --head claude/my-task
If the agent is running inside the worktree directory (e.g., spawned with isolation: "worktree"), use plain git — no cd needed, no wrapper needed:
git add file1.rs
git commit -m "feat: add feature"
git push origin HEAD
The heuristic only fires on cd <path> && git, not on bare git commands.
| Operation | From outside worktree | From inside worktree |
|-----------|----------------------|---------------------|
| Any git command | wt-git <path> <cmd> | git <cmd> |
| Create PR | MCP create_pull_request | MCP create_pull_request |
| PR with body | gh pr create --body-file /tmp/body.md | gh pr create --body-file /tmp/body.md |
| Push | wt-git <path> push origin <branch> | git push origin HEAD |
wt-git .worktrees/my-task add src/lib.rs src/main.rs
wt-git .worktrees/my-task commit -m "feat: add feature"
wt-git .worktrees/my-task push origin claude/my-task
Then use MCP create_pull_request for the PR.
wt-git .worktrees/my-task status
wt-git .worktrees/my-task log --oneline origin/main..HEAD
wt-git .worktrees/my-task diff --stat origin/main...HEAD
wt-git wrapper must be on PATH (sourced from zsh/claude.zsh) — sub-agents may not have itgh pr create --body-file still triggers heuristic if the temp file path contains #create_pull_request requires exact owner/repo strings — parse from git remotetools
Reconstruct what a past coding-agent session was doing so you can resume it — goal, files touched, last verified state, and the next step — by querying the session logs. Use when the user says "what was I working on", "recover that session", "reconstruct where I left off", "resume my last session", "what did that session change", "rebuild context from logs", or invokes /work-recovery. Report-only — it never scores or judges. Do NOT use for usage scoring (that is /skill-improver, /tool-efficiency, /prompt-analytics) or one-off interactive log queries (that is /session-analytics).
development
Curate this repo's hallouminate wiki (.hallouminate/wiki/, the repo:dotfiles:wiki corpus) — add or update architecture pages, per-harness docs, and gotchas. Use when the user says "update the wiki", "document this in the wiki", "refresh the harness docs", "add a wiki page", "curate the wiki", "the wiki is stale", or invokes /wiki-curator. Also use at session end to write back a non-obvious decision or gotcha worth preserving. Grounds the existing wiki first, follows one-topic-per-file conventions, verifies every external doc URL before writing, and reindexes. Do NOT use for general code search (that is cheez-search) or for editing AGENTS.md command reference.
tools
Audit how a tool, command, or MCP server is actually used across coding-agent sessions and produce calibrated recommendations — tool-vs-task fit, error forensics, fix recommendations, permission friction, MCP health, and token economics. Use when the user says "tool efficiency", "am I using X efficiently", "audit tool usage", "why does X keep failing", "how do I fix this error", "what should I change", "permission friction", "is this MCP worth it", "tool error rate", "fix recommendations", or invokes /tool-efficiency. Do NOT use for auditing a skill or agent definition (that is /skill-improver) or for one-off interactive log queries (that is /session-analytics).
tools
Analyze how prompts and skill routing behave across coding-agent sessions and produce calibrated recommendations — prompt-pattern analysis, routing accuracy, and knowledge gaps. Use when the user says "analyze my prompts", "prompt patterns", "is routing working", "which skill should have fired", "knowledge gaps", "what do I keep asking", or invokes /prompt-analytics. Do NOT use for auditing a single skill/agent definition (that is /skill-improver), tool/MCP efficiency (that is /tool-efficiency), or one-off interactive log queries (that is /session-analytics).