git-security-guard

git-security-guard is a skill for Claude Code, Codex from myths-labs/muse. It costs 82 tokens per session (1,388 once invoked), scanned A, original, MIT.

A Git safety checklist that checks files and staged changes for API keys, tokens, private keys, environment files, and other sensitive data. Git is a tool for tracking and sharing code changes.

In plain words
What is it for?
Use it before commits, pushes, new repository setup, pull-request reviews, or requested security checks.
Why use it?
It helps prevent secrets and private project files from being committed or pushed to a code repository.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it before commits, pushes, new repository setup, pull-request reviews, or requested…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/myths-labs/muse/git-security-guard
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add myths-labs/muse --skill git-security-guard
Clone the repo
git clone --depth 1 https://github.com/myths-labs/muse

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for git-security-guard

README.md
[![agentmods](https://agentmods.dev/badge/skills/myths-labs/muse/git-security-guard.svg)](https://agentmods.dev/skills/myths-labs/muse/git-security-guard)
Your own site
<a href="https://agentmods.dev/skills/myths-labs/muse/git-security-guard"><img src="https://agentmods.dev/badge/skills/myths-labs/muse/git-security-guard.svg" alt="Measured on agentmods" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,388 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00082 $0.01388
Opus 5 $0.00041 $0.00694
Sonnet 5 $0.00016 $0.00278
Haiku 4.5 $0.00008 $0.00139

Measured 7d ago against content hash 2e4e0398a1ea, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

git-security-guard scanned grade A with 0 findings 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 7d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/toolkit/git-security-guard/SKILL.md · 129 lines

How it starts

The opening of the file, as written. The whole thing — 129 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Git Security Guard — 敏感信息泄露防护

触发时机

  • 每次 git commit 前(自动)
  • 每次 git push 前(自动)
  • 新项目/新 repo 初始化时
  • 用户要求安全检查时

Pre-Commit 检查清单

Step 1: 检查暂存文件名

git diff --cached --name-only | grep -iE '\.env|\.pem|\.p12|\.jks|\.key$|\.muse/|\.agent/|\.gemini/|memory/|convo/'

任何匹配 → 立即阻止 commit,报告给用户。

Step 2: 检查暂存内容中的 Key 模式

git diff --cached | grep -iE 'sk-[a-zA-Z0-9]{20}|AIzaSy[a-zA-Z0-9_-]{33}|gsk_[a-zA-Z0-9]{20}|sk_live_|sk_test_[a-zA-Z0-9]{20}|pk_live_|pk_test_[a-zA-Z0-9]{20}|eyJhbGci[a-zA-Z0-9_-]{50}|-----BEGIN.*(PRIVATE|RSA)|AKIA[0-9A-Z]{16}|ghp_[a-zA-Z0-9]{36}|whsec_|xoxb-|xoxp-|service_role'

任何匹配 → 立即阻止 commit,报告给用户。

Step 3: 排除误报

以下不算泄露:

  • .env.example 中的占位符(your-api-keysk_test_your-...
  • process.env.XXX 引用(代码读环境变量,不是硬编码)
  • node_modules/ 中的加密库代码
  • 公开合约地址(USDC/USDT 等已知合约)
  • 文档中的"不要这样做"示例

禁止提交的文件模式

文件模式 原因
.env.local / .env.prod* / .env.vercel* 含真实 API Key
.muse/ 目录 含内部战略/开发状态
.agent/ 目录 含内部 Skill/Prompt
.gemini/ 目录 含 AI 对话记录
memory/ / convo/ 对话/记忆文件
*.pem / *.p12 / *.jks / *.key 私钥/证书

禁止出现在代码中的 Key 模式

模式 服务
sk-[a-zA-Z0-9]{20,} OpenAI
AIzaSy[a-zA-Z0-9_-]{33} Google/Gemini
gsk_[a-zA-Z0-9]{20,} Groq
sk_live_ / sk_test_[实际值] Stripe Secret
pk_live_ / pk_test_[实际值] Stripe Publishable
eyJhbGci[长JWT] JWT Token (Supabase/Vercel)
AKIA[0-9A-Z]{16} AWS
ghp_[a-zA-Z0-9]{36} GitHub PAT
-----BEGIN (RSA )?PRIVATE KEY 私钥
0x[a-fA-F0-9]{64} 钱包私钥(注意:40位是地址,64位才是私钥)
whsec_ Stripe Webhook Secret
xoxb- / xoxp- Slack Token

新项目 .gitignore 模板

新 repo 第一个 commit 前必须包含:

# Env files (NEVER commit real keys)
.env
.env.local
.env.*.local
.env.prod*
.env.vercel*

# Internal files
.muse/
.agent/
.gemini/
memory/
convo/

# Private keys
*.pem
*.p12
*.jks
*.key

# IDE
.idea/
.vscode/

# OS
.DS_Store

Read the full file on GitHub · 129 lines

Changes

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.

  1. 7d ago First seen · 129 lines · 82 tokens per session scan A 2e4e0398a1ea

Subscribe to this mod's changes

git-security-guard is a skill published in the GitHub repository myths-labs/muse (32 stars, last pushed 1mo ago), licensed MIT. It adds 82 tokens to every session and 1,388 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

gentle-ai-collab-perfect

Trigger: contributing to Gentleman-Programming/gentle-ai as an external collaborator. Strict issue-first workflow, honest PR bodies, contributor-vs-maintainer scope, chained-PR strategy, verification protocol, docstring coverage. Load whenever the active repo is Gentleman-Programming/gentle-ai and any part of the…

Gentleman-Programming/gentle-ai · 106 tokens

branch-pr

Create Gentle AI pull requests with issue-first checks. Trigger: creating, opening, or preparing PRs for review.

Gentleman-Programming/gentle-ai · 26 tokens

work-unit-commits

Plan commits as reviewable work units. Trigger: implementation, commit splitting, chained PRs, or keeping tests and docs with code.

Gentleman-Programming/gentle-ai · 33 tokens

chained-pr

Trigger: PRs over 400 lines, stacked PRs, review slices. Split oversized changes into chained PRs that protect review focus.

Gentleman-Programming/gentle-ai · 32 tokens

github-release-briefing-skill

Create a source-linked briefing for the latest published GitHub release of a public repository. Use for engineering teams tracking a dependency release; do not use it to publish releases or change repositories.

FrancyJGLisboa/agent-skill-creator · 45 tokens

ijfw-ship

Use when the user says 'ship it', 'ship this', 'release', 'publish', 'launch', 'deploy', 'go live', 'wrap this up', 'time to ship', or invokes '/ijfw-ship'. Domain-aware release — software (test → tag → push → publish), book (final edit → format → KDP / agent / Substack), campaign (review → schedule → launch →…

FerroxLabs/ijfw · 139 tokens