Home / Claude Code mods / Security / command-guard

command-guard

command-guard is a Claude Code mod by ipartington that refuses shell commands a project's .claude/command-guards.json rules out, for the main loop and every subagent.

Updated 2026-10-11

What is command-guard?

command-guard is a Claude Code mod by ipartington that refuses shell commands a project's .claude/command-guards.json rules out, for the main loop and every subagent. It is listed under Security and has no public popularity data yet.

TypeClaude code mod
Authoripartington
Repositoryipartington/claude-mods
Popularityno public popularity data yet
CategorySecurity
SecurityLow risk (100/100)
Rank#3,454 of 5,272 Claude Code mods; #376 in Security
LicenseMIT
Last commit2026-10-11
Hooks1 events
SeesBash calls, Monitor calls
Draws onnothing

Is command-guard safe to install?

command-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.readreads files
$.session.root
$.ui.toastdraws interface

How do I install command-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/ipartington/claude-mods
    claude plugin validate ./claude-mods/command-guard
  3. Install it. Run this in your terminal, then /reload-plugins in an open session.
    git clone https://github.com/ipartington/claude-mods && claude --plugin-dir ./claude-mods/command-guard

Or ask Claude to set it up

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

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

More from ipartington/claude-mods

This repository has 6 Claude Code mods on MCPMods.

  • bg-task-band: A band above the prompt showing running background tasks, their elapsed time and last output line (Review before installing)
  • handoff-on-clear: Saves a handoff when you /clear or exit, and offers it back on your next prompt (Review before installing)
  • merge-followthrough: Watches your PRs, and when one merges it pulls main and deletes the branch, then tells Claude (Review before installing)
  • review-ledger: Keeps review findings (H1, M3, L2...) per repo across sessions and ticks them off when their PR merges (Review before installing)
  • tts-lite: Speaks a one-line summary of each reply without starting a headless claude session (Review before installing)