secret-setup

secret-setup is a skill for Claude Code from LeeJuOh/claude-code-zero. It costs 92 tokens per session (2,104 once invoked), scanned D, original, MIT.

A setup process that finds hardcoded secrets such as API keys and database credentials, moves confirmed secrets into a gitignored environment file, and loads them when a session starts.

In plain words
What is it for?
Use it to scan Claude-related files and project configuration, choose which findings are real secrets, name their environment variables, and configure automatic loading.
Why use it?
Secrets stored in project instructions or configuration can be committed to Git and shared with collaborators. Moving them to an ignored file reduces that exposure.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; names the AskUserQuestion tool.

Part of the toolbox plugin — 4 skills shipped together

Good fit Use it to scan Claude-related files and project configuration, choose which findings are real secrets, name their environment variables, and configure automatic loading.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/leejuoh/claude-code-zero/secret-setup
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 LeeJuOh/claude-code-zero --skill secret-setup
Clone the repo
git clone --depth 1 https://github.com/LeeJuOh/claude-code-zero

Made for: Claude Code.

Or install toolbox, the plugin that ships this one along with the rest of its 4 skills.

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-setup

README.md
[![agentmods](https://agentmods.dev/badge/skills/leejuoh/claude-code-zero/secret-setup/github.svg)](https://agentmods.dev/skills/leejuoh/claude-code-zero/secret-setup)
Your own site
<a href="https://agentmods.dev/skills/leejuoh/claude-code-zero/secret-setup"><img src="https://agentmods.dev/badge/skills/leejuoh/claude-code-zero/secret-setup/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-setup

Your own site · 80×15
<a href="https://agentmods.dev/skills/leejuoh/claude-code-zero/secret-setup"><img src="https://agentmods.dev/badge/skills/leejuoh/claude-code-zero/secret-setup.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 2,104 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 2 findings. 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.00092 $0.02104
Opus 5.5 $0.00037 $0.00842
Sonnet 5.5 $0.00018 $0.00421
Haiku 4.5 $0.00009 $0.00210

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

Security

Grade D, and why

secret-setup scanned grade D with 2 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 7d 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 variableshighData exfiltration

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

description: Extract hardcoded secrets from CLAUDE.md, .mcp.json, and project config into a gitignored env file, then wire a SessionStart hook to load them automatically. Use when user says "separate secrets", "extract A

Reads MCP configurationmediumAgent snooping

mcp.json carries server URLs and auth tokens; reading it lets a mod discover and abuse other integrations.

description: Extract hardcoded secrets from CLAUDE.md, .mcp.json, and project config into a gitignored env file, then wire a SessionStart hook to load them automatically. Use when user says "separate secrets", "extract A
plugins/toolbox/skills/secret-setup/SKILL.md · 238 lines

How it starts

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

Secret Setup

Extract hardcoded secrets from CLAUDE.md, .mcp.json, and project config into a gitignored env file, then wire up a SessionStart hook to load them automatically via CLAUDE_ENV_FILE.

Secrets in CLAUDE.md and .mcp.json get committed to git, shared with collaborators, and cached in Claude's context. This skill moves them to a gitignored file and loads them through a hook or shell profile.

If the user passes scan-only, stop after Phase 1 (report findings without modifying anything).

Phase 1: Scan for secrets

Read references/detection-patterns.md for the full list of regex patterns and scan targets.

Run Grep with each pattern against the scan targets. Present findings in a table:

| # | File | Line | Type | Value (masked) |
|---|------|------|------|----------------|
| 1 | CLAUDE.md:42 | API Key | sk-...abc1 |
| 2 | CLAUDE.md:55 | DB URL | postgres://...@host/db |

Ask the user to confirm which items are actual secrets to extract. Some may be intentional examples or documentation — do not force extraction.

Phase 2: Variable mapping

For each confirmed secret, propose an environment variable name:

  • If the secret is already referenced by a known env var name in the project (e.g., DATABASE_URL in code), reuse that name.
  • Otherwise, derive a descriptive UPPER_SNAKE_CASE name from context.

Present the mapping and ask for confirmation. Mark the source so MCP secrets get handled differently in Phase 4:

| # | Source | Current value (masked) | Proposed env var |
|---|--------|----------------------|-----------------|
| 1 | CLAUDE.md | sk-...abc1 | OPENAI_API_KEY |
| 2 | CLAUDE.md | postgres://...@host/db | DATABASE_URL |
| 3 | .mcp.json | xoxb-...token | SLACK_TOKEN |

The user may rename variables or skip items. Wait for approval before proceeding.

Phase 3: Infrastructure setup

Each step checks for existing infrastructure and merges rather than overwrites.

Step 3.1: Determine env file location

Read the full file on GitHub · 238 lines

Files

What ships with it

2 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. 7d ago Changed · -7 lines f1a3948326ac
  2. 1mo ago First seen · 245 lines · 92 tokens per session scan D ccc44a4492e0

Subscribe to this mod's changes

secret-setup is a skill published in the GitHub repository LeeJuOh/claude-code-zero (52 stars, last pushed 3d ago), licensed MIT. It adds 92 tokens to every session and 2,104 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it D with 2 findings (harvests environment variables, reads mcp configuration). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.