Stop approving the same commands over and over. Claude Commands Reviewer scans your Claude Code sessions, intelligently groups safe commands using AI, and applies them to your global settings — so every new session starts pre-approved.
If you use Claude Code across multiple projects, you know the pain: the same npm test, git add, pytest prompts appearing in every session. This tool collects those commands, groups them with smart wildcard patterns, and lets you review and approve them once for all future sessions.
- Collect — Scans all active Claude Code sessions and extracts allowed/denied commands from project settings
- Group — Uses Claude Haiku to intelligently create wildcard patterns for similar safe commands (e.g.,
npm run:*) - Review — Presents grouped commands for interactive approval with built-in safety checks
- Apply — Merges approved commands into
~/.claude/settings.jsonwith automatic backup
# Collect commands from all your Claude Code projects
npx -y claude-commands-reviewer@latest collect
# Interactively review the generated file
npx -y claude-commands-reviewer@latest review review-2025-10-23-183045.json
# Apply approved commands to your global settings
npx -y claude-commands-reviewer@latest apply review-2025-10-23-183045.jsonNo installation required — just run with npx.
npx -y claude-commands-reviewer@latest listShows all Claude Code sessions grouped by project, including project paths, git branches, session count, and last activity time.
npx -y claude-commands-reviewer@latest collectDiscovers all active sessions (last 7 days or since last run), extracts commands from project .claude/settings.json and settings.local.json, groups similar commands with AI, and generates a review file.
Use --reset to re-scan the last 7 days regardless of when you last ran it:
npx -y claude-commands-reviewer@latest collect --resetnpx -y claude-commands-reviewer@latest review review-2025-10-23-183045.jsonInteractive controls:
A— Approve current itemD— Deny current itemS— Skip (leave as pending)N/P— Next / Previous itemQ— Save and quit
npx -y claude-commands-reviewer@latest apply review-2025-10-23-183045.jsonReads the review file, backs up ~/.claude/settings.json, merges approved commands, and logs the change to history/command-approvals.md.
The tool uses a comprehensive safety framework to prevent dangerous wildcards:
Safe to Wildcard — Development commands (poetry run:*, npm run:*), non-destructive git (git checkout:*, git add:*), testing (pytest:*, jest:*), build tools (npm build:*, cargo build:*)
Review Required — Publishing commands (git commit:*, git push:* without --force), package installation (npm install:*, pip install:*)
Never Wildcarded — Destructive operations (rm, del, --force, --hard), permission changes (chmod, chown, sudo), network operations (curl, wget), broad domain/path access
{
"date": "2025-10-23T18:30:00.000Z",
"groupings": [
{
"pattern": "Bash(poetry run:*)",
"matches": ["Bash(poetry run test)", "Bash(poetry run lint)"],
"reasoning": "Safe: All poetry run commands execute project-defined scripts",
"confidence": "high",
"safetyCategory": "SAFE_TO_WILDCARD",
"approved": true
}
],
"ungrouped": [
{
"command": "Bash(rm -rf temp)",
"reasoning": "Dangerous: Destructive file deletion",
"safetyCategory": "NEVER_WILDCARD",
"approved": false
}
]
}- Weekly: Run
npx -y claude-commands-reviewer@latest collectto gather commands from recent sessions - Review: Use the interactive reviewer or manually edit the JSON file
- Apply: Run
npx -y claude-commands-reviewer@latest apply review-*.jsonto update global settings - Benefit: All new Claude Code sessions automatically allow approved commands
Using Bun:
bunx claude-commands-reviewer@latest collect
bunx claude-commands-reviewer@latest review review-2025-10-23-183045.json
bunx claude-commands-reviewer@latest apply review-2025-10-23-183045.jsonUsing pnpm:
pnpm dlx claude-commands-reviewer@latest collect
pnpm dlx claude-commands-reviewer@latest review review-2025-10-23-183045.json
pnpm dlx claude-commands-reviewer@latest apply review-2025-10-23-183045.json- Node.js 22+
- Claude Code CLI installed and authenticated
- Active Claude Code sessions with project settings
MIT