smithery/ArjenSchwarz

permission-analyzer

Generate Claude Code permissions config from session history.

Installation

$ npx skills add smithery/ArjenSchwarz --skill permission-analyzer

Summary

  • Generate Claude Code permissions config from session history.
  • Use when setting up autonomous mode, configuring .claude/settings.json, avoiding --dangerously-skip-permissions, or analyzing what permissions a project needs.
  • Reads session logs to extract Bash commands and MCP tools actually used, then generates appropriate allow/deny rules.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/ArjenSchwarz.

npx skills add smithery/ArjenSchwarz

Browse all from smithery/ArjenSchwarz

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Declared agents claude-code

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,896 B
  • docs SUMMARY.md 366 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

Permission Analyzer

Generate permissions configuration based on actual tool usage from past sessions.

Workflow

  1. Run the analysis script for the current project:

``bash ~/.claude/skills/permission-analyzer/scripts/analyze_permissions.py ``

  1. Review the generated permissions output
  1. Offer to merge into existing settings:

- If .claude/settings.json exists, merge the permissions section - If not, create new file with generated config - Preserve existing settings (model, env, etc.)

Script Output

The script outputs to stderr (summary) and stdout (JSON):

Analyzing: /path/to/project
Sessions analyzed: 42

Bash commands found:
  git: 150
  make: 80
  go: 45

MCP tools found:
  mcp__devtools__think

{
  "permissions": {
    "allow": ["Bash(git:*)", "Bash(go:*)", ...],
    "deny": [...],
    "defaultMode": "acceptEdits"
  }
}

Generated Rules

Allow list includes:

  • Development commands used (git, make, go, npm, cargo, etc.)
  • Filesystem commands used (ls, mkdir, find, etc.)
  • MCP server wildcards for servers that were used

Deny list includes:

  • Dangerous gh operations (merge, delete, secrets, auth)
  • Sensitive file patterns (.env, secrets/, .pem, .key)
  • Destructive commands (rm -rf, sudo, chmod 777)

Merging Settings

When .claude/settings.json exists, merge only the permissions key while preserving other settings. If user has custom allow/deny rules, ask whether to merge or replace.