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

agent-b2b

v0.1.3

Published

Go back-to-back with your AI agent — a beat system that reacts to Claude Code's state

Readme

agent-b2b

Go back-to-back with your AI agent — a beat system that reacts to Claude Code's state.

https://github.com/user-attachments/assets/6fdd0bff-ac24-4d52-b333-5fd2bb17f9d1

Example

  • YOURTURN (waiting for prompt): kick + bass + hihat
  • OPPONENT (AI processing): melody layer kicks in

Setup

npx agent-b2b

The browser opens automatically at http://localhost:43819.

To use a different port:

npx agent-b2b --port 12345

Add the following hooks to your Claude Code config (.claude/settings.json):

{
  "hooks": {
    "UserPromptSubmit": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "curl -s -X POST http://localhost:43819/thinking",
            "timeout": 5
          }
        ]
      }
    ],
    "Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "curl -s -X POST http://localhost:43819/idle",
            "timeout": 5
          }
        ]
      }
    ]
  }
}

You can optionally add PreToolUse and PostToolUse hooks to detect tool approval prompts. This switches the state to YOURTURN while waiting for approval and back to OPPONENT once approved. Add or remove these based on your preference:

{
  "PreToolUse": [
    {
      "hooks": [
        {
          "type": "command",
          "command": "curl -s -X POST http://localhost:43819/idle",
          "timeout": 5
        }
      ]
    }
  ],
  "PostToolUse": [
    {
      "hooks": [
        {
          "type": "command",
          "command": "curl -s -X POST http://localhost:43819/thinking",
          "timeout": 5
        }
      ]
    }
  ]
}

All communication stays on localhost after installation. No data is sent to the internet.

Alternative: clone and run

git clone https://github.com/hogashi/agent-b2b.git
cd agent-b2b
npm install
npm start

Usage

  1. Power on — Click the power button to start audio. This is required each time the page loads.
  2. Use Claude Code — While Claude is thinking, the melody layer kicks in. When it's your turn, only kick, bass, and hihat play. You can customize which tracks play in each state using the checkboxes.
  3. (Optional) Adjust — Change the volume of each track, tweak the BPM, or edit the beat pattern in the sequencer.
  4. (Optional) Share — Export your settings as JSON to back up or share with friends. You can also reset everything to defaults.

Troubleshooting

No sound Click the power button to start audio. This is required every time the page loads due to the browser's Web Audio API policy.

PLUGGED indicator is red The server is not running. Run npm start and check that the port is not in use by another process.

State does not change (stuck on YOURTURN/OPPONENT) Make sure the Claude Code hooks are configured in .claude/settings.json. See the Setup section above.

Port

The default port is 43819 (0xAB2B for agent-b2b).

Playground

Try the beat system without installing: https://hogashi.github.io/agent-b2b/

Note: Claude Code integration (WebSocket) is not available in the playground. Use npx agent-b2b for the full experience.