Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
choam2426 avatar

Cmdlens

  • 11 repo stars
  • Updated January 28, 2026
  • choam2426/CmdLens

Displays risk level and recovery info before every Bash command execution

About

cmdlens is a Claude Code skill in the Productivity & Planning category. Displays risk level and recovery info before every Bash command execution

  • cmdlens
  • Productivity & Planning
  • AI-coding skill

Cmdlens by the numbers

  • Data as of Jul 7, 2026 (Skillselion catalog sync)
/plugin marketplace add choam2426/CmdLens
/plugin install cmdlens@cmdlens-marketplace

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
repo stars11
Last updatedJanuary 28, 2026
Repositorychoam2426/CmdLens

What it does

Displays risk level and recovery info before every Bash command execution

README.md

CmdLens

A Claude Code plugin that automatically explains commands before execution.

Every Bash command is displayed with risk level and recovery instructions. 한국어


Before & After

Command Output

Before After
before-output after-output

Permission Approval Screen

Before After
before-permission after-permission

Features

  • Automatic Explanation — Shows risk and recovery info for every command
  • Risk Level Indicator — Visual assessment (🟢 Safe / 🟡 Caution / 🔴 Danger)
  • Recovery Guide — How to undo, or warns if irreversible
  • Multilingual Support — Explains in user's language (English/Korean)
  • Zero Dependencies — No external API calls, no additional packages

Installation

Option 1: Marketplace (Recommended)

# Add marketplace
/plugin marketplace add choam2426/CmdLens

# Install plugin
/plugin install cmdlens@cmdlens-marketplace

Option 2: Manual Installation

  1. Clone the repository:
git clone https://github.com/choam2426/CmdLens.git
  1. Copy plugin to Claude Code plugins directory:
cp -r CmdLens/plugins/cmdlens ~/.claude/plugins/
  1. Restart Claude Code

How It Works

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.


Risk Levels

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

Requirements

  • Python 3.10+
  • Claude Code

Project Structure

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

License

MIT

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.