Claude Permissions Auditor
hui-zheng/claude-permissions-auditor
Audita e sincroniza permissões do Claude Code em múltiplos worktrees
Ver no GitHubPlugin que audita e sincroniza configurações de permissões em settings.local.json, detectando regras redundantes, anti-padrões, gaps de segurança e inconsistências entre worktrees. Funciona sem configuração inicial, com suporte a customização por projeto via arquivo .permissions-auditor.yml.
Instalação
npx convez-ai hui-zheng/claude-permissions-auditor1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Validar qualidade de regras de permissão em projetos Claude Code
- Detectar anti-padrões e gaps de segurança em configurações
- Sincronizar settings entre diferentes git worktrees automaticamente
- Manter consistência de permissões em equipes e ambientes
Veredito

Ferramenta especializada e bem-pensada para quem trabalha com Claude Code em projetos sérios. Resolve um problema real (drift de configurações e segurança) com detecção inteligente de anti-padrões e suporte a zero-config, mas tem escopo muito específico.
README
A tradução para o português deste README ainda está na fila.
claude-permissions-auditor
A Claude Code plugin that audits and syncs settings.local.json for rule quality, anti-patterns, and worktree drift. Works out-of-the-box with zero configuration, and supports project-specific customization via a companion .permissions-auditor.yml file.
Install
claude plugin add hui-zheng/claude-permissions-auditor
Or install from a local clone:
git clone https://github.com/hui-zheng/claude-permissions-auditor.git
claude plugin add ./claude-permissions-auditor
Quick Start
Audit your settings
/permissions-auditor audit
Checks for:
- Redundant rules — wildcards that already cover specific subcommands
- Duplicate rules — exact duplicates in allow or deny lists
- Anti-patterns —
Bash(grep:*),Bash(find:*),Bash(cat:*)(Claude has dedicated tools) - Malformed rules — missing closing parens, wrong separators
- Missing rules — tools referenced in
CLAUDE.mdwithout allow rules - Deny gaps — destructive operations not explicitly denied (force push, push to main/master)
- Worktree drift — settings differences across git worktrees (if worktrees exist)
Sync across worktrees
/permissions-auditor sync
Copies the current directory's settings.local.json to all other worktrees, with diff preview and confirmation for each.
Configuration
For project-specific checks, create a .permissions-auditor.yml in your project root:
# Tools your project uses (checked for missing allow rules)
tools:
- name: poetry
description: Python dependency management
- name: make
description: Build system
# Category ordering for organized settings (optional)
categories:
allow:
- name: "Build tools"
patterns: ["poetry", "make"]
- name: "Git"
patterns: ["git"]
deny:
- name: "Destructive build"
patterns: ["make clean"]
- name: "Destructive git"
patterns: ["push*--force", "push*origin*main"]
# Additional deny gap checks beyond universal protections
deny_gaps:
- pattern: "make rules-clean"
reason: "Runs git reset --hard, destroys uncommitted work"
Without this file, the auditor works in zero-config mode — it scans CLAUDE.md for tool references and applies universal checks only.
Universal Checks (always active)
These checks run regardless of whether a config file exists:
| Check | What it catches |
|---|---|
| Redundant rules | Bash(git status:*) when Bash(git:*) exists |
| Duplicates | Exact duplicate entries in allow/deny |
| Anti-patterns | Bash(grep:*), Bash(find:*), Bash(cat:*) |
| Malformed rules | Missing ), wrong separators |
| Deny gaps | Force push, push to main/master, rm -rf |
| Worktree drift | Settings differences across worktrees |
Examples
See examples/ for sample configurations:
.permissions-auditor.yml— Python/dbt project with poetry and database toolsnodejs.permissions-auditor.yml— Node.js project with npm, testing frameworksgo.permissions-auditor.yml— Go microservice with Docker, Kubernetes
Sample Audit Output
## Permissions Audit Report
**Settings:** .claude/settings.local.json
**Allow rules:** 24 | **Deny rules:** 8
### Issues Found
**Redundant rules (2):**
- `Bash(git status:*)` — covered by `Bash(git:*)`
- `Bash(git diff:*)` — covered by `Bash(git:*)`
**Anti-patterns (1):**
- `Bash(grep:*)` — use the dedicated Grep tool instead
**Deny gaps (1):**
- Missing: `Bash(git*push*--force*)` — force push should be denied
### Worktree Comparison
| Rule | ./project | ./project-b | ./project-c |
|------|-----------|-------------|-------------|
| Bash(aws:*) | Y | Y | N |
| Bash(docker:*) | Y | N | N |
Design Principles
- Prefer wildcards over subcommand lists —
Bash(git:*)not 10 individual git subcommands - Don't allow what Claude has dedicated tools for — Grep, Glob, Read exist for a reason
- Deny destructive operations explicitly — allow rules alone aren't sufficient
- Use glob patterns in deny rules —
Bash(git*push*--force*)catches variants - Group related rules by category — easier to review and maintain
- Include MCP tools by full name —
mcp__server__tool_name, not abbreviated
Contributing
Contributions welcome! Areas of interest:
- Additional example configs for other tech stacks
- New universal anti-pattern checks
- Improved CLAUDE.md tool discovery heuristics
Please open an issue to discuss before submitting a PR.
License
MIT