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

@muzi3/pi-code-review

v0.1.2

Published

pi 并行代码评审扩展:切分 git diff、并发派发 reviewer 子 agent、合并结果;支持可插拔 code-validation 规则(全局兜底 + .pi/RULES.md + *.mdr)

Readme

@muzi3/pi-code-review

pi 并行代码评审扩展,两个入口:

  • /review [--force] [--max-lines N]:对当前项目 diff 做并行评审
  • code_review 工具:LLM 可自主调用

特性

  • 并行评审:切分 diffs/raw.diff,最多并发 10 个 reviewer 子 agent
  • 断点续跑:任务状态存于 review-tasks/task.log,重新触发会从未完成的 chunk 继续
  • 可插拔规则(code-validation):
    • 全局兜底:extensions/rules/common/RULES.md(随包内置)
    • 项目级:<cwd>/.pi/RULES.md
    • 项目散落:<cwd> 下递归 *.mdr(排除 .git、node_modules、dist、build、.next、coverage、vendor 等)
  • 零外部依赖:无内部工具、无 token、无网络调用

安装

pi install npm:@muzi3/pi-code-review

用法

命令

/review [--force] [--max-lines N] [--cwd <绝对路径>]
  • --force:忽略已存在的 review-tasks/,强制重新切分
  • --max-lines N:每个 chunk 最大源码行数(默认 500)
  • --cwd <绝对路径>:评审根目录(默认当前会话 cwd)。cr-review 场景传入 ~/.cr-result/<模块>/<CR编号>/ 以复用已拉取的 diff

工具

{ "force": false, "max_lines": 500, "cwd": "/abs/path/to/workdir" }
  • cwd:可选。评审根目录(绝对路径)。默认用当前会话 cwd;cr-review 场景 传入 ~/.cr-result/<模块>/<CR编号>/ 以复用已拉取的 diff

diff 来源

  • 若 diffs/raw.diff 已存在,直接使用
  • 否则执行 git diff HEAD(含 staged + unstaged),生成 diffs/changed_files.txt + diffs/raw.diff
  • 注意:git diff HEAD 不含未跟踪文件(untracked)

输出

  • 每 chunk 结果:review-output/<chunkId>_result.json
  • 合并报告(按文件分组):review-output/review.json

issue 的 severity 字段:error | warn | style。违反规范规则的项在 comment 字段以 [validation] 前缀标记。

规则(code-validation)

加载顺序(后者优先):

  1. extensions/rules/common/RULES.md(全局兜底)
  2. <cwd>/.pi/RULES.md
  3. <cwd> 下递归 *.mdr

规则文件为普通 Markdown。

Reviewer 子 agent

每个 reviewer 子 agent 是全新 pi 进程(--tools read),只读工具。读取源文件、评审新增行,最终回复输出纯 JSON 数组;编排器捕获 stdout 写入磁盘。子 agent 继承派发会话的模型与 thinking level。

License

MIT