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

@diegopetrucci/pi-code-reviewer

v0.1.8

Published

A standalone pi extension that adds a read-only code_reviewer subagent tool for isolated code reviews.

Downloads

835

Readme

code-reviewer

Adds a read-only code_reviewer subagent tool that adapts The Last Harness code-reviewer prompt into a standalone pi extension.

Use it when you want an isolated second-pass review of a proposed change against the local checkout. The tool stays read-only, checks ticket fit and scope first, then looks for diff mismatches, correctness bugs, security/safety issues, unnecessary complexity, and missing validation.

This package is adapted from the TLH code-reviewer workflow for use as a standalone pi extension.

Install

Standalone npm package

pi install npm:@diegopetrucci/pi-code-reviewer

Collection package

pi install npm:@diegopetrucci/pi-extensions

GitHub package

pi install git:github.com/diegopetrucci/pi-extensions

Then reload pi:

/reload

code_reviewer tool behavior

The tool accepts:

  • task — required review target and success criteria
  • diff — optional diff, patch, or change summary
  • context — optional extra constraints or known risks

When called, it launches an isolated in-memory child agent with:

  • no inherited extensions, skills, prompt templates, themes, context files, or agents files;
  • an auto-selected review model that prefers contrarian-style opposite-provider and opposite-family candidates before same-provider fallbacks;
  • automatic model candidates constrained to the current Pi session's model scope when that scope is non-empty;
  • requested thinking taken from the active session when available, otherwise defaulting to high for reasoning models and off for non-reasoning models, then clamped to the selected model's supported level;
  • read-only tools only: read, grep, find, ls, and guarded bash;
  • a local-checkout path guard for file inspection;
  • a bash guard that allows only direct read-only git, gh, or pwd invocations.

The review prompt prioritizes:

  1. ticket fit and scope
  2. diff accuracy
  3. correctness and regressions
  4. security and safety
  5. simplicity and maintainability
  6. tests and validation gaps

The final output is concise and includes a verdict, findings, validation notes, a scope check, and run details that show the final selected model and effective thinking level.

Read-only guarantees

  • The subagent is explicitly instructed not to implement changes.
  • Runtime guards block write/edit tools, shell control operators, pipelines, redirection, path traversal outside the checkout, mutating git/gh commands, npm/publish commands, and other filesystem mutation.
  • Built-in file-inspection tools are preferred over shell commands for local files.

Example

Use code_reviewer on this task before merging:

{
  "task": "Review ticket pe-7lpt implementation for scope fit and correctness.",
  "context": "Focus on whether the new extension stays runtime-only and keeps tools read-only."
}

Limitations

  • The subagent has an 8-turn and 8-minute budget.
  • The review quality depends on the local checkout matching the change being reviewed.
  • gh-based inspection is available only when GitHub CLI is installed and authenticated, but the tool can still review local changes without it.