agentleFS
mlz11mlz11/ClaudeNotifier/CLAUDE.md

ClaudeNotifier

CLAUDE.md36 starsChanged 10 months agoMITView on GitHub

ClaudeNotifier is a macOS notification app for Claude Code integration. It displays native macOS notifications with Claude's icon, with smart suppression when the user is actively viewing the Claude terminal tab. Clicking a notification focuses the terminal that triggered it. Run make setup after cloning to install git hooks. On each commit: - SwiftFormat auto-formats staged Swift files - SwiftLint checks for violations (strict mode) - Conventional commits validates commit message format Commit messages must follow Conventional Commits: Multi-file Swift…

The file

We split this CLAUDE.md into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run make setup after cloning to install git hooks.

    line 24
  2. Distinctive:

    Commit messages must follow Conventional Commits:

    line 29
  3. Very specific:

    Never use em dashes (—) or spaced hyphens ( - ) as punctuation.

    line 88

≈ “Common” is an estimate: at least 1 in 5 of the 29,248 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

ClaudeNotifier is a macOS notification app for Claude Code integration. It displays native macOS notifications with Claude's icon, with smart suppression when the user is actively viewing the Claude terminal tab. Clicking a notification focuses the terminal that triggered it.

Build Commands

make build      # Compile, bundle as .app, and codesign to build/ClaudeNotifier.app
make install    # Build + install to /Applications + create CLI at ~/.local/bin/claude-notifier
make uninstall  # Remove app and CLI symlink
make clean      # Remove build directory
make icons      # Generate icon variants from assets/icon.svg (requires librsvg)
make lint       # Run SwiftLint
make format     # Run SwiftFormat
make setup      # Install pre-commit hooks

Pre-commit Hooks

Run make setup after cloning to install git hooks. On each commit:

  • SwiftFormat auto-formats staged Swift files
  • SwiftLint checks for violations (strict mode)
  • Conventional commits validates commit message format

Commit messages must follow Conventional Commits:

feat: add new feature
fix: resolve bug
docs: update readme
chore: update dependencies

Architecture

Multi-file Swift application using AppKit and UserNotifications frameworks.

File structure:

Sources/ClaudeNotifier/
├── main.swift           # Entry point - parses args, configures and runs NSApplication
├── Constants.swift      # Shared constants (paths, keys, defaults)
├── Models.swift         # Data structures (NotificationConfig, ParsedArguments)
├── AppDelegate.swift    # NSApplicationDelegate + UNUserNotificationCenterDelegate
├── Setup.swift          # Setup command + embedded notify.sh script
├── Doctor.swift         # Doctor command - diagnoses installation and permission issues
├── Config.swift         # AppConfig model + persistence (load/save config.json)
├── ConfigCommand.swift  # Config command - interactive TUI for preferences
├── TUI.swift            # Raw terminal input + menu rendering for interactive config
├── Icon.swift           # Icon variant utilities (used by ConfigCommand and Doctor)
├── Update.swift         # Update command + version check
├── ArgumentParser.swift # CLI flag parsing and help text
└── Utilities.swift      # Helpers (exitWithError, terminateApp, focusTerminalSession)

Key components:

  • Constants: Centralized magic strings (claudeDirectory, sessionIdKey, etc.)
  • Models: NotificationConfig and ParsedArguments data structures
  • AppDelegate: Handles notification display, authorization, and click responses
  • Setup: Embedded notify.sh script + functions to configure ~/.claude/settings.json hooks
  • Doctor: Checks installation, hooks, permissions, and PATH configuration
  • Config: AppConfig model with icon/sound fields, JSON persistence to ~/Library/Application Support/ClaudeNotifier/config.json
  • ConfigCommand: Interactive TUI for configuring icon color and notification sound
  • TUI: Raw terminal mode handling, arrow key navigation, and menu rendering
  • Icon: IconVariant enum, getCurrentVariant(), setVariant(), and helper functions for icon switching
  • Update: Version check via GitHub API, brew upgrade integration, doctor version check
  • ArgumentParser: Parses -t, -s, -m, -i flags and setup/doctor/config/update/help subcommands
  • Utilities: exitWithError(), terminateApp(), focusTerminalSession(), TerminalType enum

Entry flow: Parse args → configure NSApplication → show notification (if -m provided) → handle notification click → focus terminal → exit

CLI Usage

claude-notifier -m "Message" -t "Title" -s "Subtitle"
claude-notifier -m "Message" -i "$ITERM_SESSION_ID"  # With session ID for focus-on-click
claude-notifier setup         # Auto-configure Claude Code hooks
claude-notifier doctor        # Diagnose installation and permission issues
claude-notifier config        # Configure preferences (icon, sound) interactively
claude-notifier update        # Check for updates and upgrade via Homebrew

Writing Style

  • Never use em dashes (—) or spaced hyphens (-) as punctuation. Use commas, colons, or parentheses instead.

Technical Notes

  • Requires macOS 11.0+
  • Uses native frameworks: AppKit, UserNotifications
  • Makefile uses swiftc directly (not full SPM build) for the app bundle
  • App is ad-hoc codesigned during build
  • Runs as LSUIElement (no dock icon)
  • Requires Automation permission for iTerm2 and Terminal.app (prompted on first notification click)
  • IDE editors (VS Code, Cursor, Windsurf, Zed) use Launch Services for focus — no Automation permission needed

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.