Home / Claude Code mods / Security / secret-guard

secret-guard

secret-guard is a Claude Code mod by partalemre that catches secret keys (passwords, API keys, tokens) before they are written into a file or saved in a version, and stops the secrets file (.env) from being saved with your work. A card shows.

Updated 2026-11-29

What is secret-guard?

secret-guard is a Claude Code mod by partalemre that catches secret keys (passwords, API keys, tokens) before they are written into a file or saved in a version, and stops the secrets file (.env) from being saved with your work. A card shows. It is listed under Security and has 4 GitHub stars.

TypeClaude code mod
Authorpartalemre
Repositorypartalemre/MODZ
Popularity4 GitHub stars
CategorySecurity
SecurityHigh risk (48/100)
Rank#1,649 of 9,397 Claude Code mods; #196 in Security
LicenseMIT
Last commit2026-11-29
Hooks9 events
SeesBash calls, classic hooks, every prompt, every tool call
Draws onAskUserQuestion, UserMessage|AssistantMessage|ToolUse|ToolResult

Is secret-guard safe to install?

secret-guard scores 48/100 on the MCPMods security check: High risk. Things to review: starts processes outside the sandbox; writes files or config; reads environment variables; watches every prompt or event. It passed 3 of 8 checks.

Mod footprints come from claude plugin validate, which lists every event a mod hooks and every API call it makes without running it.

CheckResult
No network accessPass
Starts processes outside the sandboxReview
Writes files or configReview
Reads environment variablesReview
Watches every prompt or eventReview
Doesn't drive ClaudePass
Validator reported problemsNote
Has an open-source licensePass

API calls in its code

CallWhat it means
$.clock.now
$.command.register
$.config.list
$.env.getreads env vars
$.fs.existsreads files
$.fs.readreads files
$.fs.statreads files
$.fs.writewrites files
$.process.runruns processes
$.session.cwd
$.session.surfaces
$.state.get
$.state.set
$.store.getkeeps its own state
$.store.setkeeps its own state
$.ui.askdraws interface
$.ui.logdraws interface
$.ui.resolvedraws interface
$.ui.statusdraws interface

How do I install secret-guard?

  1. Check your Claude Code version. Mods need Claude Code 2.1.287 or later and are on by default.
    claude --version
  2. Read its footprint. This lists every event it hooks and every API call it makes, without running it.
    git clone https://github.com/partalemre/MODZ
    claude plugin validate ./MODZ/mods/secret-guard
  3. Install it. Run this in your terminal, then /reload-plugins in an open session.
    claude plugin marketplace add partalemre/MODZ && claude plugin install secret-guard@modz

Or ask Claude to set it up

Paste this into Claude Code and it installs secret-guard for you:

Install the "secret-guard" Claude Code mod from https://github.com/partalemre/MODZ/tree/main/mods/secret-guard. Run claude plugin validate on it first and show me what it can access before you enable it.

More from partalemre/MODZ

This repository has at least 9 Claude Code mods on MCPMods.

  • blast-radius: Stops a command that could lose your work before it runs: deleting files (rm -rf), throwing away unsaved changes or save (Review before installing)
  • cache-tax: Keeps the chat ready (the one-hour prompt cache) during breaks, so your next message does not make Claude read the whole (Review before installing)
  • checkpoint: Quietly saves a restore point before each turn's first file change; /checkpoints lists the turns and undoes one after yo (Review before installing)
  • done-ping: A notification when a long turn (your message and its answer) finishes or Claude waits on you (a permission or a questio (High risk)
  • effort-router: Shows how hard Claude thought on each turn (effort) and which model answered; can send a simple message at a lower think (Review before installing)
  • filetree: A file tree of what Claude touches: what it is doing now, the files it touched this turn, and which changes are not save (Review before installing)
  • handoff: Saves working notes before the chat is summarized to free its memory (compact) and offers them back after; when the memo (High risk)
  • hud-pro: One quiet line above your message box, in the terminal and the desktop app: how much of the 5-hour and weekly usage allo (Low risk)