ClaudeCodeMod

All shelves / Mods / Safety

command-explainer

By Singh-AP

command-explainer is a Claude Code safety mod by Singh-AP.

Draws a plain-English line and a risk level on the permission prompt, so you can see what the command does before you approve it.

Draws

Install

The marketplace name is awesome-claude-mods.

In Claude Code
/plugin marketplace add Singh-AP/awesome-claude-mods
/plugin install command-explainer@awesome-claude-mods
Open the repo

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
1.0.0
License
MIT
Repo stars
3
Last change
2026-10-04

What it can reach

  • Draws in the session
  • Sees tool calls

Claude Code 2.1.287 or later. The mod is live once you run /reload-plugins or start a new session. When a shell command is about to open a permission prompt, it asks a small, fast model, haiku by default, for one sentence on the command's concrete effect and a risk level, Safe, Caution, or Danger, and draws it on the call's row just above the dialog. It runs Claude Code's own permission check first, so commands your rules or mode already allow cost nothing, and plain read-only commands such as ls, cat, git status, and git log are never sent. The call goes ahead at once, and the line appears when the model answers. The last 200 explanations are cached by exact command. /explain explains any command on demand, in claude -p too. Set model and minLength in /config; if your organization blocks the model, the session's own model is used.

The marketplace, Singh-AP's awesome-claude-mods, holds the 21 mods built there, bash-guard, file-guard, slopsquat-guard among them, and 26 community and Anthropic mods pinned to a commit. This one installs on its own. Knowing what you approve is why this page files it under safety. blast-radius, by Anthropic, holds a shell command such as rm -rf, a force push, a hard reset, or a migration, shows what it would touch, then asks you to proceed or cancel. apexyard-explainer-me2resh, in an ApexYard ops fork, draws a pane that explains each tool call in one plain sentence. This one holds nothing: it adds one line above the dialog you already get. Each new command at a permission prompt costs one small model call, of 80 tokens at most. The README says the explanation is a second pair of eyes, not a guarantee, and that in this Claude Code release the notice line does not draw under the terminal's Bash permission dialog. Its plugin.json names awesome-claude-mods as its author, and Singh-AP owns the marketplace.

Demo

A plain-English line and a risk level on the permission prompt
From the author's repo.

What it hooks into

  • session.startWhen a session starts
  • tool.callAround a tool call, where it can hold oneBash
  • ui.renderDraws into the sessionToolGroup
  • command.runWhen you run its slash command/explain

Read from the on() calls in its hook modules. Open its source under Files to check what each one does.

Slash commands 1

  • /explainExplain a shell command in one plain sentence, with its risk

Files

The author's README and source, 4 files. They load when you open them.

Facts

Author
Singh-AP
Category
Safety
Marketplace
awesome-claude-mods
Repo
Singh-AP/awesome-claude-mods
Folder
mods/safety/command-explainer
Version
1.0.0
License
MIT
Repo stars
3
Last change
2026-10-04
Language
TypeScript
Files
7

Other mods in Safety

secret-guardarasovicHolds a commandHides 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.guardrailsarasovicHolds a commandHolds Cloudflare write commands, attribution lines in commits and pull requests, and branch names that start with claude/.guardrails-liteedtrackaiHolds a commandHolds a read of a secret .env file, a git force-push, and a recursive rm on /, ~, or $HOME. .env.example, .env.sample, and .env.template are allowed.injection-guardSingh-APStrips hidden characters from tool output and marks results that carry instructions aimed at Claude, so they reach it as untrusted data.collision-guardnateherkaiHolds a commandHolds an edit to a file another open chat changed in the last 30 minutes, and asks you to proceed, move this chat to a worktree, or cancel.recording-modenateherkaiHolds a commandMasks keys, personal details, and business figures on screen while you record, hides results from mail, chat, and finance tools, and keeps private files closed.secret-boxray-amjadHolds a commandOpens a masked box when Claude needs a key, writes the key to .env, and gives Claude a placeholder; any key a tool prints comes back as a placeholder too.secret-shieldSingh-APHolds a commandReplaces API keys, tokens, private keys, and passwords in tool output with a redaction marker before the model or the transcript sees them.transcript-redactorray-amjadSwaps secrets and email addresses in the session for stable placeholders, and puts the real value back on the way into Bash, Write, and Edit.safe-deletecharlie947Holds a commandMoves the files Claude deletes to the Bin instead, toasts a receipt, and /undo-delete puts the last batch back.loop-detectiveYeonwooSungOpens a case when the same Bash command fails the same way again, ties it to the edits that followed, and shows the live cases in a pane and a status line.display-redactionmelodic-softwareMasks email addresses and secret-shaped text in what Claude Code draws, and leaves the transcript, the model's context, and the files unchanged.
All 73 in Safety