secret-warn

secret-warn is a skill for Claude Code from mycelium-hq/ai-brain-starter. It costs 121 tokens per session (2,290 once invoked), scanned B, original, MIT.

A security skill that checks files as a coding agent edits them for exposed secrets and potentially unsafe code or content. It covers items such as API keys, private keys, risky shell commands, dynamic code, and prompt-injection cues.

In plain words
What is it for?
Use it when adding or changing code, especially where files may contain credentials, user input, shell commands, downloaded content, or code-generation logic.
Why use it?
It can stop some dangerous edits immediately and warn about others while they are being made. This reduces the chance of committing credentials or accepting unsafe instructions from third-party content.

Skill for Claude Code

Written for Claude Code: PreToolUse hook event. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

Part of the ai-brain-starter plugin — 38 skills, 17 commands, 3 agents, 1 hook shipped together

Good fit Use it when adding or changing code, especially where files may contain credentials, user input, shell commands, downloaded content, or code-generation logic.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mycelium-hq/ai-brain-starter/secret-warn
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 mycelium-hq/ai-brain-starter --skill secret-warn
Clone the repo
git clone --depth 1 https://github.com/mycelium-hq/ai-brain-starter

Made for: Claude Code.

Or install ai-brain-starter, the plugin that ships this one along with the rest of its 38 skills, 17 commands, 3 agents, 1 hook.

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 secret-warn

README.md
[![agentmods](https://agentmods.dev/badge/skills/mycelium-hq/ai-brain-starter/secret-warn/github.svg)](https://agentmods.dev/skills/mycelium-hq/ai-brain-starter/secret-warn)
Your own site
<a href="https://agentmods.dev/skills/mycelium-hq/ai-brain-starter/secret-warn"><img src="https://agentmods.dev/badge/skills/mycelium-hq/ai-brain-starter/secret-warn/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 secret-warn

Your own site · 80×15
<a href="https://agentmods.dev/skills/mycelium-hq/ai-brain-starter/secret-warn"><img src="https://agentmods.dev/badge/skills/mycelium-hq/ai-brain-starter/secret-warn.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 121 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,290 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 3 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: 3 findings, 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 Agent Snooping · line 41
    Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.
    Fix: Remove all code or instructions that access agent configuration directories (.claude/, .codex/, .gemini/). If configuration values are needed, pass them explicitly as parameters or environment variabl
  • high Agent Snooping · line 48
    Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.
    Fix: Remove all code or instructions that access agent configuration directories (.claude/, .codex/, .gemini/). If configuration values are needed, pass them explicitly as parameters or environment variabl
  • high Prompt Injection · line 93
    This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.
    Fix: Remove or rewrite any text that instructs the agent to ignore prompts, override safety rules, or trust unverified content. Ensure skill content cannot be injected to alter agent behavior.
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.00121 $0.02290
Opus 5.5 $0.00048 $0.00916
Sonnet 5.5 $0.00024 $0.00458
Haiku 4.5 $0.00012 $0.00229

Measured 27d ago against content hash ae907be9eb61, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

secret-warn scanned grade B with 3 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 27d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (hooks/audited_content_scan.py, hooks/secret_warn.py, install.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Instruction-override phrasingmediumPrompt injection

Text telling the model to disregard its earlier instructions or safety rules is the shape of a prompt injection, whoever wrote it.

**Why it never fires on your own writing.** The `prompt-injection` rules carry `applies_to: ["audited-content"]`, and the edit-time hook only handles `edit` / `commit` / `bash` tools. So a vault note that merely discusse

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

Reads agent configuration directorieslowAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- Merges PreToolUse + PostToolUse + Bash hook entries into `~/.claude/settings.json` (non-destructive, additive)

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

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

| Curl/wget pipe-to-shell from a non-allowlisted host | block | Edit rejected |
skills/secret-warn/SKILL.md · 135 lines

How it starts

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

secret-warn — real-time edit-time security guardrails

Catches secrets and unsafe patterns the moment a Claude Code agent writes them, not after the fact. Public substrate version (MIT). Free to install, free to extend.

What it does

Trigger Severity Action
API key in file (Stripe, AWS, GCP, OpenAI, Anthropic, GitHub, Slack) block (exit 2) Edit rejected
PEM-encoded private key block block Edit rejected
High-entropy assignment to a key-named variable warn (exit 1) Advisory, edit proceeds
Python dynamic-codegen on a user-input-suggesting name warn Advisory
Subprocess with shell-mode + variable expansion warn Advisory
Curl/wget pipe-to-shell from a non-allowlisted host block Edit rejected
Prompt-injection cue in audited third-party content (ignore-previous, role-override, exfil, system-impersonation, paste-and-run) warn (flag-before-read) Specimen flag via audited_content_scan.py — never an edit-time block

All patterns are stored base64-encoded in hooks/pattern_registry.json so the registry file itself doesn't trip pattern-matching tools that scan the repo. This is intentional — see Design note: self-trigger safety below.

Install

bash skills/secret-warn/install.sh

The installer:

  • Copies hooks/secret_warn.py + hooks/audited_content_scan.py to ~/.claude/secret-warn/
  • Copies hooks/pattern_registry.json to the same location
  • Merges PreToolUse + PostToolUse + Bash hook entries into ~/.claude/settings.json (non-destructive, additive)
  • Logs every catch to ~/.claude/secret-warn/audit.log

Idempotent. Safe to re-run.

Uninstall

Edit ~/.claude/settings.json and remove any hook entry whose description starts with secret-warn:. Delete ~/.claude/secret-warn/ if you want the audit log gone too.

Bypass

For an emergency one-off where you genuinely need to bypass a catch (test fixture in a controlled environment, allowlisted-but-not-yet-configured host):

Read the full file on GitHub · 135 lines

Files

What ships with it

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

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. 27d ago Changed · +2 lines ae907be9eb61
  2. 1mo ago First seen · 133 lines · 121 tokens per session scan B ba650fd26a0c

Subscribe to this mod's changes

secret-warn is a skill published in the GitHub repository mycelium-hq/ai-brain-starter (48 stars, last pushed today), licensed MIT. It adds 121 tokens to every session and 2,290 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it B with 3 findings (instruction-override phrasing, reads agent configuration directories, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

nightly

Canonical seven-leg nightly close-parity protocol. Eleven independently evidenced checkpoints cover synthesis, reconciliation, context hygiene, sweeps, heat, digest, runtime health, cognitive state, ledger capture/review, and vault sync.

wrg32786/aigent-os · 46 tokens

Promote

Take a slice of the current conversation and promote it to a durable vault artifact — concept note, project update, person profile, or doctrine entry. Pairs with /close. /close writes the daily note (transient outcome record); /promote elevates specific insights to permanent vault content the framework can refer back…

wrg32786/aigent-os · 68 tokens

Stuck

Walk the 6-rung escalation ladder before declaring stuck or asking the principal. Most "stuck" is actually "haven't tried the next approach." Stopping is the last resort, not the first response.

wrg32786/aigent-os · 46 tokens

codex-adapter

Route ONE bounded, mechanical task to the Codex CLI as a non-Claude executor, under the same review-before-merge gate as any other agent-produced diff. Use when the user explicitly asks to hand a task to Codex, or names OpenAI Codex / a non-Claude executor for a mechanical change (rename a symbol across files, add a…

wrg32786/aigent-os · 101 tokens

open

Boot the session, load context from the vault, and surface what matters.

wrg32786/aigent-os · 16 tokens

caddy-mute

Mute a Caddy hint class for a window. Defaults to 4h auto-expiry. Classes — memory, context, body, routing, all.

wrg32786/aigent-os · 36 tokens