Git Guardrails Claude Code
vinvcn/mattpocock-skills-zh-CN
设置 Claude Code hooks,在危险 git commands(push、reset --hard、clean、branch -D 等)执行前阻止它们。适用于用户想防止破坏性 git 操作、添加 git safety hooks,或在 Claude Code 中阻止 git push/reset 时。
Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute.
$ npx skills add fossasia/eventyay-interpretation --skill git-guardrails-claude-code -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install fossasia/eventyay-interpretation git-guardrails-claude-code --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/fossasia/eventyay-interpretation.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/git-guardrails-claude-code .claude/skills/git-guardrails-claude-code && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "git-guardrails-claude-code" agent skill from https://github.com/fossasia/eventyay-interpretation/tree/dev/.agents/skills/git-guardrails-claude-code into .claude/skills/git-guardrails-claude-code/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "git-guardrails-claude-code", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/fossasia/eventyay-interpretation/tree/dev/.agents/skills/git-guardrails-claude-codeType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add fossasia/eventyay-interpretation --skill git-guardrails-claude-code -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install fossasia/eventyay-interpretation git-guardrails-claude-code --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/fossasia/eventyay-interpretation.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/git-guardrails-claude-code .agents/skills/git-guardrails-claude-code && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "git-guardrails-claude-code" agent skill from https://github.com/fossasia/eventyay-interpretation/tree/dev/.agents/skills/git-guardrails-claude-code into .agents/skills/git-guardrails-claude-code/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "git-guardrails-claude-code", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add fossasia/eventyay-interpretation --skill git-guardrails-claude-code -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install fossasia/eventyay-interpretation git-guardrails-claude-code --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/fossasia/eventyay-interpretation.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/git-guardrails-claude-code .cursor/skills/git-guardrails-claude-code && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "git-guardrails-claude-code" agent skill from https://github.com/fossasia/eventyay-interpretation/tree/dev/.agents/skills/git-guardrails-claude-code into .cursor/skills/git-guardrails-claude-code/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "git-guardrails-claude-code", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/fossasia/eventyay-interpretation.git --path .agents/skills/git-guardrails-claude-code--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add fossasia/eventyay-interpretation --skill git-guardrails-claude-code -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install fossasia/eventyay-interpretation git-guardrails-claude-code --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/fossasia/eventyay-interpretation.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/git-guardrails-claude-code .gemini/skills/git-guardrails-claude-code && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "git-guardrails-claude-code" agent skill from https://github.com/fossasia/eventyay-interpretation/tree/dev/.agents/skills/git-guardrails-claude-code into .gemini/skills/git-guardrails-claude-code/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "git-guardrails-claude-code", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install fossasia/eventyay-interpretation git-guardrails-claude-codeInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add fossasia/eventyay-interpretation --skill git-guardrails-claude-code -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/fossasia/eventyay-interpretation.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/git-guardrails-claude-code .github/skills/git-guardrails-claude-code && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "git-guardrails-claude-code" agent skill from https://github.com/fossasia/eventyay-interpretation/tree/dev/.agents/skills/git-guardrails-claude-code into .github/skills/git-guardrails-claude-code/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "git-guardrails-claude-code", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add fossasia/eventyay-interpretation --skill git-guardrails-claude-code -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install fossasia/eventyay-interpretation git-guardrails-claude-code --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/fossasia/eventyay-interpretation.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/git-guardrails-claude-code .opencode/skills/git-guardrails-claude-code && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "git-guardrails-claude-code" agent skill from https://github.com/fossasia/eventyay-interpretation/tree/dev/.agents/skills/git-guardrails-claude-code into .opencode/skills/git-guardrails-claude-code/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "git-guardrails-claude-code", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
git-guardrails-claude-codeSet up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute.
Git Guardrails Claude Code is an agent skill from fossasia/eventyay-interpretation. Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push/reset in Claude Code.
Its SKILL.md is about 580 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including scripts (for example `scripts/block-dangerous-git.sh`).
It sits in AI & LLM Engineering, covering Git workflow, Hooks and plugins and LLM guardrails. It works with Git. The repository describes itself as: A plugin for live interpretation of video streams. The licence is Apache-2.0.
5 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 1ca0139. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 1 file in scripts/ (Shell), which the agent can run.
Shell commands in SKILL.md call:
gitFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Git Guardrails Claude Code loads about 578 tokens when it runs. Until then it costs about 68 tokens; SKILL.md has 182 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from fossasia/eventyay-interpretation at commit 1ca0139, republished under its Apache-2.0 licence (© fossasia). 182 words, ~578 tokens.
.claude/skills/git-guardrails-claude-code/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.Sets up a PreToolUse hook that intercepts and blocks dangerous git commands before Claude executes them.
git push (all variants including --force)git reset --hardgit clean -f / git clean -fdgit branch -Dgit checkout . / git restore .When blocked, Claude sees a message telling it that it does not have authority to access these commands.
Ask the user: install for this project only (.claude/settings.json) or all projects (~/.claude/settings.json)?
The bundled script is at: scripts/block-dangerous-git.sh
Copy it to the target location based on scope:
.claude/hooks/block-dangerous-git.sh~/.claude/hooks/block-dangerous-git.shMake it executable with chmod +x.
Add to the appropriate settings file:
Project (.claude/settings.json):
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/block-dangerous-git.sh"
}
]
}
]
}
}Global (~/.claude/settings.json):
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "~/.claude/hooks/block-dangerous-git.sh"
}
]
}
]
}
}If the settings file already exists, merge the hook into existing hooks.PreToolUse array — don't overwrite other settings.
Ask if user wants to add or remove any patterns from the blocked list. Edit the copied script accordingly.
Run a quick test:
echo '{"tool_input":{"command":"git push origin main"}}' | <path-to-script>Should exit with code 2 and print a BLOCKED message to stderr.
© fossasia, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file (scripts) in .agents/skills/git-guardrails-claude-code of fossasia/eventyay-interpretation.
Open the folder on GitHubat commit 1ca0139
We found 23 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 13 other GitHub owners. This page covers the copy in fossasia/eventyay-interpretation, which our catalogue first saw on October 7, 2026.
Git Guardrails Claude Code next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Git Guardrails Claude Code this skillfossasia/eventyay-interpretation | 1.6k | 13 repos | ~578 | Automated safety check: Pass | Apache-2.0 | |
| Git Guardrails Claude Codevinvcn/mattpocock-skills-zh-CN | 4.7k | — | ~474 | Automated safety check: Pass | MIT | |
| Git Guardrails Claude Codedevcxl/mattpocock-skills-zh | 437 | 1 repos | ~420 | Automated safety check: Pass | MIT | |
| GuardHouseofmvps/ultraship | 123 | — | ~790 | Automated safety check: Notes | MIT | |
| Careful Mode Command Guardrailsgarrytan/gstack | 136k | — | ~931 | Automated safety check: Notes | MIT | |
| Git WorkflowsTencentCloudBase/CloudBase-AI-Toolkit | 1.1k | — | ~3k | Automated safety check: Pass | MIT |
vinvcn/mattpocock-skills-zh-CN
设置 Claude Code hooks,在危险 git commands(push、reset --hard、clean、branch -D 等)执行前阻止它们。适用于用户想防止破坏性 git 操作、添加 git safety hooks,或在 Claude Code 中阻止 git push/reset 时。
devcxl/mattpocock-skills-zh
设置 Claude Code 钩子,在危险 Git 命令(push、reset --hard、clean、branch -D 等)执行前将其拦截。当用户想要防止破坏性 Git 操作、添加 Git 安全钩子或在 Claude Code 中阻止 git push/reset 时使用。
Houseofmvps/ultraship
Safety guardrails — blocks destructive commands (rm -rf, DROP TABLE, force-push, git reset --hard) and optionally restricts file edits to a specific directory.
garrytan/gstack
Checks each shell command for destructive patterns such as recursive deletes, force pushes and dropped tables, and asks before letting them run.
TencentCloudBase/CloudBase-AI-Toolkit
Reusable git delivery workflows derived from local slash commands (commit, push, PR, release notes, GitHub Actions failure triage with worktree-based fixes, and isolating your own changes from a…
oliver-kriska/claude-elixir-phoenix
Recall prior work from past sessions — how a bug was fixed, what was decided, where a pattern lives.
fossasia/eventyay-interpretation
Diagnosis loop for hard bugs and performance regressions. An agent skill from fossasia/eventyay-interpretation.
fossasia/eventyay-interpretation
Build and sharpen a project's domain model. An agent skill from fossasia/eventyay-interpretation.
fossasia/eventyay-interpretation
Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo.
fossasia/eventyay-interpretation
Survey any codebase as a senior advisor and produce prioritized, self-contained implementation plans for OTHER models/agents to execute.
fossasia/eventyay-interpretation
Migrate test files from as type assertions to @total-typescript/shoehorn.
fossasia/eventyay-interpretation
Create exercise directory structures with sections, problems, solutions, and explainers that pass linting.
Works with
Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Git Guardrails Claude Code is an agent skill from fossasia/eventyay-interpretation.) before they execute.
Git Guardrails Claude Code fits situations like: user wants to prevent destructive git operations; add git safety hooks; block git push/reset in Claude Code.
Run `npx skills add fossasia/eventyay-interpretation --skill git-guardrails-claude-code -a claude-code`. Or copy the skill folder (.agents/skills/git-guardrails-claude-code in fossasia/eventyay-interpretation) into .claude/skills/git-guardrails-claude-code in your project. Claude Code loads it when a task matches its description.
Run `npx skills add fossasia/eventyay-interpretation --skill git-guardrails-claude-code -a codex`. Or copy the skill folder (.agents/skills/git-guardrails-claude-code in fossasia/eventyay-interpretation) into .agents/skills/git-guardrails-claude-code in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add fossasia/eventyay-interpretation --skill git-guardrails-claude-code -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/git-guardrails-claude-code, .gemini/skills/git-guardrails-claude-code, .github/skills/git-guardrails-claude-code and .opencode/skills/git-guardrails-claude-code in your project.
Going by SKILL.md and its folder, Git Guardrails Claude Code needs a shell for the scripts in its folder and the command-line tools its instructions call (git). Our summary lists: A Bash shell.
SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Git Guardrails Claude Code is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 578 tokens (SKILL.md is roughly 2.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Git Guardrails Claude Code: Git Guardrails Claude Code (vinvcn/mattpocock-skills-zh-CN, 4.7k stars), Git Guardrails Claude Code (devcxl/mattpocock-skills-zh, 437 stars), Guard (Houseofmvps/ultraship, 123 stars) and Careful Mode Command Guardrails (garrytan/gstack, 136k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
fossasia (a GitHub organization) maintains it in fossasia/eventyay-interpretation, which has 1,552 GitHub stars. The repository holds 38 skills in this directory. The repository was last updated on October 5, 2026.
Source: fossasia/eventyay-interpretation on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.