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-reread-instructions

v0.1.0

Published

Pi extension that re-inserts AGENTS.md / CLAUDE.md every N completed final assistant replies

Readme

pi-reread-instructions

Pi extension package that re-inserts AGENTS.md / CLAUDE.md into context every N completed final assistant replies.

Why

This was inspired by recent Claude Code leak analysis suggesting that CLAUDE.md is re-included during prompt assembly:

If that helps Claude Code stay anchored to project instructions, it may be useful for pi too.

Behavior

  • Default interval: 3
  • Configurable via PI_AGENTS_REREAD_EVERY
  • Counts only assistant messages with stopReason: "stop"
  • Tool-use substeps do not increment the counter
  • Reinsertion happens after the matching final assistant reply and before the next user message
  • Searches for context files in:
    • ~/.pi/agent/AGENTS.md or CLAUDE.md
    • the current project and its ancestor directories
  • Writes proof markers into the session JSONL as custom entries:
    • agents-reread-delivery
    • agents-reread-payload-proof
  • Appends a hidden custom message of type agents-reread-context when it injects a refresh

Install

If you want to install from the public GitHub repo:

pi install git:github.com/rawwerks/pi-reread-instructions

If you want to install from npm after the package is published:

pi install npm:pi-reread-instructions

For a local checkout during development:

pi install /absolute/path/to/pi-reread-instructions

If you want a direct editable symlink instead of a package install:

cd /path/to/pi-reread-instructions
./install.sh

That creates this symlink:

~/.pi/agent/extensions/agents-reread.ts -> /path/to/pi-reread-instructions/agents-reread.ts

Configuration

Set the default interval with an environment variable:

export PI_AGENTS_REREAD_EVERY=3

The extension also accepts AGENTS_REREAD_EVERY as a fallback.

Set it to any positive integer. 0 or a negative number disables the refresh.

Slash command

The extension registers:

/agents-reread
/agents-reread status
/agents-reread off
/agents-reread default
/agents-reread <positive-integer>

Notes:

  • /agents-reread without args shows status
  • /agents-reread <positive-integer> changes the interval for the current session
  • /agents-reread off disables refreshes for the current session
  • /agents-reread default resets the current session back to the env/default interval

Session-log proof

When a refresh is injected, the extension records custom entries in the session JSONL. You can inspect them with:

rg -n 'agents-reread-(delivery|payload-proof)|agents-reread-context' ~/.pi/agent/sessions

Notes

  • This repo is intentionally standalone and uses only Node built-ins.
  • The extension does not require editing or vendoring pi upstream.
  • The package exposes the extension through the pi manifest in package.json.
  • Maintainer workflow lives in DEVELOPING.md.