[Community] Bark: AI-powered permission hook — free alternative to Auto Mode
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
When running multiple Claude Code sessions in parallel, the constant permission prompts ("Can I read this file?", "Can I run ls?") create significant friction. Users have to constantly switch between terminals to click "Allow".
The current options have trade-offs:
- Default mode: Asks permission for everything — constant interruptions
-yflag: Auto-allows file edits, but still prompts for every Bash command--permission-mode auto: Rule-based classifier, but requires Team plan and uses static pattern matching--dangerously-skip-permissions: Allows everything with zero safety
There's no middle ground for Free/Pro users who want intelligent, AI-powered permission management without paying for a Team plan.
Proposed Solution
I built Bark — a community hook that uses AI to assess every tool call's risk level. It leverages Claude Code's existing hooks system.
How Bark works:
- Layer 1 — Fast Rules: Deterministic checks. Read/Grep/Glob/file edits → instant allow (0ms)
- Layer 2 — Custom Rules: User-defined patterns in
bark.conf(allow/notify/block) - Layer 3 — Cache Lookup: Normalized command patterns with 24h TTL. Same pattern = 0ms
- Layer 4 — AI Assessment: Uses
claude -pfor semantic risk understanding. Result cached
Risk Levels:
- Level 0 (Low): Silent allow — reads, builds, tests
- Level 1 (Medium): System notification + auto allow — package installs, git push
- Level 2 (High): Notification + sound + terminal confirmation — rm -rf, force push, DB drops
Key features:
- Smart caching (24h TTL, repeated patterns = 0ms latency)
- Custom rules via
bark.conf - CLI tools:
bark stats,bark log,bark cache,bark test <cmd> - macOS & Linux system notifications
- One-line install:
curl -fsSL https://raw.githubusercontent.com/shaominngqing/Bark/main/install.sh | bash
I'd love to see this kind of AI-powered permission assessment considered for the hooks ecosystem or even integrated into Claude Code's official plugin directory.
Alternative Solutions
--dangerously-skip-permissions: Works but removes all safety. Not recommended for production.- Auto Mode (Team plan): Good but not available to Free/Pro users, no caching, no custom rules, static pattern matching.
hookifyplugin: Lets you create hooks to prevent unwanted behaviors, but doesn't provide intelligent risk assessment.- Manual approval: The default experience — functional but slow and disruptive.
Priority
Medium - Would be very helpful
Feature Category
Configuration and settings
Use Case Example
- I open 3 Claude Code sessions to work on different parts of a project
- I tell Claude: "fix the login bug and push the changes"
- Claude starts working — reads files, greps for functions, edits code
- Without Bark: Every Read, Grep, Edit triggers a permission prompt. I'm clicking "Allow" constantly
- With Bark: Read/Grep/Glob auto-allowed (0ms). File edits auto-allowed. When Claude runs
git push, I get a macOS notification. When it triesgit reset --hard HEAD~5, Bark blocks it and asks for confirmation - I can actually go make coffee while Claude works ☕
Additional Context
- GitHub repo: https://github.com/shaominngqing/bark-claude-code-hook
- Demo video: Available in the repo README
- License: MIT
- Compatibility: Works with Claude Code's existing hooks system, no modifications needed
- Design philosophy: No hardcoded Bash rules — AI understands command semantics better than regex. Cache ensures zero latency for repeated patterns.
I'm happy to adapt the project to better fit the Claude Code ecosystem, and I'd be glad to contribute it as an official community plugin if the team is interested.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗