CmdLens - Bash command explanation plugin
npx claudepluginhub choam2426/CmdLensDisplays risk level and recovery info before every Bash command execution
A Claude Code plugin that automatically explains commands before execution.
Every Bash command is displayed with risk level and recovery instructions. 한국어
| Before | After |
|---|---|
![]() | ![]() |
| Before | After |
|---|---|
![]() | ![]() |
# Add marketplace
/plugin marketplace add choam2426/CmdLens
# Install plugin
/plugin install cmdlens@cmdlens-marketplace
git clone https://github.com/choam2426/CmdLens.git
cp -r CmdLens/plugins/cmdlens ~/.claude/plugins/
Session Start
↓
SessionStart Hook → Inject description guide to Claude
↓
User requests task
↓
Claude prepares Bash command with description
↓
PreToolUse Hook → Display risk/recovery via systemMessage
↓
Command executes
Hybrid Approach: Combines SessionStart (behavior modification) and PreToolUse (display) for consistent, reliable output.
| Level | Icon | Description | Examples |
|---|---|---|---|
| Safe | 🟢 | Read-only, info query | ls, cat, pwd, git status |
| Caution | 🟡 | File modification | mv, cp, chmod, git commit |
| Danger | 🔴 | Deletion, system change | rm -rf, sudo, git push --force |
CmdLens/
├── .claude-plugin/
│ └── marketplace.json
├── plugins/
│ └── cmdlens/
│ ├── .claude-plugin/
│ │ └── plugin.json
│ ├── hooks/
│ │ ├── hooks.json
│ │ ├── session_start.py
│ │ └── pre_tool_use.py
│ └── prompts/
│ └── description_guide.md
├── docs/
│ └── PRD.md
└── README.md