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

pi-claude-bridge

v0.1.5

Published

Pi extension that uses Claude Code (via Agent SDK) as a model provider and adds an AskClaude tool.

Readme

pi-claude-bridge

npm version

Pi extension that integrates Claude Code via the Agent SDK.

Built on claude-agent-sdk-pi by Prateek Sunal — the provider skeleton, tool name mapping, and settings loading originate from that project. This fork adds streaming, MCP tool bridging, custom pi tool bridging, session resume/persistence, context sync, thinking support, skills forwarding, and the AskClaude tool.

  1. Provider — Use Opus/Sonnet/Haiku as models in pi, with all tool calls flowing through pi's TUI
  2. AskClaude tool — Delegate tasks or questions to Claude Code when using another provider

Uses your Claude Max/Pro subscription. I believe this is compliant with Anthropic's terms because only the real Claude Code is touching the API and it's to enable local development not to steal API calls for some other commerical purpose. That said, obviously this extension is not endorsed or supported by Anthropic.

Setup

  1. Install:

    pi install npm:pi-claude-bridge
  2. Ensure Claude Code is installed and logged in (claude CLI works).

  3. Reload pi: /reload

Provider

Use /model to select claude-bridge/claude-opus-4-6, claude-bridge/claude-sonnet-4-6, or claude-bridge/claude-haiku-4-5.

Behind the scenes, pi's tools are bridged to Claude Code but it should all work like normal in pi. Bash commands get a 120-second default timeout (matching Claude Code's default) since pi's bash has no timeout by default.

AskClaude Tool

Available when using any non-claude-bridge provider. Pi's LLM can delegate tasks to Claude Code and wait for it to answer a question or perform a task. Examples of how to use:

  • "Ask Claude to plan a fix"
  • "If you get stuck, ask claude for help"
  • "Ask claude to review the plan in @foo.md, implement it, then ask an isolated=true claude to review the implementation"
  • "Ask claude to poke holes in this theory"
  • "Find all the places in the codebase that handle auth"

You could also create skills or add something to AGENTS.md to e.g. "Always call Ask Claude to review complicated feature implementations before considering the task complete."

Parameters

  • prompt — the question or task for Claude Code
  • moderead (default, read files and search/fetch on web), none, or full (read+write+bash, disable this mode with allowFullMode: false in config)
  • modelopus (default), sonnet, haiku, or a full model ID
  • thinking — effort level: off, minimal, low, medium, high, xhigh
  • isolated — when true, Claude gets a clean session with no conversation history (default: false)

Configuration

Config: ~/.pi/agent/claude-bridge.json (global) or .pi/claude-bridge.json (project).

{
  "maxHistoryMessages": 40,
  "askClaude": {
    "enabled": true,
    "allowFullMode": true,
    "description": "Custom tool description override"
  }
}

maxHistoryMessages limits how many pi messages are imported into the CC session context. Omit for no limit (default).

Tests

npm run test:unit for offline tests (queue, import). npm test for the full suite including integration tests that hit APIs (smoke, multi-turn, cache/session-resume). Set CLAUDE_BRIDGE_TESTING_ALT_MODEL in .env.test for the alt-provider smoke test (e.g. openrouter/z-ai/glm-4.7-flash).

Debugging

Set CLAUDE_BRIDGE_DEBUG=1 to log to ~/.pi/agent/claude-bridge.log. Override output file with CLAUDE_BRIDGE_DEBUG_PATH.

Maintenance

After updating Claude Code or the Agent SDK, check for new built-in tools that may need adding to DISALLOWED_BUILTIN_TOOLS in index.ts. Unrecognized CC tools leak through to pi as tool calls it can't handle. Symptoms: "Tool X not found" errors in pi.