guard-git
Block dangerous git commands (push, force push, reset --hard, clean, branch -D, checkout/restore .) and enforce Conventional Commits & Branch Protection…
Skill by danielvm-git
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/danielvm-git-guard-git
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/guard-git
What's inside
- Skill name
guard-git- Description
- Block dangerous git commands (push, force push, reset --hard, clean, branch -D, checkout/restore .) and enforce Conventional Commits & Branch Protection before an AI agent runs them. Installs hook scripts for Claude Code, Cursor, Cursor CLI, and Gemini CLI; documents Google Antigravity Terminal deny lists. Use when the user wants git safety hooks, to block git push or destructive git in agents, or to mirror the same policy across AI coding tools.
- License
- MIT
- Instructions
- 227 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- files: referenced but missing: scripts/land-branch.sh
Files (1)
- SKILL.md
SKILL.md (first lines)
# Guard Git
> **HARD GATE** — **HARD GATE** — Before committing, verify: branch is not main/master, author is correct, git user is configured. Bad commits are hard to fix.
Installs a shared hook that blocks destructive git operations and enforces workflow discipline. **Requires `jq` on the agent's PATH** when the hook runs.
## What gets blocked/enforced
- **Safety**: `git push --force`, `git reset --hard`, `git clean -f`, `git branch -D`, `git checkout .`, `git restore .`.
- **Discipline**: Blocks direct commits or pushes to protected branches (`main`, `master`) unless `GIT_BIGPOWERS_LAND=1` (set only by `scripts/land-branch.sh`).
- **Allows**: `git push origin <feature-branch>` for backup/CI; solo land push to `main` only inside `land-branch.sh`.
- **Standardization**: Enforces [Conventional Commits](https://www.conventionalcommits.org/) for all `git commit` commands.
- **Secrets**: Blocks commits containing common secret patterns (`sk-`, `ghp_`, `AKIA`, `xoxb-`, `-----BEGIN` private keys) — see [REFERENCE.md](REFERENCE.md).
## Quick start
1. **Scope**: ask project-only vs global (paths differ per product).
2. **Write the hook bundle** from [REFERENCE.md](REFERENCE.md) into the client's hooks directory.
3. **Run `chmod +x`** on `pre-tool-use.sh`.
4. **Merge** the hook snippet from [REFERENCE.md](REFERENCE.md) into the right settings file — do not wipe unrelated keys.
5. **Verify** with the tests in [REFERENCE.md](REFERENCE.md).
| Client | Mechanism | Config |
|--------|-----------|--------|
| Claude Code | `PreToolUse` (Bash) | `.claude/settings.json` or `~/.claude/settings.json` |
| Cursor / Cursor CLI | `beforeShellExecution` | `.cursor/hooks.json` or `~/.cursor/hooks.json` |
| Gemini CLI | `BeforeTool` + `run_shell_command` | `.gemini/settings.json` or `~/.gemini/settings.json` |
| Google Antigravity | Built-in Terminal **Deny list** | Settings UI (no shell hook) |
**Modes (env on the hook command):** `GIT_GUARDRAILS_MODE` is `claude` (default) or `cursor` → stderr + exit `2` on block. Set `gemini` for Gemini CLI → JSON `decision` on stdout.
## Customization
To add or remove patterns or protected branches, edit `pre-tool-use.sh`.
## Advanced
Full JSON examples, merge rules, Antigravity deny-list entries, and test commands: [REFERENCE.md](REFERENCE.md).
<!-- story: e01s03 -->
---
# Git guardrails — reference
## Navigation
| Lines | Section |
|-------|---------|
| 1 | Title |
| 3–16 | Navigation |
| 17–28 | Secret patterns (audit + pre-commit) |
| 29–46 | Copy layout |
| 47–72 | Claude Code |
| 73–94 | Cursor and Cursor CLI |
| 95–122 | Gemini CLI |
| 123–137 | Google Antigravity |
| 138–180 | Verify (local tests) |
## Secret patterns (audit + pre-commit)
Agents must not commit files containing:
- `sk-` (OpenAI API keys)
- `ghp_` / `gho_` (GitHub tokens)
- `AKIA` (AWS access key id)
- `xoxb-` (Slack bot tokens)
- `-----BEGIN` private keys
Use `audit-code` supply-chain checklist before commit. Consider `git-secrets` or custom pre-commit hook in target projects.
## Copy layout
The main script is `pre-tool-use.sh`.
```text
<hooks-dir>/pre-tool-use.sh
```
Example project locations:
- Claude: `.claude/hooks/`
- Cursor: `.cursor/hooks/`
- Gemini: `.gemini/hooks/`
Use the same layout for user-level hooks (`~/.claude/hooks`, `~/.cursor/hooks`, `~/.gemini/hooks`).
---
## Claude Code
Hook command does **not** need `GIT_GUARDRAILS_MODE` (defaults to `claude`).
**Project** (`.claude/settings.json`):
```json
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/pre-tool-use.sh"
}
]
}
]
}
}
```
---
## Cursor and Cursor CLIFrom danielvm-git/bigpowers, MIT.
More from danielvm-git/bigpowers
- 0.556score
diagnose-root
danielvm-git
Run 4-phase root cause analysis — reproduce, isolate, hypothesize, verify.
SkillBFreshness: B★ 271Claude Code +9 - 0.556score
diagnose-stall
danielvm-git
Diagnose why agent orchestration stopped producing progress — silent stalls in /loop, dispatch-agents, or execute-plan.
SkillBFreshness: B★ 271Claude Code +9 - 0.556score
align-grid
danielvm-git
Build editorial/magazine/report webpages on a GENUINE Müller-Brockmann modular grid (International Typographic Style) — not a decorative one.
SkillBFreshness: B★ 271Claude Code +9 - 0.556score
assess-impact
danielvm-git
Analyze the blast radius of a proposed change before any code is written.
SkillBFreshness: B★ 271Claude Code +9 - 0.556score
audit-code
danielvm-git
Self-review checklist for the coding agent to run before dispatching a reviewer.
SkillBFreshness: B★ 271Claude Code +9 - 0.556score
compose-workflow
danielvm-git
Chain multiple bigpowers skills into a custom workflow recipe saved in specs/.
SkillBFreshness: B★ 271Claude Code +9 - 0.556score
context7-mcp
danielvm-git
Fetch current library docs via Context7 MCP instead of training data.
SkillBFreshness: B★ 271Claude Code +9 - 0.556score
audit-plan
danielvm-git
Evaluate an incoming project plan against bigpowers principles and conventions, surface gaps, and produce a READY/NOT READY verdict before engagement begins.
SkillBFreshness: B★ 271Claude Code +9 - 0.556score
deepen-architecture
danielvm-git
Find deepening opportunities in a codebase, informed by the domain language in specs/tech-architecture/tech-stack.md and the decisions in specs/adr/.
SkillBFreshness: B★ 271Claude Code +9 - 0.556score
define-language
danielvm-git
Extract a DDD-style ubiquitous language glossary from the current conversation, flagging ambiguities and proposing canonical terms.
SkillBFreshness: B★ 271Claude Code +9 - 0.556score
change-request
danielvm-git
Add a new requirement or reorder epics by WSJF against specs/release-plan.yaml and epic capsule directories.
SkillBFreshness: B★ 271Claude Code +9 - 0.556score
dispatch-agents
danielvm-git
Dispatch multiple subagents in parallel on independent tasks.
SkillBFreshness: B★ 271Claude Code +9
Signals
- Stars
- 271
- Forks
- 24
- Open issues
- 11
- Last commit (this folder)
- Jul 27, 2026 (3 months ago)
- Last release
- Sep 21, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/danielvm-git/bigpowers
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.288score
guard-git
danielvm-git
Block dangerous git commands (push, force push, reset --hard, clean, branch -D, checkout/restore .) and enforce Conventional Commits & Branch Protection…
SkillBFreshness: B★ 271Claude Code +9 - 0.288score
guard-git
danielvm-git
Block dangerous git commands (push, force push, reset --hard, clean, branch -D, checkout/restore .) and enforce Conventional Commits & Branch Protection…
SkillBFreshness: B★ 271Claude Code +9 - 0.288score
guard-git
danielvm-git
Block dangerous git commands (push, force push, reset --hard, clean, branch -D, checkout/restore .) and enforce Conventional Commits & Branch Protection…
SkillBFreshness: B★ 271Claude Code +9
More from danielvm-git
- 0.556score
align-grid
danielvm-git
Build editorial/magazine/report webpages on a GENUINE Müller-Brockmann modular grid (International Typographic Style) — not a decorative one.
SkillBFreshness: B★ 271Claude Code +9 - 0.556score
audit-code
danielvm-git
Self-review checklist for the coding agent to run before dispatching a reviewer.
SkillBFreshness: B★ 271Claude Code +9 - 0.556score
audit-plan
danielvm-git
Evaluate an incoming project plan against bigpowers principles and conventions, surface gaps, and produce a READY/NOT READY verdict before engagement begins.
SkillBFreshness: B★ 271Claude Code +9 - 0.556score
assess-impact
danielvm-git
Analyze the blast radius of a proposed change before any code is written.
SkillBFreshness: B★ 271Claude Code +9 - 0.556score
change-request
danielvm-git
Add a new requirement or reorder epics by WSJF against specs/release-plan.yaml and epic capsule directories.
SkillBFreshness: B★ 271Claude Code +9 - 0.556score
compose-workflow
danielvm-git
Chain multiple bigpowers skills into a custom workflow recipe saved in specs/.
SkillBFreshness: B★ 271Claude Code +9
Cite this page
guard-git skill. Agent Mart. https://agentmart.dev/skills/danielvm-git-guard-git (last updated 2026-10-24)