secrets-guard

secrets-guard is a skill for Claude Code from larsboes/Axon. It costs 151 tokens per session (1,013 once invoked), scanned A, original, MIT.

A workflow for using API keys, tokens, and environment files safely during a Claude Code session without placing their values in the AI conversation.

In plain words
What is it for?
It guides authenticated commands, environment-variable use, secret-file handling, and compliance with managed policies that block unsafe credential access.
Why use it?
It reduces the chance that credentials appear in chat history, logs, session files, or provider requests.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Claude Code.

Part of the security plugin — 1 skill shipped together

Good fit It guides authenticated commands, environment-variable use, secret-file handling, and compliance with managed policies that block unsafe credential access.

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

Made for: Claude Code.

Or install security, the plugin that ships this one along with the rest of its 1 skill.

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 secrets-guard

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/larsboes/axon/secrets-guard"><img src="https://agentmods.dev/badge/skills/larsboes/axon/secrets-guard.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 151 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,013 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00151 $0.01013
Opus 5.5 $0.00060 $0.00405
Sonnet 5.5 $0.00030 $0.00203
Haiku 4.5 $0.00015 $0.00101

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

Security

Grade A, and why

secrets-guard scanned grade A 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.

Makes network callslowCapability

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

source .env && curl -sS -H "Authorization: Bearer $SOME_API_KEY" https://api.example.com/...
Packs/security/skills/secrets-guard/SKILL.md · 83 lines

How it starts

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

secrets-guard (Claude Code)

Credentials must do their job without their values ever entering the conversation. Once a secret is in context it can leak into session files, logs, or provider requests. This skill is the workflow; enforcement is separate and already active:

  • Managed policy — tools/templates/claude-code/managed-settings.json (deployed to /etc/claude-code/managed-settings.json) denies reads of **/*.env, **/*.pem, ~/.ssh, ~/.aws, git-credentials, printenv, *_TOKEN*, etc., and denies ~20 secret env vars to the sandbox. You cannot relax it from a repo. If a command here is blocked, that is the floor working.
  • pi — the same protection is enforced as a tool-call extension (Packs/security/extensions/ secrets-guard.ts); this skill is the Claude Code counterpart for the parts a policy can't teach.

The one rule

Never cat / read / grep / echo a secret. Feed it to the command that needs it via the environment, so only the child process sees the value.

Patterns

Use a credential in a command — source the env file, then run; sourcing loads variables without printing them:

source .env && curl -sS -H "Authorization: Bearer $SOME_API_KEY" https://api.example.com/...

The value is in the subshell's env, never in your output. Do not echo "$SOME_API_KEY" to "check" it — that defeats the point and is blocked.

Discover what a config needs without reading values — read the committed template, not the real file (templates are safe; real .env is denied):

cat .env.example        # or config.example.toml, etc. — placeholders only

A secret from Bitwarden/Vaultwarden — unlock, then let the command consume it; never bw get into the transcript:

bw unlock            # sets a session; the token is not a secret value
# then source a script that itself calls `bw get` and exports into env — you never see the value

Creating or rotating a secret — stop and hand off

Read the full file on GitHub · 83 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 Changed · -4 tokens per session d249f28b3391
  2. 2mo ago Changed · +8 lines 0f51cd5ee04f
  3. 2mo ago First seen · 75 lines · 155 tokens per session scan A 5a3c2e705cf7

Subscribe to this mod's changes

secrets-guard is a skill published in the GitHub repository larsboes/Axon (1 stars, last pushed 1mo ago), licensed MIT. It adds 151 tokens to every session and 1,013 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

secrets-guard compared with skills from other repositories

secrets-guard next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
secrets-guardlarsboes/AxonSkill11mo agoMITA151Claude Code
ligandmpnnaipoch/open-scienceSkill5.5ktodayApache-2.0A100Claude Code, Codex
evo2aipoch/open-scienceSkill5.5ktodayApache-2.0A83Claude Code, Codex
create-agentPM-Shawn/Abu-CoworkSkill4193d agoApache-2.0A13Claude Code
content-monitorCoWork-OS/CoWork-OSSkill537todayMITA16Claude Code, Codex
llm-wikiCoWork-OS/CoWork-OSSkill537todayMITA27Claude Code, Codex
simplifyCoWork-OS/CoWork-OSSkill537todayMITA24Claude Code, Codex