claude-permissions-optimizer

Extract safe Bash patterns from Claude Code session history and update settings.json allowlists.

Updated Nov 11, 2023
One-click install
npx skills add https://github.com/michaelvolz/redmuffin.Blazor.StaticWeb --skill claude-permissions-optimizer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: claude-permissions-optimizer
Source: https://github.com/michaelvolz/redmuffin.Blazor.StaticWeb/tree/main/.opencode/skills/ce/claude-permissions-optimizer
Command: npx skills add https://github.com/michaelvolz/redmuffin.Blazor.StaticWeb --skill claude-permissions-optimizer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Stops permission fatigue by inspecting Claude Code session history to identify safe Bash commands that repeatedly trigger prompts and auto-allows them in settings.json without over-reaching into dangerous patterns.

Core Features & Use Cases

  • Scoped analysis: Prompts for project scope, defaults to all projects, and honors custom filters so the recommendations match the current work context.
  • Safe command extraction: Runs the bundled extract-commands.mjs script to normalize Bash usage, enforce min-count thresholds, and classify each pattern so only green rules reach the allowlist.
  • Automatic allowlist updates: Reads user and project settings, deduplicates and sorts entries, validates JSON, and informs about changes while warning when risky patterns surface.

Quick Start

Ask Claude Permissions Optimizer to scan recent sessions and add the green Bash rules to your settings.json.

Frequently Asked Questions about claude-permissions-optimizer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I auto-allow safe Bash commands in Claude Code settings?

Auto-allow safe Bash commands in Claude Code by analyzing session history to identify frequently used, non-risky patterns and inserting them into your settings.json allowlist. This stops permission fatigue by automatically validating and adding only green rules.

What is the best way to reduce permission prompts for Bash commands in Claude Code?

Reduce permission prompts in Claude Code by scanning prior session transcripts to extract recurring safe Bash patterns. The tool normalizes commands, enforces count thresholds, and classifies them before updating your allowlist.

Does the Claude Code allowlist optimizer work with other coding agents?

Yes, the allowlist optimizer works with other coding agents by analyzing data stored in ~/.config/opencode/ and extracting commands from prior Claude Code session transcripts, regardless of which agent initiated them.

How to scope Bash command recommendations to a specific project in Claude Code?

Scope Bash command recommendations to a specific project by prompting the tool for project scope choices. It defaults to scanning all projects but honors custom filters so allowlist updates match your current work context.

Are there limitations to automatically updating Claude Code permission settings?

Limitations include enforcing min-count thresholds to avoid over-reaching, and warning users when risky patterns surface. The tool deduplicates entries and validates JSON but requires running the extract-commands.mjs Node script first.

Do I need Node.js to extract Bash patterns for my Claude Code allowlist?

Yes, you need Node.js to run the bundled extract-commands.mjs script. This script normalizes Bash usage, classifies each pattern for safety, and prepares statistics before updating your settings.json allowlist.