Skip to content

ironexdev/my-claude

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Claude

A personal collection of Claude Code configuration: hooks, settings, and the tests that cover them. Drop the contents into a project's .claude/ directory (or your user-level ~/.claude/) to use it.

Usage

Copy .claude/settings.json and .claude/hooks/ into the target project, then mark the hooks executable:

chmod +x .claude/hooks/*

settings.json wires up the hooks below. Claude Code picks them up the next time it starts.

Hooks

Secret Guard - keep secrets out of the model

A PreToolUse hook that fires on every tool call and denies (exit 2) anything that could leak secret material back into the conversation.

Covered out of the box: dotenv, direnv, Ansible Vault, Composer (auth.json), Magento (app/etc/env.php), PostgreSQL / MySQL / MariaDB / AWS credentials, and generic *_TOKEN / *_PASSWORD / *_KEY / *_SECRET / *_JWT env vars.

What it blocks:

  • Read / Edit / Write / NotebookEdit targeting sensitive paths: .env, .env.local, .env.production, env.secret, .envrc, files under secrets/, ansible-vault files, etc.
  • Bash commands referencing those same paths.
  • Bash echo/printenv/env/set/export -p on variables whose names look like secrets (*_TOKEN, *_PASSWORD, *_KEY, AWS_ACCESS_KEY_ID, PGPASSWORD, ...)
  • Bash ansible-vault view|decrypt|edit|rekey|decrypt_string

Configure it by editing the arrays at the top of the script: secret_suffixes, secret_exact_vars, and secret_path_re. Anything that does not touch those targets passes through untouched.

Stop notification - know when Claude is done

A Stop hook that fires a desktop notification each time Claude finishes a turn. Handy when you let it run a long task in the background.

The script auto-detects your OS via uname -sr and dispatches to the right notifier.

Requirements per OS:

  • macOS - osascript (preinstalled, nothing to do).
  • WSL - install wsl-notify-send and put wsl-notify-send.exe on your PATH. Notifications show up in the Windows Action Center.
  • Native Linux - notify-send from libnotify, plus a running notification daemon (most desktop environments ship one; headless servers do not).
    • Debian/Ubuntu: apt install libnotify-bin
    • Fedora/RHEL: dnf install libnotify
    • Arch: pacman -S libnotify

Tests

Hook behavior is covered by a bats suite under tests/.

npm ci          # install bats locally
npm test        # run tests/

About

A collection of Claude Code configuration/helpers.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages