ai-dev-operating-system: Skill for Claude Code

.claude/skills/secrets-discipline/SKILL.md

secrets-discipline is a skill for Claude Code from lglucas/ai-dev-operating-system. It costs 117 tokens per session (711 once invoked), scanned A, original, MIT.

A preventive workflow for storing API keys, passwords, tokens, and other credentials safely during development.

In plain words
What is it for?
It helps move credentials into environment variables, maintain an example environment file, check ignore rules, keep server-only values out of browser code, and rotate exposed secrets.
Why use it?
It reduces the chance of exposing secrets in source code or commits, and explains what to do if one has already entered version history.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is lglucas/ai-dev-operating-system's own configuration. It tells Claude Code how to work on ai-dev-operating-system itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ai-dev-operating-system configures →

Part of the ai-dev-operating-system plugin — 28 skills, 11 commands, 12 agents, 1 hook shipped together

Reuse

Borrowing it

Nothing to install: this file belongs to lglucas/ai-dev-operating-system. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/lglucas/ai-dev-operating-system/main/.claude/skills/secrets-discipline/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/lglucas/ai-dev-operating-system

Made for: Claude Code.

Or install ai-dev-operating-system, the plugin that ships this one along with the rest of its 28 skills, 11 commands, 12 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 secrets-discipline

README.md
[![agentmods](https://agentmods.dev/badge/skills/lglucas/ai-dev-operating-system/secrets-discipline.svg)](https://agentmods.dev/skills/lglucas/ai-dev-operating-system/secrets-discipline)
Your own site
<a href="https://agentmods.dev/skills/lglucas/ai-dev-operating-system/secrets-discipline"><img src="https://agentmods.dev/badge/skills/lglucas/ai-dev-operating-system/secrets-discipline.svg" alt="Measured on agentmods" height="20"></a>
Per session 117 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 711 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00117 $0.00711
Opus 5 $0.00059 $0.00356
Sonnet 5 $0.00023 $0.00142
Haiku 4.5 $0.00012 $0.00071

Measured 8d ago against content hash 71f192309dc0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

secrets-discipline 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 8d 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.

.claude/skills/secrets-discipline/SKILL.md · 48 lines

How it starts

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

Secrets Discipline

When to run this skill

  • The user is adding a new integration (Stripe, Supabase, OpenAI, etc.).
  • The user pastes a string that looks like a secret (long random, starts with sk_, pk_, re_, etc.).
  • Before any commit if any file in the changeset contains an = followed by a long opaque string.
  • The user says "vou colocar a chave" / "where do I put my key".

Rules

  1. Never paste real secrets into source code. Always use process.env.X (or framework equivalent).
  2. Always update .env.example when introducing a new env var. The example file documents the existence of the variable, not its value.
  3. Never commit .env, .env.local, .env.production. They are gitignored — verify before commit.
  4. Server-only secrets must stay server-only. In Next.js, anything starting with NEXT_PUBLIC_ is shipped to the browser. If it's a secret, do NOT prefix it.
  5. One secret, one env var. Don't reuse the same key for unrelated services.
  6. Rotate after exposure. If a secret was committed at any point (even in a deleted file), rotate it. Git history retains it.

Vibe coder explanation

Secrets are like the keys to your house. The .env file is the keychain you keep at home. The .env.example is the description of what keys you need (front door, garage, mailbox) without showing what they look like. When you share your project on GitHub, you share the description — never the actual keys.

Workflow

  1. Identify all secret-like values in the proposed change.
  2. Confirm each is referenced via process.env.X (or equivalent).
  3. Confirm .env.example documents each new variable with a comment explaining purpose.
  4. Confirm .env, .env.local are in .gitignore.
  5. Run a quick scan: search for accidental literal API keys (regex: sk_[a-zA-Z0-9]{20,}, pk_[a-zA-Z0-9]{20,}, re_[a-zA-Z0-9]{20,}, AIza[a-zA-Z0-9\-_]{35}).
  6. If any literal secret is found in a tracked file, stop and ask the user to rotate.

Output

Read the full file on GitHub · 48 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. 8d ago First seen · 48 lines · 117 tokens per session scan A 71f192309dc0

Subscribe to this mod's changes

secrets-discipline is a skill published in the GitHub repository lglucas/ai-dev-operating-system (11 stars, last pushed 1mo ago), licensed MIT. It adds 117 tokens to every session and 711 once invoked, about $0.0006 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-30.

Related

Other skills, from other repositories

cn-check

Install and run the Continue CLI (cn) to execute AI agent checks on local code changes. Use when asked to "run checks", "lint with AI", "review my changes with cn", or set up Continue CI locally.

continuedev/continue · 49 tokens

phone-harness

Control the user's phone — iPhone through the Mac's iPhone Mirroring window, or an Android over adb: open apps, tap, type, swipe, read the screen.

ShawnPana/phone-harness · 40 tokens

security-audit

Java security checklist covering OWASP Top 10, input validation, injection prevention, and secure coding. Works with Spring, Quarkus, Jakarta EE, and plain Java. Use when reviewing code security, before releases, or when user asks about vulnerabilities.

decebals/claude-code-java · 55 tokens

issue-triage

Triage and categorize GitHub issues with priority labels. Use when user says "triage issues", "check issues", "review open issues", or during regular maintenance of GitHub issue backlog.

decebals/claude-code-java · 44 tokens

architecture-review

Analyze Java project architecture at macro level - package structure, module boundaries, dependency direction, and layering. Use when user asks "review architecture", "check structure", "package organization", or when evaluating if a codebase follows clean architecture principles.

decebals/claude-code-java · 51 tokens

git-commit

Generate conventional commit messages for Java projects. Use when user says "commit", "create commit", "commit changes", or after completing code changes that need to be committed.

decebals/claude-code-java · 38 tokens