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

@claude-code-hooks/security

v0.1.12

Published

Claude Code hook that warns or blocks risky shell commands and tool invocations.

Readme

@claude-code-hooks/security

A Claude Code hook package that helps users feel safer by warning (or optionally blocking) risky commands/tool invocations.

Language / 언어: English (main) · 한국어 (sub) — 한국어 안내는 루트 문서 하단에 포함되어 있습니다.

This is intentionally heuristic and lightweight: it scans hook payload JSON (from stdin) for suspicious patterns like rm -rf, curl | bash, writes to ~/.ssh, etc.

Part of the claude-code-hooks monorepo.

Contributing · Security Policy · Releasing · License

Install / run

Interactive setup:

npx @claude-code-hooks/security@latest

Project config: claude-code-hooks.config.json

If claude-code-hooks.config.json exists in your project root, claude-security will use it as the source of truth for defaults. Setup will also write/update it when you Apply.

Minimal schema:

{
  "security": {
    "mode": "warn",
    "enabledEvents": ["PreToolUse", "PermissionRequest"],
    "ignore": { "regex": [] },
    "allow": { "regex": [] }
  }
}
  • allow.regex: if any pattern matches the scanned text, all risks are suppressed
  • ignore.regex: if any pattern matches, risks are suppressed and a dim note is printed

What it writes

For each enabled event, it adds a managed hook handler like:

{
  "type": "command",
  "command": "npx --yes @claude-code-hooks/security@latest run --event PreToolUse --mode warn --managed-by @claude-code-hooks/security",
  "async": false,
  "timeout": 8
}

It only manages hook handlers whose command contains:

--managed-by @claude-code-hooks/security

Modes

  • warn (default): prints warnings to stderr, exits 0
  • block: exits 2 when a risk is detected (PreToolUse only; PermissionRequest stays advisory)

Start with warn. Blocking can be disruptive until the heuristics mature.

Note: even in block mode, PermissionRequest remains advisory (exits 0). We only hard-block PreToolUse.

Commands

claude-security list-events
claude-security run --event PreToolUse --mode warn
claude-security doctor