memstack-security-git-guard

memstack-security-git-guard is a skill for Claude Code from cwinvestments/memstack. It costs 92 tokens per session (3,146 once invoked), scanned A, original, MIT.

A repository protection installer and verifier checks whether Git hooks, ignore rules, and Gitleaks are set up to block secrets and internal files before commits.

In plain words
What is it for?
Use it to install or verify Git-Guard, check the global pre-commit hook, inspect .gitignore coverage, validate Gitleaks rules, and confirm the scanner is reachable.
Why use it?
It confirms that the protection is actually connected and configured, rather than merely appearing to exist.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Claude Code.

Part of the memstack plugin — 87 skills, 2 commands, 6 hooks shipped together

Good fit Use it to install or verify Git-Guard, check the global pre-commit hook, inspect .gitignore coverage, validate Gitleaks rules, and confirm the scanner is reachable.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cwinvestments/memstack/git-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 cwinvestments/memstack --skill git-guard
Clone the repo
git clone --depth 1 https://github.com/cwinvestments/memstack

Made for: Claude Code.

Or install memstack, the plugin that ships this one along with the rest of its 87 skills, 2 commands, 6 hooks.

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 memstack-security-git-guard

README.md
[![agentmods](https://agentmods.dev/badge/skills/cwinvestments/memstack/git-guard/github.svg)](https://agentmods.dev/skills/cwinvestments/memstack/git-guard)
Your own site
<a href="https://agentmods.dev/skills/cwinvestments/memstack/git-guard"><img src="https://agentmods.dev/badge/skills/cwinvestments/memstack/git-guard/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.

agentmods 80×15 button for memstack-security-git-guard

Your own site · 80×15
<a href="https://agentmods.dev/skills/cwinvestments/memstack/git-guard"><img src="https://agentmods.dev/badge/skills/cwinvestments/memstack/git-guard.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,146 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 121
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
How audits are shown
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.00092 $0.03146
Opus 5.5 $0.00037 $0.01258
Sonnet 5.5 $0.00018 $0.00629
Haiku 4.5 $0.00009 $0.00315

Measured 1mo ago against content hash 78de28103b6f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

memstack-security-git-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 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.

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/security/git-guard/SKILL.md · 307 lines

How it starts

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

🛡️ Git-Guard: Verifying Repo Protection...

Install and verify the machine-wide secret-blocking setup on a repo. Confirms the global pre-commit hook, .gitignore coverage, a non-neutered gitleaks config, and a reachable gitleaks binary.

Activation

When this skill activates, output:

🛡️ Git-Guard: Verifying Repo Protection...

Then execute the protocol below.

What This Skill Is (and Is Not)

Git-Guard is an installer and verifier, not a scanner. It does not grep for secret patterns itself. Its job is to confirm that the protection layers are present, wired up, and actually armed, so that when a secret IS introduced, gitleaks (run by the pre-commit hook) catches it.

The single most dangerous failure this skill exists to catch is a gitleaks config that LOOKS protective but detects nothing (see Check 3). A scanner that silently scans zero rules is worse than no scanner, because it produces a green checkmark while leaving the door open.

Context Guard

Context Status
User asks "is this repo protected?" ACTIVE: run all 4 checks
User says "set up / install git-guard" ACTIVE: run checks, offer fixes
User says "verify gitleaks" / "check git hooks" ACTIVE: run all 4 checks
New repo, before first commit ACTIVE: install gitignore + verify config
User wants a deep secret/history audit DORMANT: defer to secrets-scanner
User is mid-commit and just wants it to pass DORMANT: do not loosen protection to unblock

Protocol

Run all four checks (Steps 1 to 4), then produce the status report in Step 5. Step 5 is the report itself, not a fifth check. Never silently run a setup or fix command: show the exact command and let the user run it (or confirm first). The one exception is the additive .gitignore append in Check 2, which is safe and reversible and may be applied after showing the diff.

Locating the files shipped with this plugin

Two checks reference files that ship INSIDE this plugin: the pre-commit hook and gitignore-template.txt, both under the plugin's scripts/ directory. After install, those files live in the Claude Code plugin cache, NOT in any fixed location, and NOT in the customer's own project. Resolve <plugin-root> as the plugin folder this SKILL.md was loaded from, walking up out of skills/security/git-guard/ to the folder that contains scripts/.

Read the full file on GitHub · 307 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. 1mo ago First seen · 307 lines · 92 tokens per session scan A 78de28103b6f

Subscribe to this mod's changes

memstack-security-git-guard is a skill published in the GitHub repository cwinvestments/memstack (425 stars, last pushed 3d ago), licensed MIT. It adds 92 tokens to every session and 3,146 once invoked, about $0.0004 per session on Opus 5.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-09-03.