Secret Guard

How to handle {{S_xxxxxxxx}} secret placeholders. Use when a prompt or file contains a {{S_...}} token, or when the user asks to store, place, or use an API key, token, or password that was redacted.

kimsb2429 Updated

File contents

secret-guard placeholders

A token shaped {{S_xxxxxxxx}} is a redacted credential. The real value never enters this conversation. The plugin holds it in memory for this session; once written to a .env file in the project it also resolves in later sessions (the id is a hash of the value).

Rules:

  • Use the placeholder verbatim wherever the real value belongs: .env lines, export statements, curl -H headers, config files. The secret-guard plugin swaps in the real value when the tool runs.
  • Never ask the user to paste the secret again. Never try to read it via cat, env, or any other route; tool output is scrubbed and will only show the placeholder.
  • When placing a key, prefer .env in the project root (create it if missing, add it to .gitignore), keyed by the provider name the placeholder context gives (e.g. ANTHROPIC_API_KEY).
  • A placeholder from a past session resolves only if the value sits in .env, .env.local, .env.development, .env.production, or .env.test in the working directory. If substitution fails, tell the user the key must be pasted again.

kimsb2429/claude-skills/tree/main/secret-guard commit 255945a383

Frequently asked questions

npx skillmds@latest add kimsb2429/secret-guard