Skip to content

Instantly share code, notes, and snippets.

@PaoloConte
PaoloConte / Claude Code - Auto allow some command patterns.md
Last active March 11, 2026 17:23
Claude Code - Auto allow some command patterns

custom-permissions.sh

A Claude Code PreToolUse hook that auto-approves Bash commands matching a safe allowlist, skipping the permission prompt.

Allowed patterns

Commands: ./gradlew · tail · head · cat · grep · echo

These can be combined freely with pipes (|), chaining (&&), and timeout prefixes. Anything else falls through to the normal permission prompt — nothing is ever blocked.

@PaoloConte
PaoloConte / Claude Code statusline with plan summary.md
Last active March 8, 2026 11:34
Claude Code statusline with plan summary

This gist presents a configuration for the Claude Code statusline that shows:

  • A summary of the current plan
  • Current directory and git branch
  • Model
  • Context usage

Works on MacOs