npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@sammons/claude-good-hooks

v2.0.0

Published

CLI for managing Claude Code hooks

Readme

@sammons/claude-good-hooks

npm version License: MIT

A comprehensive CLI tool for managing Claude Code hooks. Create, share, and apply powerful automation hooks to enhance your Claude Code development experience.

Installation

Global Installation (Recommended)

npm install -g @sammons/claude-good-hooks

Local Installation

npm install @sammons/claude-good-hooks

Quick Start

# Install the CLI globally
npm install -g @sammons/claude-good-hooks

# Check available commands
claude-good-hooks help

# List available hooks
claude-good-hooks list-hooks

# Apply a hook globally
claude-good-hooks apply dirty --global

# Check system health
claude-good-hooks doctor

Commands

Core Commands

| Command | Description | Example | |---------|-------------|---------| | help [command] | Show help for all commands or a specific command | claude-good-hooks help apply | | list-hooks [options] | List available hooks with filtering options | claude-good-hooks list-hooks --installed | | apply <hook-name> [options] | Apply a hook to global, project, or local scope | claude-good-hooks apply dirty --global | | doctor | Run system diagnostics and health checks | claude-good-hooks doctor | | version | Show version information | claude-good-hooks version |

Hook Management

| Command | Description | Example | |---------|-------------|---------| | update [hook-name] | Update hooks to latest versions | claude-good-hooks update | | init [template] | Initialize hook configuration | claude-good-hooks init basic | | validate [file] | Validate hook configuration | claude-good-hooks validate |

Data Management

| Command | Description | Example | |---------|-------------|---------| | export [options] | Export hook configurations | claude-good-hooks export --output hooks.json | | import <source> | Import hook configurations | claude-good-hooks import hooks.json |

Hook Scopes

Global Hooks

Applied to ~/.claude/settings.json - affects all Claude Code sessions:

claude-good-hooks apply dirty --global

Project Hooks

Applied to ./.claude/settings.json - affects current project:

claude-good-hooks apply lint-check --project

Local Hooks

Applied to ./.claude/settings.local.json - local overrides (not committed):

claude-good-hooks apply debug --local

JSON Output

All commands support JSON output for automation:

claude-good-hooks list-hooks --json
claude-good-hooks doctor --json
claude-good-hooks version --json

Hook Sources

NPM Packages

Install and apply community hooks:

npm install -g @sammons/git-dirty-hook
claude-good-hooks apply dirty --global

Template Hooks

Generate hooks from templates:

claude-good-hooks apply template-hook --template git-status

Configuration

Settings File Locations

  • Global: ~/.claude/settings.json
  • Project: ./.claude/settings.json
  • Local: ./.claude/settings.local.json

Example Hook Configuration

{
  "hooks": {
    "PreToolUse": [{
      "matcher": "Write|Edit",
      "hooks": [{
        "type": "command",
        "command": "npm run lint"
      }]
    }]
  }
}

Development

Building from Source

git clone https://github.com/sammons2/claude-good-hooks.git
cd claude-good-hooks/packages/claude-good-hooks
npm install
npm run build
npm link

Running Tests

npm test

Development Mode

npm run dev

Troubleshooting

Common Issues

  1. Command not found

    # Ensure global installation
    npm install -g @sammons/claude-good-hooks
    # Or check PATH
    echo $PATH
  2. Permission errors

    # Use sudo for global installation (if needed)
    sudo npm install -g @sammons/claude-good-hooks
  3. Hook not applying

    # Check hook configuration
    claude-good-hooks validate
    # Run diagnostics
    claude-good-hooks doctor

Debug Mode

Enable verbose logging:

DEBUG=claude-good-hooks* claude-good-hooks <command>

Related Packages

Contributing

Contributions are welcome! Please see the main repository for contribution guidelines.

License

MIT © Sammons Software LLC

Support