Agent skill
permission-tuner
Analyze permission denial patterns and generate optimized alwaysAllow and alwaysDeny rules. Use when permission prompts are slowing you down or after sessions with many denials.
Install this agent skill to your Project
npx add-skill https://github.com/rohitg00/pro-workflow/tree/main/skills/permission-tuner
SKILL.md
Permission Tuner
Reduce permission prompt fatigue by analyzing denial patterns and suggesting targeted rules.
Trigger
Use when:
- Permission prompts interrupt flow repeatedly
- Starting a new project and want to configure permissions
- After a session with many manual approvals
Workflow
- Scan recent session data for permission patterns
- Identify frequently-approved tools and patterns
- Generate safe
alwaysAllowrules - Present rules for approval before applying
Analysis
Step 1: Gather Permission Data
Check current permission rules:
cat .claude/settings.json 2>/dev/null | grep -A 20 "permissions"
cat ~/.claude/settings.json 2>/dev/null | grep -A 20 "permissions"
Step 2: Identify Safe Patterns
Auto-approve candidates (low risk):
Read— all file reads (read-only, no side effects)Glob— file pattern matching (read-only)Grep— content search (read-only)Bash(git status)— read-only git commandsBash(git diff*)— read-only git commandsBash(git log*)— read-only git commandsBash(npm test*)— test executionBash(npm run lint*)— lintingBash(npm run typecheck*)— type checking
Ask candidates (medium risk — auto-approve only if user confirms):
Edit— file modificationsWrite— new file creationBash(git add*)— staging changesBash(git commit*)— creating commitsBash(npm install*)— dependency changes
Never auto-approve (high risk):
Bash(git push*)— affects remoteBash(git reset --hard*)— destructiveBash(rm -rf*)— destructiveBash(curl*POST*)— external API calls- Any command with
--forceor--no-verify
Step 3: Generate Rules
{
"permissions": {
"allow": [
"Read",
"Glob",
"Grep",
"Bash(git status)",
"Bash(git diff*)",
"Bash(git log*)",
"Bash(npm test*)",
"Bash(npm run lint*)",
"Bash(npm run typecheck*)"
],
"deny": [
"Bash(rm -rf *)",
"Bash(git push --force*)",
"Bash(git reset --hard*)"
]
}
}
Output
PERMISSION TUNER REPORT
Current rules: [X] allow, [Y] deny, [Z] ask
Recommendations:
Auto-approve (safe, read-only):
+ Read, Glob, Grep
+ Bash(git status), Bash(git diff*), Bash(git log*)
Auto-approve (medium risk, frequently used):
+ Edit (approved X times this session)
+ Bash(npm test*) (approved X times)
Keep asking:
~ Bash(git commit*) — verify commit messages
~ Write — verify new file creation
Auto-deny (dangerous):
- Bash(rm -rf *)
- Bash(git push --force*)
Estimated prompts saved per session: ~[N]
Rules
- Never auto-approve destructive operations
- Always present rules for user approval before applying
- Group rules by risk level (safe/medium/dangerous)
- Include estimated prompt savings
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
auto-setup
Auto-configure quality gates, hooks, and settings for a new project. Detects project type and sets up appropriate tooling. Use when onboarding a new codebase.
agent-teams
Coordinate multiple Claude Code sessions as a team — lead + teammates with shared task lists, mailbox messaging, and file-lock claiming. Patterns for team sizing, task decomposition, and when to use teams vs sub-agents vs worktrees.
wrap-up
End-of-session ritual that audits changes, runs quality checks, captures learnings, and produces a session summary. Use when saying "wrap up", "done for the day", "finish coding", or ending a coding session.
file-watcher
Configure file watching hooks to auto-react to config changes, env file updates, and dependency modifications. Use to set up reactive workflows.
compact-guard
Smart context compaction with state preservation. Saves critical files, task progress, and working state before compaction, restores after. Use before manual compact or when auto-compact triggers.
safe-mode
Prevent destructive operations using Claude Code hooks. Three modes — cautious (warn on dangerous commands), lockdown (restrict edits to one directory), and clear (remove restrictions). Uses PreToolUse matchers for Bash, Edit, and Write.
Didn't find tool you were looking for?