Claude Gh Guard — Git skill for Claude Code
Stop Claude Code from committing to your work repo with your personal GitHub account.
How to install Claude Gh Guard
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open seuthootDev/claude-gh-guard and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Claude Gh Guard does
Stop Claude Code from committing to your work repo with your personal GitHub account.
Alternatives in Git
- Claude Relay Service — GitHub Repo stars Self-built Claude code mirror service supporting multi-account switching Relay service 9.9k ★
- TDD Guard — by Nizar Selander - A hooks-driven system that monitors file operations in real-time and blocks changes that v 1.9k ★
- Destructive Command Guard — The Destructive Command Guard (dcg) is for blocking dangerous git and shell commands from being executed by ag 869 ★
README
claude-gh-guard

[](https://www.npmjs.com/package/claude-gh-guard) [](https://www.npmjs.com/package/claude-gh-guard) [](https://github.com/seuthootDev/claude-gh-guard/actions/workflows/ci.yml) [](https://www.npmjs.com/package/claude-gh-guard) [](LICENSE)
Stop Claude Code from committing to your work repo with your personal GitHub account.
It adds two things to Claude Code: a status line segment that always shows which GitHub identity is in play for the current repo, and a `PreToolUse` hook that blocks `git commit`, `git push` and `gh pr create` when the identity is definitely the wrong one. Zero runtime dependencies, Node >= 18.
**Right account** — the status line confirms the GitHub identity for this repo, followed by the Claude account in use:

**Wrong account** — the status line turns red (here the SSH key still belongs to the right account, so it is shown too) and `gh pr create` is blocked with the fix:

**Nothing to check** — outside a GitHub repo (here: no remote yet) the segment is grey and nothing is blocked:

Install
npx claude-gh-guard init
or
npm i -g claude-gh-guard && claude-gh-guard init
`init`:
- copies the CLI to
~/.claude-gh-guard/bin/cli.mjs - backs up your
settings.json - sets the status line to the guard; an existing status line i
Related Skills
Drift Fix
Resolve upstream fork-drift end-to-end — run the drift guard, mechanically bump every auto-bumpable pin, land
Close Task
Close a human-verified tracked task by committing completed work, recording a short verification note, then up
Spell Commit Work
Use PROACTIVELY whenever committing work during a session, even if the user just says 'commit this'.
Working Mode
Switch the ss working mode on or off for this session — Polish replies, a fixed KONTEKST / WYNIK / CO DALEJ sk
Tracker Loop
Run ONE iteration of an unattended loop — babysit a PR to green, clear an epic leaf by leaf, or poll a label a
Pip Skills
A personal collection of Claude Code skills for serious engineering work — from PR review to architectural aud
Related Agents
Profile Collector
Collects my GitHub work (work repos + personal account) into profile/work.md and profile/personal.md. Use when
Cross Account Comparator
Synthesises per-account analyses into the final personal-vs-work audit and proposed changes. Use as the last s
Privacy Guard
Scans for localStorage privacy violations. Use when auditing what data is being persisted, before committing c