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-visualize-code-changes

v1.0.1

Published

Pi skill: Mermaid before/after/diff diagrams that explain what a code change actually does

Readme

pi-visualize-code-changes

Gallery preview

Pi skill that turns a code change into before / after / what-changed Mermaid diagrams — so reviewers see behaviour, not just hunks.

Installable as a Pi package. Works with any Agent Skills harness that loads SKILL.md.

Install (Pi)

pi install npm:pi-visualize-code-changes

# Recommended: structured lens prompts (ask_user_question)
pi install npm:@juicesharp/rpiv-ask-user-question

# or from git:
# pi install git:github.com/BlockedPath/pi-visualize-code-changes
# or local path while developing:
# pi install /Users/justin/dev/pi-visualize-code-changes

Without the ask-user extension the skill still works — it just picks a lens itself instead of offering a short questionnaire when --lens is omitted.

Then in a Pi session:

/skill:visualize-code-changes
/skill:visualize-code-changes uncommitted
/skill:visualize-code-changes pr 42 --lens sequence
/skill:visualize-code-changes main...HEAD --focus src/auth --out docs/diagrams/auth.md

What it produces

One Markdown file (default docs/diagrams/<slug>.md) with:

  1. Before — how the flow worked
  2. After — how it works now
  3. What changed — merged, colour-coded diff view (added / removed / changed / same)

GitHub and GitLab render the Mermaid blocks natively.

Arguments

[scope] [--lens TYPE] [--focus PATH]... [--out PATH] [--slug NAME] [--render]

| Token | Meaning | | --- | --- | | scope | uncommitted, staged, pr <n>, branch <name>, main...HEAD, <sha>, … | | --lens | control-flow, dependency, sequence, state, data-flow | | --focus | Limit deep-read/diagram to path(s) | | --out / --slug | Output path control | | --render | Also emit SVGs (needs mermaid-cli) |

Requirements

No npm runtime dependencies — this package is a skill (Markdown + one stdlib Python script).

| Need | Required? | | --- | --- | | Pi (or another Agent Skills host) | Yes | | Git | Typical — diff discovery (git diff, git show, ranges). Session-edited files still work without it | | @juicesharp/rpiv-ask-user-question (or any host tool that exposes ask_user_question / AskUserQuestion) | Recommended — interactive lens choice when --lens is omitted. Without it, the skill auto-picks | | Python 3 | For diagram validation only (stdlib; no pip deps) | | gh (GitHub CLI) | Only for pr <n> scope (gh pr diff). Other scopes use git alone | | @mermaid-js/mermaid-cli (mmdc) + Chrome/Chromium | Optional — authoritative validation and --render SVGs. Without it, validation falls back to built-in heuristics |

# recommended — lens questionnaire
pi install npm:@juicesharp/rpiv-ask-user-question

# optional — PR scope
# brew install gh   # or see https://cli.github.com/

# optional but recommended — stronger Mermaid validation / SVG render
npm i -g @mermaid-js/mermaid-cli
# mmdc needs a Chrome/Chromium on PATH (or Puppeteer's bundled browser)

Package layout

pi-visualize-code-changes/
├── package.json          # pi.skills → ./skills
└── skills/
    └── visualize-code-changes/
        ├── SKILL.md
        ├── assets/template.md
        ├── references/
        └── scripts/validate_mermaid.py

Development

# try without publishing
pi install /absolute/path/to/pi-visualize-code-changes
# or one-shot
pi -e /absolute/path/to/pi-visualize-code-changes

Contributing

See CONTRIBUTING.md. Please follow the Code of Conduct.

Bug reports and feature requests use the GitHub issue templates.

License

MIT