By choam2426
Preview risk levels and recovery instructions for every Bash command before execution in Claude Code sessions. Triggers Lumen script automatically on session start (startup, resume, clear, compact) and prior to Grep or Bash tool use for proactive safety checks.
npx claudepluginhub choam2426/CmdLens --plugin cmdlensA 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
Ultra-compressed communication mode. Cuts ~75% of tokens while keeping full technical accuracy by speaking like a caveman.
Executes bash commands
Hook triggers when Bash tool is used
Intelligent prompt optimization using skill-based architecture. Enriches vague prompts with research-based clarifying questions before Claude Code executes them
Persistent memory system for Claude Code - seamlessly preserve context across sessions