Skip to content

noahlz/claude-code-config

Repository files navigation

claude-code-config

My Claude Code configuration, shared publicly for reference. Includes install script and tests suite.

Unit Tests

Philosophy

Keep CLAUDE.md minimal - a set of focused rules beats a sprawling prompt.

Use hooks, not prompt instructions. Hard rules belong in hooks, not "reminders" to the LLM. Hooks are enforced mechanically. Instructions are mere suggestions that waste context (and tokens!).

Cross-platform notifications for long tasks. Do you scroll the Internet while Claude is working? Have Claude send a notification when a long-running turn completes. Configurable with CLAUDE_NOTIFICATION_THRESHOLD (default 120 seconds) and CLAUDE_NOTIFICATION_METHOD (default say; use notification for visual popups).

Terse output style Use flat language, avoid synchopatic filler phrases ("Great idea!", "You're absolutely right!"). Summarize edits concisely. Less noise, direct feedback.

Hooks

Behaviors enforced by hooks:

  • Hard block destructive commands such as rm -rf and drop table users
  • Send notifications at the end of long-running turns (default: 120 seconds)
    • macOS: uses say (audio) by default; set CLAUDE_NOTIFICATION_METHOD=notification for visual popups via osascript
    • Windows: uses PowerShell BurntToast if available; silently skipped otherwise
    • Linux: silently skipped (no built-in notification tool assumed)

Installation

⚠️ WARNING⚠️ Do not clone and install this directly!

The install script halts if you are not me.

If you want to use it:

  1. Fork this repo
  2. Review and customize settings.hooks.json, CLAUDE-user.md, and the hook scripts for your own setup
  3. Edit install.sh to check for your own username instead of noahlz
  4. Run ./install.sh from your fork

Running someone else's Claude Code config without reviewing it first is a bad idea — hooks run automatically and can have broad system access.

Prerequisites

  • Node.js >= 18 (installation and test suite)
  • macOS, Windows, or Linux (notifications are cross-platform)

Installation Instructions

git clone https://github.com/noahlz/claude-code-config.git
cd claude-code-config
./install.sh

The script creates symlinks into your ~/.claude/ (Claude user home) into files in the repo. If a file already exists at a target path, it is backed up as <filename>.bak before being replaced. Running it again on already-linked files is safe — those are silently skipped.

Testing

This project has executable code...so we need unit tests!

  • npm test - Test hook scripts
  • npm run test:integration - Test hooks via claude -p --model haiku
  • npm run test:all

NOTE: Integration tests require an Anthropic API key and use real tokens!

Inspiration

I (with Claude) completely re-wrote my user-level CLAUDE.md after watching these two videos by Matt Pocock:

"Never Run claude /init"
Never Run claude /init

"How to actually force Claude Code to use the right CLI (don't use CLAUDE.md)"
How to actually force Claude Code to use the right CLI (don't use CLAUDE.md)

Check them out!

License

MIT License

About

My Claude Code global config, prompt, output style and custom hooks.

Resources

License

Stars

Watchers

Forks

Contributors