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

@the-forge-flow/ultra-compress-pi

v0.1.6

Published

PI extension for token-efficient prose — level-based runtime output compression and markdown file compression

Readme


"why use many token when few do trick"

✨ Features

  • 🎚️ Runtime mode: Reshape assistant output via a persistent compression level (/uc <level>). Auto-Clarity override falls back to prose for destructive/security/ordered turns.
  • 📝 File mode: Compress markdown files (skills, agents, memory docs) via /uc-file <path> <level>. Deterministic pre-pass → LLM rewrite → structural validator → targeted repair loop.
  • 🪜 Five levels: off, lite, standard, ultra, symbolic — from no change to Greek/math notation.
  • 💾 Safe by default: File mode backs up originals to <path>.original.md; /uc-revert restores them.
  • 📚 Library API: Importable helpers for other PI extensions to apply the same compression rules.

🪜 Levels

| Level | Effect | |---|---| | off | No modification. | | lite | Drop filler, hedging, pleasantries. Keep articles. | | standard | Drop articles + connectives. Fragments OK. Substitutions. | | ultra | Abbreviations (DB, auth, req, res, fn, impl). Arrow causality. | | symbolic | Math/logic notation (∀ ∃ ∧ → ⟺). Greek vars for repeated concepts. |

📦 Installation

PI discovers the extension automatically once installed as a pi package.

From npm:

pi install npm:@the-forge-flow/ultra-compress-pi

From GitHub:

pi install git:github.com/MonsieurBarti/ultra-compress-pi

Then reload PI with /reload.

🚀 Usage

Commands

| Command | Description | |---|---| | /uc <level> | Set the active level for this project. Autocomplete over the 5 levels. Persists in .pi/ultra-compress.json. | | /uc-file <path> <level> [--yes] | Compress a markdown file. Without --yes, prints a preview. With --yes, writes and backs up to <path>.original.md. | | /uc-status | Show active level, session stats, and recently compressed files. | | /uc-revert <path> | Restore a file from its .original.md backup. |

Library API (for other PI extensions)

import {
  compressText,
  compressTextLexical,
  buildLevelPromptFragment,
  validateCompression,
  getActiveLevel,
} from "@the-forge-flow/ultra-compress-pi";

// In your extension's command/hook handler:
const result = await compressText(markdownBody, "ultra", ctx);

All LLM-backed methods require an active PI ExtensionContext (for model registry access).

🧪 Development

# Install dependencies
bun install

# Run tests
bun test

# Lint & format
bun run lint

# Type check
bun run typecheck

# Build for publish
bun run build

📁 Project Structure

src/
├── index.ts              # Extension entry point + library exports
├── commands/             # /uc, /uc-file, /uc-status, /uc-revert
├── hooks/                # session_start, before_agent_start
├── services/             # state-store, level-rules, compress-pipeline, validator, stats
└── skills/
    └── ultra-compress/
        └── SKILL.md      # dogfooded symbolic notation
tests/
└── unit/                 # Unit tests
.github/workflows/
├── ci.yml                # CI pipeline
└── release.yml           # Release automation

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing)
  3. Commit with conventional commits (git commit -m "feat: add something")
  4. Push to the branch (git push origin feature/amazing)
  5. Open a Pull Request

📜 License

MIT © MonsieurBarti