Move every hard-coded secret out of the code
Finds keys and tokens in the repo, moves them to environment variables and blocks new ones.
/goal no API key, token, password or private key is hard-coded in tracked files. Search with `git grep -nE` for long random-looking strings, private key headers and names like key, secret, token and password with a literal value, and show the search and its results. Move each real secret to an environment variable read at startup with a clear error when missing, add the names with placeholder values to .env.example, and make sure .env is in .gitignore. To prove it: run the same `git grep -nE` search again and show it has no real secrets left, and run `npm test` and show it exits 0. Constraints: never print a secret value in the conversation (show only the file, line and variable name), do not rewrite git history, and list every secret that must be rotated because it was committed. Or stop after 15 turns.How to use it
- Replace the parts in square brackets with your own paths, names and commands.
- Open Claude Code in your project and paste the whole prompt, starting with /goal.
- Claude works until the evaluator sees the check pass, or until the turn bound. It proves the result with:
git grep -nE
Last checked against the current Claude Code facts on 2026-11-07.
More security prompts
New to /goal? Read Let Claude run until it is done with /goal.