agentleFS
timdevaitimdevai/proteus/skills/permission-auditor/SKILL.md

permission-auditor

Skill1 starsChanged 5 months agoMITView on GitHub

Reviews your .claude/settings.json for overpermissive allowlists, missing denylists, and known-risky tool combos. Suggests safer defaults. Trigger phrases: audit my settings, audit permissions, safer claude, /audit-perms, am I too permissive. Auto-activate the FIRST time the user runs Claude Code in a fresh repo (no .claude/settings.json present) — offer to scaffold a safe default. If any of these are missing, the auditor refuses to skip them:

  • Reads credentials
  • Deletes or force-pushes
  • Commits and pushes

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 4 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    No deny on .env, *.key, *.pem, id_rsa*

    line 21
  2. Very specific:

    No deny on ~/.aws/, ~/.ssh/, ~/.kube/

    line 22
  3. Very specific:

    No deny on /secrets/

    line 23
  4. Distinctive:

    No PreToolUse hook to log bash commands

    line 28
  5. Distinctive:

    No Stop hook (you lose session metadata)

    line 29
  6. Very specific:

    No safety net for WebFetch to internal URLs

    line 30
  7. Very specific:

    Read .claude/settings.json (project) and ~/.claude/settings.json (user)

    line 63
  8. Distinctive:

    Run rule checks above

    line 65
  9. Distinctive:

    If any of these are missing, the auditor refuses to skip them:

    line 89

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

permission-auditor

Reviews your .claude/settings.json for overpermissive allowlists, missing denylists, and known-risky tool combos. Suggests safer defaults.

When to activate

Trigger phrases: audit my settings, audit permissions, safer claude, /audit-perms, am I too permissive.

Auto-activate the FIRST time the user runs Claude Code in a fresh repo (no .claude/settings.json present) — offer to scaffold a safe default.

What it checks

Allowlist issues

  • Wildcard Bash(*) — too broad, suggest tightening
  • Bash(rm -rf*) allowed — dangerous
  • Bash(curl|wget*) allowed without URL scope — data exfil risk
  • Write(*) allowed across entire filesystem — should scope to project
  • Edit(*) outside project root — same

Denylist gaps

  • No deny on .env, *.key, *.pem, id_rsa*
  • No deny on ~/.aws/, ~/.ssh/, ~/.kube/
  • No deny on **/secrets/**
  • No git push --force deny
  • No rm -rf / style deny

Hook gaps

  • No PreToolUse hook to log bash commands
  • No Stop hook (you lose session metadata)
  • No safety net for WebFetch to internal URLs

Output

Permission audit: .claude/settings.json
======================================

Allowlist (8 rules):
✓ Bash(npm install:*)         - scoped
✓ Bash(npm run *)             - scoped
⚠ Bash(*)                     - TOO BROAD. Tighten to specific allowed commands.
⚠ Write(*)                    - no path scope. Limit to project root.

Denylist (2 rules):
⚠ Missing: Read(./.env)
⚠ Missing: Read(./id_rsa*)
⚠ Missing: Bash(git push --force*)
⚠ Missing: Bash(rm -rf /*)

Hooks: none configured.
Recommend at minimum:
- PreToolUse: log Bash commands to a session file
- Stop: sync this conversation to your vault

Suggested patches: (apply with /audit-perms apply)
- Add 4 deny rules above
- Replace Bash(*) with: Bash(npm:*), Bash(git:*), Bash(python:*), Bash(pytest:*)
- Add the two hooks

Process

  1. Read .claude/settings.json (project) and ~/.claude/settings.json (user)
  2. Parse allow/deny/hook arrays
  3. Run rule checks above
  4. Score: 0-100 safety score
  5. Generate suggested patch as a JSON diff
  6. Offer to apply

Inputs

  • Project .claude/settings.json
  • User-level ~/.claude/settings.json
  • Project file tree (to scope Write/Edit rules)

Outputs

  • Audit report (markdown)
  • Suggested JSON patch
  • One-line summary (e.g. "Safety score: 62/100. 4 issues, 2 critical.")

Slash command

  • /audit-perms — run the audit
  • /audit-perms apply — apply the suggested patches

Critical issues that block apply

If any of these are missing, the auditor refuses to skip them:

  • Deny on Read(./.env*) and Read(./*.key)
  • Deny on Bash(rm -rf /)
  • Deny on Bash(git push --force* main) / master

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.