secret-env is a Claude Code safety mod by toy-crane.
Opens a pane for typing an API key into a .env file, shows [hidden] wherever the value appears in tool results, and denies Write and Edit on that key's line.
It runs inside the Claude Code process. The side panel is only what the author's README names. Read the repo before you install, or run claude plugin validate on the plugin folder.
Version
0.1.0
License
MIT
Repo stars
5
Last change
2026-10-22
What it can reach
Draws in the session
Holds a command
Sees tool calls
Run it in a terminal session. Add the marketplace first with /plugin marketplace add toy-crane/skills if you have not. Claude calls request_secret with a name, a purpose, and a .env file; save or cancel in the pane, and /secret-env opens the list of keys the project manages. When the file is not covered by .gitignore, the pane warns you and offers to add it before saving. Values shorter than four characters are refused. The text field does not mask what you type, so mind screen sharing, and the phone app has no text field. With the mod off or failed to load, Claude reads the value like any other file.
The marketplace, toycrane, also holds toycrane-skills, a bundle of the author's agent skills; secret-env installs on its own. Keeping API keys out of Claude's sight is why this page files it under safety. secret-guard hides API keys and private keys before the model or the transcript sees them, blocks credential files and commands that print secrets, and shows what it caught. secret-shield replaces API keys, tokens, private keys, and passwords in tool output with a redaction marker before the model or the transcript sees them. This one starts from the other end: Claude asks for a key by name, a pane opens for you to type the value, and it is written to the .env file you are shown, so Claude learns only that it was saved. From then on that exact value shows as [hidden] in every tool result, in later sessions too, since the mod remembers each key by name and file and reads the value back from the file. The README says a command that encodes the value or prints part of it gets past the filter.
Demo
Screenshot of the author's GitHub page.
What it hooks into
session.startWhen a session starts
command.runWhen you run its slash command/secret-env
tool.callAround a tool call, where it can hold onemcp__secret-env__request_secretWriteEdit
ui.closeWhen its pane closes
ui.renderDraws into the sessionPane
Read from the on() calls in its hook modules. Open its source under Files to check what each one does.
Slash commands 1
/secret-envList, add, or delete the secret keys Claude cannot see
Files
The author's README and source, 4 files. They load when you open them.