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-baton

v0.7.2

Published

Pi-native workflow baton runner with per-step model switching and isolated step context.

Readme

Pi Baton

CI Publish npm version npm downloads License: MIT Pi package Trusted Publishing

Run YAML-defined review loops in Pi with per-step model switching and isolated step context.

What this is

Pi Baton is a Pi-native workflow baton runner. Define implement → review → fix loops in YAML, and let Pi Baton execute them with automatic baton handoff between isolated subagent steps.

Features

  • Per-step model switching — fast model for implement, strong model for review
  • Isolated step context — no shared conversation pollution between steps
  • Structured review contractaccept/reject with mandatory findings or acceptance notes
  • Live progress widget — see which step is running, its agent, and judgment in real time

Install

Install the published npm package with Pi:

pi install npm:pi-baton

Pin a specific version when you want reproducible installs:

pi install npm:[email protected]

Install into the current project instead of your user Pi settings:

pi install npm:pi-baton -l

Or install from GitHub:

pi install git:github.com/eiei114/pi-baton

Try it without permanently installing:

pi -e npm:pi-baton

Quick start

Try this package locally from a clone of this repository:

pi -e .

Then run:

/baton:new        create a workflow scaffold
/baton:start      choose workflow + task brief → idle run
/baton:run        execute run to terminal state (with live widget)
/baton:status     show the active run summary

The builtin Default Review Loop workflow (implement → review → fix) works out of the box — no agent setup required.

Prerequisites

Pi Baton ships builtin worker and reviewer subagents under agents/. They work with your current Pi model.

To override with custom agents, place .md files under:

.pi/agents/worker.md
.pi/agents/reviewer.md

Discovery order: project .pi/agents/ → user ~/.pi/agent/agents/ → pi-baton builtin.

Workflow authoring

/baton:new

Pick a name and a scaffold from default-review-loop is written to .pi/baton/workflows/ and opened in editor. The scaffold includes <your-fast-model> / <your-strong-model> placeholders for step-level model overrides.

Workflow YAML reference

name: My Review Loop
iteration_cap: 5
steps:
  implement:
    agent: worker
    model: openai/gpt-5.4        # optional: fast model
    prompt: work prompt
    next: review
  review:
    agent: reviewer
    model: anthropic/claude-opus-4-5  # optional: strong model
    prompt: review prompt
    on_accept: _complete         # or a step name
    on_reject: fix
  fix:
    agent: worker
    model: openai/gpt-5.4
    prompt: fix prompt
    next: review
  • on_accept: _complete ends the run.
  • iteration_cap prevents infinite review loops — the run fails at the cap.
  • Review agents must return accept/reject with findings or acceptance notes.

Package contents

| Path | Purpose | |---|---| | extensions/ | Slash-command entrypoints (/baton:new, /baton:start, /baton:run, /baton:status) | | lib/ | Workflow parser, run engine, subagent runner, review contract, UI widget | | agents/ | Builtin worker and reviewer subagent definitions | | workflows/ | Builtin default-review-loop.yaml | | assets/ | README / package branding assets | | docs/ | Release and maintainer documentation |

Development

npm install
npm run ci

Release

This package uses npm Trusted Publishing with GitHub Actions OIDC — no NPM_TOKEN is required.

npm version patch
git push

On main, version bumps trigger auto-release and publish workflows. See docs/release.md for setup details.

Security

Pi packages can execute code with your local permissions. Review extensions before installing third-party packages.

For vulnerability reporting, see SECURITY.md.

Links

  • npm: https://www.npmjs.com/package/pi-baton
  • GitHub: https://github.com/eiei114/pi-baton
  • Issues: https://github.com/eiei114/pi-baton/issues

License

MIT