More screenshots
Works with the AI Agents you already use
Claude gh Guard
Stop Claude Code from committing to your work repo with your personal GitHub account. Free and open source (MIT).
Free
claude-gh-guard
Example session with this skill installed
I need to set up the GitHub guard to make sure I don't use my personal account for work repos. Check if I have the requirements and show me how to init it.
- Read your context and instructions
- Compiled the claude-gh-guard
I checked your environment before installing claude-gh-guard.
| Requirement | Status |
|---|---|
| Node.js 18+ | v20.11.0 ✅ |
| GitHub CLI | logged in as work-user and personal-user ✅ |
| Claude Code | ✅ |
What init will change
init edits your Claude Code settings (~/.claude/settings.json, or $CLAUDE_CONFIG_DIR/settings.json if set):
- Backs up your current
settings.json - Copies the CLI to
~/.claude-gh-guard/bin/cli.mjs - Sets the status line to the guard. Your existing status line is kept and wrapped.
- Adds a
PreToolUsehook (matcherBash) that checksgit commit,git pushandgh pr create
Only a definite wrong-account case is blocked. Anything ambiguous or unknown is let through with a warning.
Shall I run it?
npx claude-gh-guard init
After you approve
- Restart Claude Code so the hook and status line load.
- In a repo, run
npx claude-gh-guard doctor. It shows the active gh account, your commit email, the push identity and which account this repo expects. - If
doctorreports AMBIGUOUS (several of your accounts can push here), pin the accounts in~/.gh-guard.json:
{
"profiles": {
"work": {
"ghUser": "work-user",
"gitEmail": "you@company.com",
"owners": ["company-org"]
},
"personal": {
"ghUser": "personal-user",
"gitEmail": "you@example.com",
"owners": ["personal-user"]
}
}
}
To remove everything later: npx claude-gh-guard uninstall.
Connects securely to your tools. The creator never sees your data.
About this skill
Free and open source (MIT). Install with one command:
npx claude-gh-guard init
⭐ If it saves you from a wrong-account commit, a star on GitHub would mean a lot: https://github.com/seuthootDev/claude-gh-guard
What it does
- Status line shows which GitHub account is active for the current repo, plus your Claude account
- Blocks
git commit,git pushandgh pr createwhen the identity is definitely wrong - Only a definite mismatch blocks. Ambiguous, unknown or error states let the command through
- Zero runtime dependencies, Node >= 18, one command to uninstall
Compatibility: Claude Code only. It relies on Claude Code hooks and the status line, so it does not work in Cursor, Copilot or other agents.
Bugs and ideas: https://github.com/seuthootDev/claude-gh-guard/issues
Only supports github.com. No support for GitHub Enterprise. Commands in subshells or with 'env' prefixes are ignored. Custom SSH commands may limit push identity detection.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 14 days ago
- Free with an Agensi account
- Accounts
GitHub
- Software
Git
Node.js 18+
GitHub CLIClaude Code
On Windows, works through Git Bash (installed with Git for Windows); no WSL needed.
Permissions
Allowed Hosts
File Scopes
Edits Claude Code settings.json (after a backup) to add a PreToolUse hook and status line. Reads gh's login config to see your accounts and calls the GitHub API to learn which account can push to a repo. Tokens stay in memory and are never written to disk. Reads the CLAUDE_CONFIG_DIR, GH_GUARD_ASCII and NO_COLOR environment variables. `npx claude-gh-guard uninstall` reverts everything.
What's inside
Frequently Asked Questions
New in Security
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.