haacked/dotfiles/analyze-permissions
Claude Code and agent skill by haacked/dotfiles
- community
Checking that the SKILL.md file is still in the repository.
Analyze accumulated permissions and suggest smart wildcard patterns. Only invoke when the user explicitly runs /analyze-permissions or asks to analyze their Claude Code permissions.
Install
npx vskill@latest install haacked/dotfiles/analyze-permissionsSKILL.md
Analyze Claude Code Permissions
Analyze accumulated permissions in settings.local.json and suggest smart wildcard patterns to add to the shared configuration.
Arguments (parsed from user input)
- action: What to do -
analyze(default),apply, orcleanup
Example invocations:
/analyze-permissions→ analyze and suggest patterns/analyze-permissions apply→ apply suggested patterns to shared config/analyze-permissions cleanup→ just run the cleanup script
Your Task
Step 1: Read Current Permissions
Read these files:
- Project-local:
<project-root>/.claude/settings.local.json- accumulated "Always allow" permissions (per-project, not at~/.claude/) - Global:
~/.claude/settings.json- shared/base permissions managed by the configure script - Configure script:
~/.dotfiles/ai/configure-tool-permissions.sh- canonical source for global permissions
Note: settings.local.json is project-specific. Each repo has its own at <repo>/.claude/settings.local.json. The global ~/.claude/settings.json is shared across all projects.
Step 2: Analyze Patterns
For each entry in settings.local.json:
- Check if already covered - Is there a wildcard in
settings.jsonthat covers this?
Bash(git commit -m "Fix bug")is covered byBash(git commit:*)Bash(curl https://api.example.com)is covered byBash(curl:*)
- Identify pattern opportunities - Group similar commands:
- Multiple
kubectlcommands → suggestBash(kubectl:*) - Multiple
dockercommands → suggestBash(docker:*) - Multiple WebFetch for same domain → suggest
WebFetch(https://example.com/*)
- Decide global vs local - Where should the pattern live?
- Global (configure script): General-purpose tools used across projects (
npx,python,docker compose, etc.) - Local (settings.local.json): Project-specific commands, or write operations you only want for that project (e.g.,
git pushfor a personal repo)
- Assess safety - Consider if the pattern is safe for auto-approval:
- Read-only commands: Generally safe
- Commands with side effects: Flag for review; consider keeping them per-project in local settings (e.g.
git pushfor a personal repo) - Overly broad patterns: Warn about security implications
- Never suggest auto-approving
sudo, permission-loosening patterns likechmod 777, or anything that could expose credentials or secrets
Step 3: Present Analysis
Output a structured report:
Step 4: Handle Actions
Based on the action argument:
analyze (default):
- Present the report
- Ask if user wants to apply suggestions
apply:
- For each suggested pattern, ask for confirmation
- Add approved patterns to
configure-tool-permissions.shin the PERMISSIONS_CONFIG section - Run the cleanup script to remove now-redundant entries
cleanup:
- Just run
scripts/cleanup-settings-local.sh
Step 5: Update Shared Config (if applying)
When adding patterns to configure-tool-permissions.sh:
- Add new entries to the
PERMISSIONS_CONFIGJSON array - Add at least one new entry to the validation
ifstatement so the script knows to re-run - Run the script to apply changes:
~/.dotfiles/ai/configure-tool-permissions.sh - Run cleanup to remove now-redundant entries from the current project's local settings:
scripts/cleanup-settings-local.sh
Important: The configure script merges new entries into settings.json but never removes existing ones. This means settings.json also accumulates "don't ask again" entries over time. The cleanup script only cleans settings.local.json. To fully clean settings.json, you'd need to manually remove redundant entries or rebuild it from the script.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingai/skills/analyze-permissions/SKILL.md
Popularity
- Repository stars
- 128
- Repository forks
- 21
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/haacked/dotfiles/analyze-permissions)