Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add VoidTechnology/voidtech-claude-plugins/plugin install voidtech-engineeringWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/voidtechnology/voidtech-claude-plugins/git-safety)<a href="https://agentmods.dev/skills/voidtechnology/voidtech-claude-plugins/git-safety"><img src="https://agentmods.dev/badge/skills/voidtechnology/voidtech-claude-plugins/git-safety/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/voidtechnology/voidtech-claude-plugins/git-safety"><img src="https://agentmods.dev/badge/skills/voidtechnology/voidtech-claude-plugins/git-safety.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00061 | $0.00908 |
| Opus 5.5 | $0.00024 | $0.00363 |
| Sonnet 5.5 | $0.00012 | $0.00182 |
| Haiku 4.5 | $0.00006 | $0.00091 |
Grade B, and why
git-safety scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
| Claude Code | `.claude/settings.json` + `.claude/hooks/` | `~/.claude/settings.json` + `~/.claude/hooks/` | How it starts
The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Vendored from mattpocock/skills · MIT © 2026 Matt Pocock · upstream 6eeb81b · 已汉化并完成 VoidTech 插件内自包含适配。LICENSE 见 ../_vendor-licenses/mattpocock-LICENSE
配置 Git 安全钩子
为当前宿主配置执行前钩子,拦截并阻止危险 Git 命令。只安装用户选择的作用范围,不默认写入全局配置。
会被拦截的命令
git push(所有变体,包括--force)git reset --hardgit clean -f/git clean -fdgit branch -Dgit checkout ./git restore .
命令被拦截时,agent 会收到一条消息,说明该操作不在授权范围内。
步骤
1. 询问作用范围
询问用户仅为当前项目安装,还是为所有项目安装。目标位置取决于宿主:
| 宿主 | 项目级 | 全局级 |
|---|---|---|
| Claude Code | .claude/settings.json + .claude/hooks/ |
~/.claude/settings.json + ~/.claude/hooks/ |
| OMP | .omp/hooks/pre/block-dangerous-git.mjs |
~/.omp/agent/hooks/pre/block-dangerous-git.mjs |
2. 安装当前宿主的钩子
Claude Code
随附脚本位于 scripts/block-dangerous-git.sh。使用 ${CLAUDE_PLUGIN_ROOT}/skills/git-safety/scripts/block-dangerous-git.sh 作为源路径,复制到所选范围的 hooks/,并执行 chmod +x。
把 command hook 合并进所选 settings.json 的 hooks.PreToolUse 数组,不得覆盖已有设置:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/block-dangerous-git.sh"
}
]
}
]
}
}
全局级只把 command 改为 "\"$HOME\"/.claude/hooks/block-dangerous-git.sh"。
OMP
通过 skill://git-safety/scripts/block-dangerous-git-omp.mjs 读取随附的 OMP Extension Hook,并把内容原样写入用户选择的目标文件。不要从 OMP 插件缓存猜路径,不要修改插件安装目录。OMP 按约定自动发现 hooks/pre/*.mjs,无需额外 settings 项;新钩子从下次会话开始生效。
3. 询问是否定制
询问用户是否要添加或移除拦截模式;只编辑复制后的文件,不修改插件随附模板。
4. 验证
Claude Code 先确认 jq 可用,再用危险命令 fixture 验证退出码 2:
echo '{"tool_input":{"command":"git push origin main"}}' | <path-to-script>
OMP 直接导入复制后的模块并验证危险命令被识别、只读命令被允许:
node --input-type=module -e "import { isDangerousGitCommand as blocked } from '<path-to-hook>'; if (!blocked('git push origin main') || blocked('git status')) process.exit(1)"
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 84 lines · 61 tokens per session scan B f7a185469091
git-safety is a skill published in the GitHub repository VoidTechnology/voidtech-claude-plugins (2 stars, last pushed 5d ago), licensed Apache-2.0. It adds 61 tokens to every session and 908 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
prowler-commit
Creates professional git commits following conventional-commits format. Trigger: When creating commits, after completing code changes, when user asks to commit.
gh-auth-isolation
Safely manage multiple GitHub identities (EMU + personal) in agent workflows.
comet-github
A routing guide for Comet-related GitHub work. It directs requests about pull requests, issues, CI failures, ideas, and fixes to the appropriate review or implementation process.
release-helper
Ensures configuration and code changes are released correctly. Use PROACTIVELY whenever you edit config.json, change any setting, or fix a configuration bug in this project, so the change reaches production.
github-skill
Work with GitHub via the gh CLI — clone repositories, create/list/merge pull requests, create/list issues, and run any other gh command (API calls, workflow runs, releases, repo administration). List operations return parsed JSON.
re0-merge
Review and land an external contribution the way this suite does: gate it against the thesis, land it with the author's credit intact, complete a new skill rather than merging it raw, then approve, credit, and explain before closing. Use when reviewing a pull request, as any collaborator or maintainer, not only the…