memstack-security-secrets-scanner

memstack-security-secrets-scanner is a skill for Claude Code from cwinvestments/memstack. It costs 62 tokens per session (6,657 once invoked), scanned B, original, MIT.

A codebase scanner that looks for hardcoded secrets, exposed API keys, and other credentials in source files and Git history. Secrets are private values used to authenticate software with services.

In plain words
What is it for?
Use it to scan source code and Git history for leaked keys and credentials, including during a pre-deployment security review or a targeted .env audit.
Why use it?
It helps locate credentials that may have been accidentally committed or exposed before deployment. It is focused on secret leaks, not dependency vulnerabilities or database access policies.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md; positional $N argument.

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

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.

agentmods
npx agentmods add skills/cwinvestments/memstack/secrets-scanner
Any agent
npx skills add cwinvestments/memstack --skill secrets-scanner
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-secrets-scanner

README.md
[![agentmods](https://agentmods.dev/badge/skills/cwinvestments/memstack/secrets-scanner.svg)](https://agentmods.dev/skills/cwinvestments/memstack/secrets-scanner)
Your own site
<a href="https://agentmods.dev/skills/cwinvestments/memstack/secrets-scanner"><img src="https://agentmods.dev/badge/skills/cwinvestments/memstack/secrets-scanner.svg" alt="Measured on agentmods" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,657 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
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.00062 $0.06657
Opus 5 $0.00031 $0.03328
Sonnet 5 $0.00012 $0.01331
Haiku 4.5 $0.00006 $0.00666

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

Security

Grade B, and why

memstack-security-secrets-scanner 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 2d 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.

Harvests environment variablesmediumData exfiltration

Enumerating or grepping the environment for keys collects credentials unrelated to what the mod says it does.

# Extract all env var names from the codebase

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

skills/security/secrets-scanner/SKILL.md · 550 lines

How it starts

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

🔑 Secrets Scanner: Scanning for Exposed Credentials...

Scan a codebase for hardcoded secrets, leaked API keys, and credential exposure across files and git history.

Activation

When this skill activates, output:

🔑 Secrets Scanner: Scanning for Exposed Credentials...

Then execute the protocol below.

Context Guard

Context Status
User asks to scan for secrets/keys ACTIVE: full scan
User mentions credential exposure ACTIVE: full scan
User asks about .env security ACTIVE: targeted .env audit
Pre-deployment security review ACTIVE: full scan
User is creating .env files DORMANT: let them work

⚠️ Enforcement lives in CLAUDE.md, not here

This skill cannot be the control that prevents secret leaks. Skill matching is semantic and probabilistic: it misses. In a real session that leaked a live SendGrid production key, the query "rotate object storage credentials S3 bucket key move secrets rotation" scored this skill at 0.24 and it never loaded. The task was credential handling end to end.

Therefore the hard rule ("never print a secret value") belongs in always-loaded context, a project CLAUDE.md block, which loads unconditionally regardless of matching, MCP reachability, or hooks. This skill carries the operational how-to below; CLAUDE.md carries the prohibition. If you are reading this skill and the project has no secrets block in CLAUDE.md, adding one is the highest-value fix available, ahead of any scan.

Safe Inspection Patterns (use these any time you touch a secrets file)

Rule: allowlist names, never denylist values

Redaction by denylist is the single most common way secrets leak during "safe" inspection. A pattern that redacts KEY=, SECRET=, PASSWORD= looks thorough and silently fails on SENDGRID_API_KEY_PROD=, STRIPE_SECRET_KEY_TEST=, DB_PASSWORD_2=: any suffixed variant. Never enumerate what to hide. Emit only what is provably safe: names.

Read the full file on GitHub · 550 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. 2d ago Changed b293aa177475
  2. 3d ago First seen · 550 lines · 62 tokens per session scan B f2c5a5fee5d5

Subscribe to this mod's changes

memstack-security-secrets-scanner is a skill published in the GitHub repository cwinvestments/memstack (419 stars, last pushed today), licensed MIT. It adds 62 tokens to every session and 6,657 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (harvests environment variables). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

atomic-git-discipline

Compressed commit message and PR body generator. Cuts noise from both while preserving intent and reasoning. Conventional Commits format. Subject ≤50 chars, body only when "why" isn't obvious; PR bodies state only what the diff can't show, 120 words max. Use when user says "write a commit", "commit message", "generate…

damusix/atomic-claude · 106 tokens

git-commit-generator

Generate Conventional Commits from staged git diff. Analyzes changes and produces commit messages following the Conventional Commits spec (feat, fix, refactor, etc.). Triggers on "generate commit", "write commit message", "conventional commit".

luqiang-code/claude-code-skills · 55 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

moai-ref-git-workflow

Git workflow patterns, branch strategies, conventional commits, and PR templates reference for git operations. Agent-extending skill that amplifies manager-git expertise with production-grade git workflow patterns. NOT for: code implementation, testing, architecture design, documentation content.

modu-ai/moai-adk · 58 tokens

security-pipeline

Use when security verification is needed - pre-commit security checks, vulnerability scanning, STRIDE threat analysis. Integrates with /handoff-verify --security and /commit-push-pr. CWE Top 25 based.

sangrokjung/claude-forge · 48 tokens

polyphony

Multi-agent orchestration with container-isolated workspaces — each agent session runs in its own Docker container with independent git branches.

alinaqi/maggy · 27 tokens