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-agents-init

v0.1.0

Published

A pi extension that adds an /init command for guided AGENTS.md authoring, improving on OpenCode's /init by deterministically reacting to existing and nested AGENTS.md layers.

Downloads

18

Readme

pi-agents-init

A pi extension that adds an /init command for guided AGENTS.md authoring.

It adapts OpenCode's /init prompt for pi's context model: AGENTS.md files stack across the directory tree, and a good init should account for that rather than treating the repo as flat.

Install

pi install npm:pi-agents-init

Usage

/init                          # author/update AGENTS.md for the whole tree
/init focus on the deploy flow # emphasize one area

What it does

The command has the agent read the repo and author (or update) AGENTS.md at the current level, and handle layering when child AGENTS.md files exist. Optional focus text narrows what the agent emphasizes.

No extra dependencies — single command, one prompt template.

How it improves on OpenCode's /init

OpenCode's /init is a single static prompt: it says "create or update," ignores nested AGENTS.md files, and tacks update guidance onto the end whether or not a file exists. This extension adapts the prompt to the actual situation: create vs. update is decided up front, and layering guidance only appears when children exist:

1. Nested AGENTS.md layering

The extension walks the subdirectories for you, skipping node_modules, dist, build, and other generated trees, collects any child AGENTS.md files it finds, then hands their paths to the agent. The prompt tells the agent to author for this level and point to children by path rather than re-enumerating what lives in their subtrees (the child owns its subtree). When there are no children, the layering guidance is omitted entirely; the model doesn't reason about stacking it doesn't need.

2. Create vs. update, decided up front

The extension detects whether an AGENTS.md already exists at this level and picks one mode:

  • No existing file: the agent creates a new AGENTS.md.
  • Existing file: the agent updates it in place — preserves verified useful guidance, deletes fluff or stale claims, and reconciles it with the current codebase. It does not blindly rewrite or overwrite.

No conditional "create or update" phrasing reaches the model. It gets one direct instruction set for the situation it's actually in, so the model isn't branching on a condition it already knows the answer to.

3. Descendant clause tracks the layering decision

The writing rules' "exclude details that belong in a descendant's own AGENTS.md" bullet appears only when children exist, so the rules stay consistent with the layering section.

4. Opinionated toward the portable AGENTS.md convention

OpenCode's /init reads every instruction file it can find — AGENTS.md, CLAUDE.md, .cursor/rules/, .cursorrules, .github/copilot-instructions.md, opencode.json. This extension narrows to the portable AGENTS.md convention: AGENTS.md, AGENTS.override.md, and repo-local settings.json.

Pi itself loads CLAUDE.md too, so /init could read it. It chooses not to. AGENTS.md is a plain, vendor-neutral file you own — not one named for a product — and standardizing on it keeps guidance portable across any harness that respects the convention. If a repo keeps high-signal guidance in a CLAUDE.md or .cursorrules, fold the relevant bits into a $ARGUMENTS focus note, or fork this extension and widen the investigation list. The default stays opinionated: author for the open convention.

License

AGPL-3.0-or-later.