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

v0.1.1

Published

Register .agents/workflows/*.md as native-style pi slash commands: each markdown file becomes a /command that expands with native prompt-template argument semantics.

Readme

pi-agents-workflow

把 .agents/workflows/*.md 注册成 pi 斜杠命令,行为与 pi 原生 prompt template 完全一致。

每个 markdown 文件变成一个 / 命令:/名称 参数 用 pi 原生的参数替换语义展开文件正文,并作为用户消息发送到当前会话——不派 subagent、不切上下文。适合放进 .agents/ 的流程手册(PM 编排规则、验证清单、发布流程)。

.agents/
├── skills/          ← pi 原生就读这里
└── workflows/       ← 装上本包后 pi 也会读这里
    ├── deploy.md
    └── dev-agent-cycle.md

安装

pi install npm:pi-agents-workflow

不想安装可以先试用:

pi -e npm:pi-agents-workflow

用法

假设 .agents/workflows/deploy.md:

---
description: 把服务部署到指定环境
argument-hint: "<env>"
---
Deploy to ${1:-prod} with these extras: ${@:-none}.

在 pi 里输入 /deploy staging --fast,实际发送:

Deploy to staging with these extras: staging --fast.

($@ 是全部参数拼接——与原生模板一致。)

  • /deploy — 展开并发送该 workflow(自动补全显示 description + 参数提示)
  • /agents-workflows — 列出已发现的 workflow、扫描目录和问题

作用域

| 作用域 | 目录 | 说明 | |---|---|---| | 项目 | <项目>/.agents/workflows/*.md | 同名时项目级优先 | | 用户 | ~/.agents/workflows/*.md | 跨项目共享 |

发现逻辑为非递归,与原生 prompts/ 一致。会话中途新增的文件提交时依然可用(input 事件兜底);自动补全里的出现要等 /reload 之后。

文件格式

与原生 prompt template 相同:

  • 文件名(去掉 .md)即命令名——用单 Token 名称(dev-agent-cycle.md,不要 my flow.md)
  • description — 自动补全文案;缺省用正文第一行非空行
  • argument-hint — 自动补全里渲染为 <提示> — 描述
  • 正文 — 模板内容,支持完整的原生参数替换:
    • $1、$2、… 位置参数
    • $@ / $ARGUMENTS — 全部参数拼接
    • ${1:-default}、${@:-default} — 缺省值
    • ${@:N}、${@:N:L} — 参数切片

其余 frontmatter 键忽略(向前兼容)。

注意

  • 扩展命令优先于 .pi/prompts/ 里的同名原生模板——两边都用的话请避免重名。
  • 展开只发生一次;以 / 开头的正文不会链式触发另一个命令。
  • 本包不派 subagent。想让 workflow 作为 subagent 任务执行,请配 pi-subagents 用它自己的 prompts 目录。

开发

npm install
npm test             # node:test 测试
npm run typecheck    # tsc --noEmit
pi -e .              # 交互式试用

MIT License。