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-auto-prompt

v0.1.1-alpha

Published

Pi extension that injects project-local model-specific system prompt Markdown before each agent run.

Readme

pi-auto-prompt

pi-auto-prompt is a Pi extension package that automatically prepends global and project-local Markdown prompts to Pi's system prompt based on the active model.

It is packaged as a standard Pi package for GitHub/npm distribution and can be installed with pi install.

Install

From npm, after publishing:

pi install npm:pi-auto-prompt

From GitHub:

pi install git:github.com/zara/pi-auto-prompt

For local development:

pi install /absolute/path/to/pi-auto-prompt
# or try it for one run
pi -e /absolute/path/to/pi-auto-prompt

Prompt files

Create reusable global prompts in:

~/.pi/model-prompts/prompts/

Create project-specific prompts in any consuming project at:

.pi/model-prompts/prompts/

Then add Markdown files to either directory:

all.md              # injected for every model from that source
gpt-5.5.md          # default prompt for matched model family
[email protected]   # named variant for that model family

Resolution order:

  1. Global all.md, when present and non-empty.
  2. Project all.md, when present and non-empty.
  3. One global model-specific prompt for the active model family.
  4. One project model-specific prompt for the active model family.
  5. Pi's original system prompt.

all.md is an exact reserved filename in each source. Variants such as All.md or [email protected] are ignored rather than treated as global or model-specific prompts. Discovery is non-recursive; nested Markdown files are ignored.

The extension preserves Pi's existing system prompt; it only prepends resolved prompt content during before_agent_start.

Model matching

The extension reads the active model's available id, name, and provider identities, normalizes them, and fuzzy-matches prompt filenames against those identities.

When several prompt model keys match, the longest key wins. For example, gpt-5.5-mini beats gpt-5.5, which beats gpt.

Command

The extension registers /model-prompt:

/model-prompt status
/model-prompt use <version>
/model-prompt use global <version>
/model-prompt use project <version>
/model-prompt reset
/model-prompt reset global
/model-prompt reset project
  • status shows model identities, matched family, global/project directories, active global/project variants, available versions, injected files by source, and diagnostics.
  • use <version> persists a project variant for the current matched model family (backward-compatible default).
  • use global <version> and use project <version> persist variants for a specific prompt source.
  • reset clears the project persisted variant and returns to the default project prompt when available.
  • reset global and reset project clear the selected variant for a specific source.
  • Running /model-prompt with no arguments opens source-specific selectors in UI-capable sessions when global and/or project sources have two or more versions for the current model family.

Selection state is stored in the consuming project at:

.pi/model-prompts/state.json

Package structure

extensions/model-prompts/index.ts   # Pi extension entry point
extensions/model-prompts/core.ts    # prompt discovery/resolution/assembly logic
examples/model-prompts/prompts/     # sample prompt files
tests/model-prompts.test.ts         # node:test coverage

The package declares its Pi resources in package.json:

{
  "pi": {
    "extensions": ["./extensions/model-prompts"]
  }
}

Development

npm install
npm test
npm run typecheck
npm run pack:dry-run

Publishing checklist

  1. Replace the placeholder GitHub metadata in package.json (homepage, repository, bugs, and optionally author).
  2. Commit the package files.
  3. Push to GitHub.
  4. Publish to npm:
npm publish --access public
  1. Verify installation:
pi -e npm:pi-auto-prompt
# or
pi install npm:pi-auto-prompt