why

why is a command for Claude Code from smrafiz/claude-supercharger. It costs 0 tokens per session (960 once invoked), scanned A, original, MIT.

A command that explains the most recent action taken by a Supercharger background check, called a hook.

In plain words
What is it for?
Use it to investigate the latest hook activity or ask about a specific hook such as a confidence check.
Why use it?
It makes automated blocks, warnings, corrections, failures, and recovered subagent results easier to understand.

Command for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_DATA} variable. Also seen: mentions subagents; mentions Claude Code.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the supercharger plugin — 37 commands, 10 agents, 28 hooks shipped together

Good fit Use it to investigate the latest hook activity or ask about a specific hook such as a confidence check.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add smrafiz/claude-supercharger
Claude Code
/plugin install supercharger

Made for: Claude Code.

Or install supercharger, the plugin that ships this one along with the rest of its 37 commands, 10 agents, 28 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for why

README.md
[![agentmods](https://agentmods.dev/badge/commands/smrafiz/claude-supercharger/why.svg)](https://agentmods.dev/commands/smrafiz/claude-supercharger/why)
Your own site
<a href="https://agentmods.dev/commands/smrafiz/claude-supercharger/why"><img src="https://agentmods.dev/badge/commands/smrafiz/claude-supercharger/why.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 960 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00960
Opus 5 $0.00000 $0.00480
Sonnet 5 $0.00000 $0.00192
Haiku 4.5 $0.00000 $0.00096

Measured 5d ago against content hash 6c66f00522ba, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

why scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/why.md · 41 lines

What it actually says

Explain the most recent Supercharger hook action. Arguments: $ARGUMENTS

If $ARGUMENTS is empty, examine the most recent hook activity. If $ARGUMENTS names a hook (e.g., confidence-gate), explain that hook's last firing specifically.

Sources to consult (read in order, stop at first match). Scope files gained -<session>/-<project-hash> suffixes over time — these are the CURRENT names, so use the globs exactly as written (pick the most-recently-MODIFIED match, ls -t … | head -1):

  1. ${CLAUDE_PLUGIN_DATA}/scope/.scan-alert-* (mtime + content; newest) — last scanner finding
  2. ${CLAUDE_PLUGIN_DATA}/scope/.blocked-commands (last line — single global file, NO suffix) — last block reason
  3. ${CLAUDE_PLUGIN_DATA}/scope/.user-corrections* (last line of newest) — last correction
  4. ${CLAUDE_PLUGIN_DATA}/scope/.failed-commands-* (last line of newest — per-project hash) — last failure cluster 4a. ${CLAUDE_PLUGIN_DATA}/scope/.subagent-report-* (last 3 lines of newest — per-session) — a subagent whose final message came back degraded ("Ready.", "Done.", "Standing by."), i.e. Claude Code's return-channel bug. Its findings were recovered to disk. Report the path and tell the user to read it with bash ${CLAUDE_PLUGIN_ROOT}/tools/subagent-report.sh <agent-id> (or --latest). This is not a block and nothing failed — the work completed, only the reply was lost. 4b. ${CLAUDE_PLUGIN_DATA}/scope/.prompt-notes-* (last 3 lines of newest — per-session) — prompt-validator's phrasing advice. It runs async, so this note may have scrolled past or arrived beside the answer; this file is where it is kept. Report it as guidance on how the request was phrased, never as something that blocked anything. 4c. ${CLAUDE_PLUGIN_DATA}/scope/.detect-overruns (count the lines; report only if the newest entry is from this session's timeframe) — safety.sh's deep scanner hit its wall-clock budget and was killed, so it fell back to the regex checks alone. This is the one source here that explains why something did not fire: check_archive_secrets and check_secret_directory live only in safety-detect.py, so while it is cut short those rules are not running. Measured at ~0.6% of calls under heavy parallel load. Report it as a fail-OPEN that already happened — nothing was blocked, a check was skipped — and name the lever: SUPERCHARGER_DETECT_BUDGET_S (default 0.5). Usually just a loaded machine.
  5. ${CLAUDE_PLUGIN_DATA}/audit/$(date -u +%Y-%m-%d).jsonl (last 5 entries that have a hook field — skip timing/field-less rows) — recent audit events
  6. ${CLAUDE_PLUGIN_DATA}/scope/.tool-history-* (last line of newest — per-session) — last tool result

For each source that matched, explain:

  • What fired — hook name + event (e.g., confidence-gate.sh on PreToolUse:Edit)
  • Why — the specific signal (e.g., "3 failures in last 5 tool calls + read-before-write violation on /tmp/foo.ts → score 0.50, warn tier")
  • Where — file:line if applicable
  • What to do — concrete next step (e.g., "Run bash tools/hook-toggle.sh confidence-gate off for this session, or read the file before editing")

Output format (one block per source matched, max 3):

=== Why the last action fired ===

[1] <hook-name> at <relative time>
    Event:   <PreToolUse|PostToolUse|...>:<tool>
    Reason:  <one sentence>
    Detail:  <evidence snippet — file:line, score, threshold, etc.>
    Fix:     <concrete next step>

If no hook activity is found in any source: print No recent hook activity recorded.

Do not narrate the investigation. Lead with the answer.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago Changed · +1 lines 6c66f00522ba
  2. 8d ago First seen · 40 lines · 0 tokens per session scan A 7db7978724a3

Subscribe to this mod's changes

why is a command published in the GitHub repository smrafiz/claude-supercharger (11 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 960 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.