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

@drmikecrowe/omp-claude-hooks-bridge

v0.3.0

Published

Bridge Claude Code hooks (.claude/settings.json) into omp (Oh My Pi) extension lifecycle events.

Readme

omp-claude-hooks-bridge

Built on top of upstream. This package reuses the claude-hooks-bridge implementation from Jonghakseo/pi-extension (originally published to npm as @ryan_nookpi/pi-extension-claude-hooks-bridge) as its foundation, ports it to the omp runtime, and enhances it further. Full attribution and the list of enhancements are in Origins below — please credit the upstream authors if you reuse this code.

Bridge Claude Code hooks (.claude/settings.json) into omp (Oh My Pi) extension lifecycle events.

What it does

  • Reads .claude/settings.json hooks configuration from the project root
  • Executes hooks at matching lifecycle events:
    • SessionStartsession_start
    • UserPromptSubmitbefore_agent_start
    • PreToolUsetool_call (can block / ask for confirmation)
    • PostToolUsetool_result
    • Stopagent_end (can queue follow-up messages)
  • Supports matcher patterns (regex or pipe-separated tool names)
  • Maps omp tool names to Claude Code equivalents (bashBash, etc.)
  • Handles hook JSON output with permissionDecision / exit code 2 for blocking
  • Provides transcript files for Stop hooks

Requirements

  • bash is required — hooks are executed via bash -lc. Works on macOS and Linux. Not natively supported on Windows.

Security

This extension executes shell commands found in any .claude/settings.json it discovers — the current project's (<cwd>/.claude/settings.json), your home config ($CLAUDE_CONFIG_DIR/settings.json, default ~/.claude/settings.json), ~/.claude.json, and installed plugin hooks.json files — with the same privileges as the omp process itself (bash -lc <command>, full environment).

Only PreToolUse "ask"/"block" decisions go through a user confirmation prompt. SessionStart, UserPromptSubmit, PostToolUse, and Stop hooks run immediately and unconditionally the moment their lifecycle event fires — SessionStart hooks run before you've typed anything.

Opening or cd-ing into a directory whose .claude/settings.json you do not trust is equivalent to running its shell commands. Treat an untrusted repository containing hook configuration the same way you'd treat an untrusted shell script — do not open it with this extension active unless you've reviewed .claude/settings.json first.

Install

omp plugin install @drmikecrowe/omp-claude-hooks-bridge

Origins

This package is not a from-scratch implementation — it reuses and builds on upstream work. The entire hook-bridging design (settings discovery, matcher logic, hook execution, decision extraction, transcript handling) originates from the claude-hooks-bridge package in the Jonghakseo/pi-extension monorepo, originally published to npm as @ryan_nookpi/pi-extension-claude-hooks-bridge. All credit for the original design and implementation belongs to that project's authors.

What was reused as-is

  • The core hook lifecycle model (SessionStart / UserPromptSubmit / PreToolUse / PostToolUse / Stop) and its mapping onto extension events.
  • Settings discovery and merge order across project and home .claude/settings.json.
  • Matcher-pattern matching, tool-name aliasing, and hook decision extraction (permissionDecision, exit-code-2 blocking).
  • Transcript-file generation for Stop hooks.

What this fork ports and adds on top

  • Runtime port: targets omp extension packaging (omp.extensions manifest, omp plugin install) and builds against the @oh-my-pi/pi-coding-agent extension SDK instead of pi's.
  • CLAUDE_CONFIG_DIR support: home-config resolution (settings.json, installed_plugins.json) now honors the CLAUDE_CONFIG_DIR environment variable, matching Claude Code's own documented config-dir override, instead of hardcoding ~/.claude.
  • Security hardening: transcript files and their directory are now created with restrictive 0600/0700 permissions instead of umask defaults, so session transcripts aren't world-readable on shared hosts; the plugin project-scope check is now path-boundary-safe instead of a raw prefix match, so a sibling directory can no longer inherit another project's plugin hooks.
  • Documentation: a Security section spelling out exactly which hook events execute unconfirmed shell commands and when, plus this expanded attribution.

Naming and documentation are rebranded from pi to omp throughout, and the package is republished under the @drmikecrowe namespace as @drmikecrowe/omp-claude-hooks-bridge, distributed under the same MIT license as upstream (see LICENSE, which carries forward the original copyright notice).

If you fork or reuse this code further, please preserve this attribution chain back to Jonghakseo/pi-extension.