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

@immiscible/claude-code-hook

v0.1.1

Published

Block or approve Claude Code tool calls by rule: a PreToolUse hook that asks Immiscible before every Bash command, file edit, web fetch and MCP call. Allow, deny, or ask a person; fails closed. One file, no dependencies.

Readme

@immiscible/claude-code-hook

Block or approve Claude Code tool calls by rule. A PreToolUse hook that asks Immiscible before every matching tool call: allow carries on, deny refuses with the reasons, approval_required asks you with the approval link. Agent governance and spend control for Claude Code: Bash, file edits, WebFetch and every MCP tool, checked before they run. It fails closed. One file, no dependencies, Node 18+.

The quickest install is npx immiscible init in your project: it creates the agent and its rule, writes .env and adds this hook to .claude/settings.json after showing you the change. By hand:

npm install -g @immiscible/claude-code-hook
export IMMISCIBLE_URL=https://your-immiscible.example
export IMMISCIBLE_AGENT_KEY=ask_...
immiscible-claude-code-hook --print-config     # a PreToolUse entry for .claude/settings.json

.claude/settings.json (what --print-config prints, with your absolute path):

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash|Write|Edit|MultiEdit|NotebookEdit|WebFetch|mcp__(?!immiscible__(check_action_status|explain_decision|spend_summary|find_waste|unwatched_keys)$).*",
        "hooks": [{ "type": "command", "command": "node \"/path/to/immiscible-claude-code-hook.mjs\" || exit 2", "timeout": 60 }]
      }
    ]
  }
}

The hook in hook/ is a copy of the repository's scripts/claude-code-hook.mjs (also served by a running Immiscible at /downloads/claude-code-hook.mjs); npm run sync refreshes it and npm test fails if the two differ. It reads IMMISCIBLE_*, or the older ASSAY_*; the bin adds --print-config.

Tool calls are counted against their own line, 200 in 10 minutes by default, before a person is asked; the guide says how to raise it.

Use it beside Claude Code's own permission rules, not instead of them: those match patterns; this decides by where a call goes, asks a named person, and keeps a signed record. A new agent is an intern, so a person signs off its tool calls until it earns more on evidence; its default rule lets provably read-only calls (ls, git status, git diff, git log, reading a file) go ahead, still recorded. Immiscible's own read-only MCP tools are left out of the matcher, so it never asks itself.

As a Claude Code plugin it carries the hook and Immiscible's MCP server; both read IMMISCIBLE_URL and IMMISCIBLE_AGENT_KEY from the shell or the project's .env, which npx immiscible init writes.

Guide: the Claude Code hook. Quickstart: immiscible.fly.dev/docs/quickstart. SDKs: @immiscible/sdk, immiscible on PyPI. MIT licence.