بنقرة واحدة
analyze-permissions
Analyze accumulated permissions and suggest smart wildcard patterns
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Analyze accumulated permissions and suggest smart wildcard patterns
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Identify unlabeled GitHub issues and external PRs that may belong to a specific team, and normalize conventional title scopes to the team's canonical short form
Generate standup notes from GitHub PR activity
Monitor CI checks after pushing, detect flaky vs legit failures, and auto-fix
Reference for GitHub PR review endpoints and resolving review threads via gh CLI. Use when replying to a PR review comment, posting a new review comment, or resolving review threads.
PostHog repo-specific workflow, database access rules, production architecture notes, and SDK repository locations. Use when working in posthog/posthog or any PostHog SDK repo.
Plan, implement, and iteratively review a task end-to-end using Claude + Copilot reviewers in a linear flow.
| name | analyze-permissions |
| description | Analyze accumulated permissions and suggest smart wildcard patterns |
| argument-hint | ["analyze|apply|cleanup"] |
| disable-model-invocation | true |
| model | sonnet |
Analyze accumulated permissions in settings.local.json and suggest smart wildcard patterns to add to the shared configuration.
analyze (default), apply, or cleanupExample invocations:
/analyze-permissions → analyze and suggest patterns/analyze-permissions apply → apply suggested patterns to shared config/analyze-permissions cleanup → just run the cleanup scriptRead these files:
<project-root>/.claude/settings.local.json - accumulated "Always allow" permissions (per-project, not at ~/.claude/)~/.claude/settings.json - shared/base permissions managed by the configure script~/.dotfiles/ai/configure-tool-permissions.sh - canonical source for global permissionsNote: 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.
For each entry in settings.local.json:
Check if already covered - Is there a wildcard in settings.json that covers this?
Bash(git commit -m "Fix bug") is covered by Bash(git commit:*)Bash(curl https://api.example.com) is covered by Bash(curl:*)Identify pattern opportunities - Group similar commands:
kubectl commands → suggest Bash(kubectl:*)docker commands → suggest Bash(docker:*)WebFetch(https://example.com/*)Decide global vs local - Where should the pattern live?
npx, python, docker compose, etc.)git push for a personal repo)Assess safety - Consider if the pattern is safe for auto-approval:
Output a structured report:
## Permission Analysis
### Settings Overview
- settings.local.json: X entries
- settings.json: Y entries (Z wildcards)
### Already Covered (can be removed)
These entries in settings.local.json are redundant:
| Entry | Covered by |
|-------|------------|
| Bash(git commit -m "...") | Bash(git commit:*) |
### Suggested New Patterns
These patterns would consolidate multiple specific entries:
| Pattern | Covers | Safety |
|---------|--------|--------|
| Bash(kubectl:*) | 4 entries | ✅ Safe (read-heavy) |
| Bash(docker exec:*) | 3 entries | ⚠️ Review (can modify) |
### Uncategorized
These entries don't fit a pattern (one-offs):
- Bash(some-specific-command)
Based on the action argument:
analyze (default):
apply:
configure-tool-permissions.sh in the PERMISSIONS_CONFIG sectioncleanup:
~/.claude/skills/analyze-permissions/scripts/cleanup-settings-local.shWhen adding patterns to configure-tool-permissions.sh:
PERMISSIONS_CONFIG JSON arrayif statement so the script knows to re-run~/.dotfiles/ai/configure-tool-permissions.sh~/.dotfiles/ai/skills/analyze-permissions/scripts/cleanup-settings-local.shImportant: 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.
Safe to auto-approve (commonly needed):
Bash(npx:*), Bash(node:*), Bash(npm:*), Bash(pnpm:*) - JS/Node toolingBash(python:*), Bash(python3:*), Bash(pip:*) - Python toolingBash(cargo :*), Bash(cd :* && cargo:*) - Rust toolingBash(docker compose:*), Bash(docker ps:*) - DockerBash(kubectl get:*), Bash(kubectl describe:*) - K8s read operationsBash(git:*) subcommands (add, commit, log, diff, etc.)Bash(gh:*) read operations (pr view, issue list, api, etc.)Bash(chmod:*), Bash(ln:*), Bash(wc:*), Bash(which:*) - basic utilitiesBash(ssh:*), Bash(tmux:*), Bash(bash:*), Bash(zsh:*) - shell/systemWebFetch(domain:*), WebSearch - web accessRequire review (side effects):
Bash(kubectl delete:*), Bash(kubectl apply:*)Bash(docker rm:*), Bash(docker exec:*)Bash(aws s3 rm:*)Bash(rm:*), Bash(mv:*)Bash(git push:*) - consider keeping per-project in local settingsNever auto-approve:
Bash(sudo:*)Bash(chmod 777:*)