audit-permissions
This skill should be used when the user asks to "audit claude permissions", "audit permissions", "review local claude settings", "promote permissions to global", "clean up claude settings", "find permission patterns", or wants to identify project-local Claude Code permissions that should be added to…
Install / Use
npx skills add malob/nix-config --skill audit-permissionsInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of audit-permissions
audit-permissions scores 91/100 on our quality scale, 1138th of 4,717 Development & Engineering skills we index (top 25%).
Its SKILL.md is 16 KB long, well organised into 53 sections with 13 code examples: a thorough specification that gives an agent plenty to work with.
It has 464 GitHub stars, a meaningful sign that others use it.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so audit-permissions is actively maintained.
- Our last check on 2026-10-29 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-10-05. Automated pattern scan on 2026-10-05. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
audit-permissions compared with similar skills
All 4 of these similar skills score higher than audit-permissions; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| audit-permissions (this skill)by malob | 91 | 464 | 59d ago | SKILL.md |
| taste-skillby Leonxlnx | 100 | 118.3k | 10d ago | CLAUDE.md |
| hyperframesby heygen-com | 100 | 86.4k | today | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 72.4k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 47.4k | 4d ago | CLAUDE.md |
Frequently asked questions
- How do I install audit-permissions?
- Run
npx skills add malob/nix-config --skill audit-permissions. The install tabs above show the steps for each supported agent. - Which AI agents does audit-permissions work with?
- It is written for Claude Code, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is audit-permissions safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is audit-permissions still maintained?
- The repository was last updated about 2 months ago, so audit-permissions is actively maintained.
Skill content
View source on GitHubname: audit-permissions description: >- This skill should be used when the user asks to "audit claude permissions", "audit permissions", "review local claude settings", "promote permissions to global", "clean up claude settings", "find permission patterns", or wants to identify project-local Claude Code permissions that should be added to global configuration. allowed-tools:
Scripts
- Bash(/audit-permissions/scripts/)
- Bash(readlink *)
Global settings
- Read(~/.claude/settings.json)
- Edit(~/.claude/settings.json)
- Write(~/.claude/settings.json)
Local settings (per-project)
- Read(**/.claude/settings.local.json)
- Edit(**/.claude/settings.local.json)
- Write(**/.claude/settings.local.json)
User preferences
- Read(~/.claude/cc-maintenance.local.md)
- Edit(~/.claude/cc-maintenance.local.md)
- Write(~/.claude/cc-maintenance.local.md)
Policy detection
- Read(~/.claude/CLAUDE.md)
Audit Claude Permissions
Scan project-local Claude Code settings files, aggregate permission patterns, and recommend promotions to global configuration.
Workflow Overview
This audit runs in three phases, each as a separate task. Use TaskCreate at the start to create all three tasks, then work through them sequentially with user input via AskUserQuestion.
- Phase 1: Promote to Global — Requires user judgment. Present candidates, get decisions, apply to global config.
- Phase 2: Automated Redundancy Cleanup — Script-driven. After Phase 1 promotions, run cleanup script to remove local permissions now covered by global. Present for sanity-checking, then apply.
- Phase 3: Judgment Calls — Everything requiring user input: security hygiene, policy conflicts, one-off cruft, empty file deletion, moderate-risk items.
Initial Setup
- Check for symlinked global settings:
readlink -f ~/.claude/settings.json
If the global settings file is a symlink, note the real path. All writes to ~/.claude/settings.json must edit the symlink target, not create a new file that replaces the symlink.
-
Load user preferences from
~/.claude/cc-maintenance.local.md(if it exists). See User Preferences section below. Apply any configured defaults (risk tolerance, auto-cleanup preference). -
Read global CLAUDE.md from
~/.claude/CLAUDE.mdto identify tool preference policies for Phase 3 policy conflict detection. -
Run the discovery and extraction pipeline:
scripts/discover-settings.sh | xargs scripts/extract-permissions.py
-
Read the actual global settings from
~/.claude/settings.json— compare against the real allow list, not just the static examples in this skill. -
Create tasks for the three phases:
TaskCreate: "Review and promote permissions to global config"
TaskCreate: "Automated redundancy cleanup"
TaskCreate: "Judgment calls: security, policy, and cruft"
- Analyze the data and categorize permissions (see Categorization Rules below).
Phase 1: Promote to Global
Goal: Identify permissions worth adding to global config and get user approval.
Present Findings
Show a summary table of promotion candidates:
## Promotion Candidates
### Strong Recommendations (safe patterns, multiple projects)
| Permission | Projects | Suggested Global Pattern |
| ---------- | -------- | ------------------------ |
| ... | ... | ... |
### Moderate Recommendations (review carefully)
| Permission | Projects | Notes |
| ---------- | -------- | ----- |
| ... | ... | ... |
### Cross-Project File Patterns
[If any Read/Write/Edit permissions reference paths outside their project directory
and appear in multiple projects, flag them here. Example: multiple projects have
`Write(~/.config/some-tool/config.json)` - might indicate a shared config worth
adding globally.]
Get User Decision
Use AskUserQuestion to let the user decide:
Question: "Which permissions should I add to global settings?"
Options:
- "Add all strong recommendations"
- "Add strong + moderate recommendations"
- "Let me pick specific ones" (then list individually)
- "Skip - don't add any"
Apply Changes
If user approves additions:
- Add selected permissions to
~/.claude/settings.json(or symlink target) - Respect existing logical groupings (git, nix, gh, etc.)
- Sort alphabetically within groups
- Use space-syntax:
Bash(cmd *)notBash(cmd:*) - Mark Phase 1 task as completed
Phase 2: Automated Redundancy Cleanup
Goal: Remove local permissions now covered by global config. This is mechanical — the script identifies exact matches; user just sanity-checks the list.
Preview Cleanup
Run the cleanup script in dry-run mode:
scripts/discover-settings.sh | scripts/cleanup-redundant.py
Present Findings
Show what would be removed:
## Redundant Permissions
| File | Permissions to Remove | Remaining |
| --------- | --------------------- | --------- |
| project-a | 5 (ls _, grep _, ...) | 12 |
| project-b | 3 (gh api \*, ...) | 8 |
| ... | ... | ... |
**Total:** X permissions across Y files
The script also normalizes any remaining colon-syntax (Bash(cmd:*)) to space-syntax (Bash(cmd *)) when applying.
Get User Decision
If auto_cleanup_redundant: true in user preferences, skip the question and apply directly (still show the summary). Otherwise:
Question: "Should I remove these redundant permissions from local files?"
Options:
- "Yes, clean them up"
- "Show me the full list first"
- "Skip cleanup"
Apply Changes
If user approves:
scripts/discover-settings.sh | scripts/cleanup-redundant.py --apply
Mark Phase 2 task as completed.
Phase 3: Judgment Calls
Goal: Everything that requires real user judgment — security risks, policy conflicts, stale cruft, and cleanup opportunities. Present all categories together.
Category A: Security Hygiene
Flag permissions that match these patterns:
High Risk (recommend removal):
Bash(curl *),Bash(wget *)— network exfiltration riskBash(rm *)— can delete any fileBash(source *)— executes arbitrary scriptsBash(eval *)— arbitrary code execution
Moderate Risk (review):
Bash(git reset *),Bash(git checkout *)— can discard workBash(pkill *),Bash(kill *)— process terminationBash(python *),Bash(python3 *),Bash(node *)— arbitrary code (flag if user hasn't consciously chosen this)
Adjust what counts as "moderate" vs "high" based on the user's risk_tolerance preference if set.
Category B: Policy Conflicts
Read the user's global ~/.claude/CLAUDE.md for stated tool preferences. Flag local permissions that conflict with those policies.
How to detect: Look for patterns like "prefer X over Y", "use X instead of Y", "avoid Y". Then scan all local permissions for uses of the deprecated tool. For example:
If CLAUDE.md says "prefer tool X over built-in Y", flag all
Ypermissions across local settings as policy conflicts.
Present these as informational — the user may have valid reasons for specific overrides.
Category C: One-Off Cruft
- Hardcoded file paths (e.g.,
Bash(prettier --write /full/path/to/file.md)) - Incomplete shell constructs (
Bash(done),Bash(for file in *.rs)) - Very specific commands with no wildcards that look like debugging artifacts
- Duplicate entries
- Legacy colon-syntax permissions (
Bash(cmd:*)) that weren't caught by the cleanup script (e.g., ones without a global equivalent)
Category D: Cross-Project File Access
Read,Write, orEditpermissions for paths outside the project- Flag if the same external path appears in multiple projects (potential global candidate)
- Flag broad patterns like
Write(~/.config/*)as security concerns
Category F: MCP Tool Permissions
- Flag MCP tools with write/send/delete capabilities (message sending, data deletion, post creation) — these have side effects beyond the local environment
- Flag server-wide wildcards (
mcp__server__*) — convenient but auto-permits any future tools added to that server without review - Suggest consolidation: if all or most tools from a server are individually listed, suggest replacing with the server wildcard (with a note about the trade-off)
Category E: Empty File Deletion
After cleanup, identify settings files where:
- All permissions have been removed (empty allow list or no allow list)
- No other settings exist (no hooks, enabledPlugins, etc.)
Offer to delete these empty files entirely — they serve no purpose.
Present Findings
## Judgment Calls
### Security Hygiene
#### High Risk — Recommend Removal
| Permission | Project | Risk |
| -------------- | --------- | ----------------- |
| `Bash(curl *)` | project-x | Data exfiltration |
#### Moderate Risk — Review
| Permission | Project | Risk |
| ---------- | ------- | ---- |
| ... | ... | ... |
### Policy Conflicts
| Permission | Projects | Policy |
| --------------- | -------- | --------------------------- |
| `WebFetch(url)` | 3 | CLAUDE.md: prefer Firecrawl |
### One-Off Cruft
| Permission | Project |
| -------------------------------------------------- | --------- |
| `Bash(prettier --write /path/to/specific/file.md)` | project-y |
### External File Access
| Permission | Projects | Notes |
| ------------------------------ | ---------- | ------------------------------- |
| `Write(~/.config/tool/config)` | 3 projects | Shared config — consider global |
| `Edit(/etc/hosts)` | 1 project | System file — review necessity |
### MCP Tool Permissions
| Permission | Projects | Notes |
| -------------------------- | -------- | ------------------------------------------- |
| `mcp__slack__post_message` | 2 | Side effect: sends messages externally |
| `mcp__puppeteer__*` | 1 | Server wildcard — auto-permits future tools |
### Empty Settings Files
| File | Reason |
| ----------------------------------------- | ------------------------------------------ |
| `~/project-z/.claude/settings.local.json` | All permissions removed, no other settings |
Get User Decision
Use AskUserQuestion:
Question: "How should I handle the judgment call items?"
Options:
- "Remove all flagged items"
- "Remove high risk + cruft only"
- "Let me review each category"
- "Skip — keep everything"
If user wants to review categories, ask about each separately.
Apply Changes
Edit each affected settings.local.json to remove approved items. Delete empty settings files if approved.
Mark Phase 3 task as completed.
Session Wrap-Up
After all phases complete, offer to create or update ~/.claude/cc-maintenance.local.md with session learnings. Include:
- Any risk tolerance preferences expressed during the session
- Tool preference notes mentioned during review
- Freeform notes from user decisions (overrides, exceptions, per-project rules — anything the user said that should carry forward to future audits)
- Session history entry (date, summary of changes)
User Preferences
Location: ~/.claude/cc-maintenance.local.md
Read at audit start. If missing, proceed with defaults. At session end, offer to create/update.
Format: YAML frontmatter for structured preferences + markdown body for freeform notes.
---
# All preferences are optional
risk_tolerance: moderate # conservative | moderate | aggressive
auto_cleanup_redundant: true
---
## Tool Preferences
- Prefer Exa/Firecrawl over built-in WebSearch/WebFetch
## Risk Notes
- sq
Truncated for display — read the full file on GitHub.
Related Skills
taste-skill
118.3kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
hyperframes
86.4kAI video you can actually edit. HyperFrames is a free, open-source AI video editor. Describe any video and get a real project you can change down to the frame.
ai-job-search
72.4kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
47.4kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
