Home / Claude Code mods / Security / test-guard

test-guard

test-guard is a Claude Code mod by Justmalhar that blocks edits that make tests pass by weakening them: new skip/only markers, fewer assertions, a gutted test file, or deleting a test file.

Updated 2026-10-04

What is test-guard?

test-guard is a Claude Code mod by Justmalhar that blocks edits that make tests pass by weakening them: new skip/only markers, fewer assertions, a gutted test file, or deleting a test file. It is listed under Security and has 1 GitHub stars.

TypeClaude code mod
AuthorJustmalhar
RepositoryJustmalhar/awesome-claude-mods
Popularity1 GitHub stars
CategorySecurity
SecurityLow risk (100/100)
Rank#1,895 of 5,272 Claude Code mods; #226 in Security
LicenseMIT
Last commit2026-10-04
Hooks1 events
Seesevery tool call
Draws onnothing

Is test-guard safe to install?

test-guard scores 100/100 on the MCPMods security check: Low risk. No checks raised a concern. It passed 8 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 no processesPass
Writes no files or configPass
Doesn't read environment variablesPass
Only sees the events it hooksPass
Doesn't drive ClaudePass
Passes claude plugin validatePass
Has an open-source licensePass

API calls in its code

CallWhat it means
$.fs.existsreads files
$.fs.readreads files

How do I install test-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/Justmalhar/awesome-claude-mods
    claude plugin validate ./awesome-claude-mods/mods/test-guard
  3. Install it. Run this in your terminal, then /reload-plugins in an open session.
    claude plugin marketplace add Justmalhar/awesome-claude-mods && claude plugin install test-guard@awesome-claude-mods

Or ask Claude to set it up

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

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

More from Justmalhar/awesome-claude-mods

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

  • auto-checkpoint: Snapshots the working tree into hidden git refs at the start of every turn, with /checkpoints to list them and /undo-tur (Low risk)
  • branch-guard: Stops Claude from editing files or running mutating git commands on main or master, and points it at a worktree instead. (Low risk)
  • cost-bar: A one-row band above the prompt with session cost, 5h/7d plan limits and an optional budget bar. (Low risk)
  • file-tree-pane: Adds /tree: a side pane with a lazy file tree coloured by git status. Press a file to put @path in the prompt. (Low risk)
  • notify-on-finish: Sends a desktop notification when a long turn finishes, so you can look away while Claude works. (Low risk)
  • path-guard: Blocks Write, Edit and MultiEdit calls that target a path outside the project root or inside .git, plus optional deny gl (Low risk)
  • powerline-bar: A one-row powerline-style band above the prompt: directory, git branch and state, model, context fill. (Review before installing)
  • secret-guard: Blocks Write, Edit and Bash calls that would put an API key, token or private key into a file or command. (Low risk)