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-agent-sdk-pi

v1.0.16

Published

This extension registers a custom provider that routes LLM calls through the **Claude Agent SDK** while **pi executes tools** and renders tool results in the TUI.

Downloads

866

Readme

claude-agent-sdk-pi

This extension registers a custom provider that routes LLM calls through the Claude Agent SDK while pi executes tools and renders tool results in the TUI.

Highlights

  • Claude Agent SDK is used as the LLM backend (Claude Code auth or API key).
  • Tool execution is blocked in Claude Code; pi executes tools natively.
  • Built-in tool calls are mapped to Claude Code tool names.
  • Custom tools are exposed to Claude Code via in-process MCP.
  • Skills can be appended to Claude Code’s default system prompt (optional).

Demo

Demo

Setup

  1. Install the extension globally (npm is the preferred source now):
pi install npm:claude-agent-sdk-pi

(You can pin a specific version for reproducible installs.)

Alternative (git):

pi install git:github.com/prateekmedia/claude-agent-sdk-pi

See pi-coding-agent install docs for other install sources and paths.

  1. Authenticate (choose one):
  • Claude Code login (Pro/Max):

    npx @anthropic-ai/claude-code

    Ensure no API key env vars are set.

  • API key (API plan):

    export ANTHROPIC_API_KEY=sk-ant-...
  1. Reload pi:
/reload

Provider ID

claude-agent-sdk

Use /model to select:

  • claude-agent-sdk/claude-opus-4-5
  • claude-agent-sdk/claude-haiku-4-5

Tool Behavior

  • Claude Code proposes tool calls.
  • pi executes them.
  • Tool execution in Claude Code is denied.

Built-in tool mapping (Claude Code → pi):

  • Read → read
  • Write → write
  • Edit → edit
  • Bash → bash
  • Grep → grep
  • Glob → find

Claude Code only sees the tools that are active in pi.

Custom tools

Any extra tools registered in pi are exposed to Claude Code via an in-process MCP server:

  • MCP server name: custom-tools
  • Claude Code tool name format: mcp__custom-tools__<toolName>
  • Example: mcp__custom-tools__subagent

The provider automatically maps these back to the pi tool name (e.g. subagent).

Context loading

  1. Append to system prompt (Default)

    • Uses AGENTS.md + skills from pi and appends to Claude Code’s preset prompt.
    • No extra config needed.
  2. Use Claude Code’s dir (Recommended)

    • Set appendSystemPrompt: false so Claude Code loads its own resources from .claude/.
    • By default it loads both user + project settings (["user","project"]).
    • If you want to ignore project-level .claude/ folders, set settingSources: ["user"].
    • This provider runs Claude Code in a tool-denied mode (pi executes tools), so auto-loading MCP servers from ~/.claude.json is usually just token overhead. By default, the provider passes --strict-mcp-config to prevent that tool schema dump. Set strictMcpConfig: false to opt out.

    Config (user-only CLAUDE.md/skills + no MCP auto-load):

    {
      "claudeAgentSdkProvider": {
        "appendSystemPrompt": false,
        "settingSources": ["user"],
        "strictMcpConfig": true
      }
    }
    ln -s ~/.pi/agent/AGENTS.md ~/.claude/CLAUDE.md
    ln -s ~/.pi/agent/skills ~/.claude/skills