handle-secrets

handle-secrets is a skill for Claude Code, Codex from cboone/agent-harness-plugins. It costs 97 tokens per session (758 once invoked), scanned A, original, MIT.

A set of guidelines for safely handling API keys, tokens, and passwords that users provide to command-line tools.

In plain words
What is it for?
Use it when building or reviewing CLI tools that accept credentials, choosing how users enter them, and separating secret storage from ordinary settings.
Why use it?
It helps prevent secrets from appearing in shell history, process listings, logs, or error messages.

Skill for Claude CodeCodex

Part of the handle-secrets plugin — 1 skill 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/cboone/agent-harness-plugins/handle-secrets
Any agent
npx skills add cboone/agent-harness-plugins --skill handle-secrets
Clone the repo
git clone --depth 1 https://github.com/cboone/agent-harness-plugins

Made for: Claude Code, Codex.

Or install handle-secrets, 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 handle-secrets

README.md
[![agentmods](https://agentmods.dev/badge/skills/cboone/agent-harness-plugins/handle-secrets.svg)](https://agentmods.dev/skills/cboone/agent-harness-plugins/handle-secrets)
Your own site
<a href="https://agentmods.dev/skills/cboone/agent-harness-plugins/handle-secrets"><img src="https://agentmods.dev/badge/skills/cboone/agent-harness-plugins/handle-secrets.svg" alt="Measured on agentmods" height="20"></a>
Per session 97 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 758 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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 $0.00097 $0.00758
Opus 5 $0.00048 $0.00379
Sonnet 5 $0.00019 $0.00152
Haiku 4.5 $0.00010 $0.00076

Measured 4d ago against content hash f1afe2c48b94, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

handle-secrets 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 4d 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.

plugins/handle-secrets/skills/handle-secrets/SKILL.md · 73 lines

How it starts

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

Handle Secrets

Best practices for handling secrets that users pass to your CLI tool (API keys, tokens, passwords), not secrets used during development.

Core Principles

  1. Never accept secrets as command-line arguments - Arguments are visible via ps aux, recorded in shell history, and captured by audit logs
  2. Make the secure path the default - Users who do nothing special should get the safest behavior
  3. Separate config from credentials - Non-sensitive settings and secret material belong in different files
  4. Mask secrets in all output - Debug logs, error messages, HTTP traces, and verbose output must redact secret values
  5. Warn loudly about insecure behavior - If users opt into something dangerous, tell them explicitly

Security Hierarchy (Safest to Most Dangerous)

Method Safety Use when
OS keychain / credential helper Safest Persistent storage for interactive users
Secret references (op://, vault URIs) Safe Storing pointers instead of secrets
Stdin / pipes / file descriptors Safe Automation and scripting
Interactive TTY prompt Safe Human users at a terminal
Config files (0600 permissions) Acceptable Persistent storage without keychain
Environment variables Acceptable CI/CD pipelines and containers
Command-line arguments Never -

Workflow

  1. Quick reviews: Check against references/checklist.md
  2. Choosing an input method: Read references/security-hierarchy.md
  3. Designing credential flows: Read references/design-patterns.md
  4. Avoiding known pitfalls: Read references/anti-patterns.md
  5. Language-specific code: Read references/language-libraries.md

Read the full file on GitHub · 73 lines

Files

What ships with it

5 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. 4d ago First seen · 73 lines · 97 tokens per session scan A f1afe2c48b94

Subscribe to this mod's changes

handle-secrets is a skill published in the GitHub repository cboone/agent-harness-plugins (2 stars, last pushed 1mo ago), licensed MIT. It adds 97 tokens to every session and 758 once invoked, about $0.0005 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-31.

Related

Other skills, from other repositories