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

v2.1.1

Published

Prompt distillation extension for pi.

Readme

Twiddle

Twiddle

Prompt distillation for pi. Twiddle cleans, sharpens, and structures prompts before they reach the agent.

Not free: every optimization costs tokens. Tiny prompts can cost more than they improve. The footer shows the active mode: ~ Twiddle for manual mode and ≈ Twiddle for auto-mode.

What it does

  • Translates any language into clear engineering English
  • Classifies intent with fast regex rules
  • Injects project context when useful
  • Preserves code blocks, inline code, URLs, hashes, and semver
  • Falls back through a model chain on timeout
  • Skips optimization if output would exceed token budget

Quick Start

/twiddle-model
/twiddle-auto-on

~explique o padrão Repository em NestJS com exemplos

If no optimization model is configured yet, Twiddle offers the available models once per session. Selecting a model saves it and continues optimization; canceling sends prompts unchanged for the rest of the session.

Default token budget threshold is 40%.

Activation

| Input | Behavior | |---|---| | ~text | Optimize and forward | | ~.text | Bypass, send original | | ~!text | Optimize silently | | ~raw:text | Bypass, alias for ~. | | ~bug:text | Force bug_fix | | ~feature:text | Force new_feature | | ~refactor:text | Force refactor | | ~research:text | Force research | | ~test:text | Force testing | | ~review:text | Force review | | ~docs:text | Force docs | | ~infra:text | Force infrastructure | | ~design:text | Force design |

Auto-mode (/twiddle-auto-on): every prompt gets distilled, unless it is a trivial greeting.

Footer

| Indicator | Mode | |---|---| | ~ Twiddle | Manual mode — use ~ to optimize a prompt | | ≈ Twiddle | Auto-mode — eligible prompts are optimized automatically |

While optimization is running, Twiddle uses a subtle shimmer over the name. The footer does not show token savings because Twiddle is focused on clarity, translation, structure, and deduplication rather than savings accounting.

Commands

| Command | Purpose | |---|---| | /twiddle | Show current config | | /twiddle-model | Select optimization model | | /twiddle-threshold [0–500] | Set token budget margin | | /twiddle-timeout [5–60] | Set per-model timeout in seconds | | /twiddle-fallback add|remove|list|clear | Manage fallback chain | | /twiddle-verbose quiet|normal|debug | Set notification verbosity | | /twiddle-auto-on | Enable auto-mode | | /twiddle-auto-off | Disable auto-mode | | /twiddle-report | Show session stats | | /twiddle-setup | Interactive setup | | /twiddle-reset | Restore defaults |

Screenshots

Settings

Twiddle Settings

Prompt report

Twiddle Prompt Report

How it works

  1. Detect ~ input and parse override prefixes
  2. Classify intent and scope
  3. Inject project context when available
  4. Optimize via a separate pi subprocess
  5. Restore preserved fragments
  6. Keep original prompt if optimization misses budget or fails

Project layout

pi-twiddle/
├── index.ts
├── optimizer.ts
├── intent.ts
├── project.ts
├── preserve.ts
├── tokenizer.ts
├── footer.ts
├── missing-model-warning.ts
├── config.ts
├── README.md
├── package.json
├── tsconfig.json
├── assets/
└── *.test.ts

Design

  • Quiet by default
  • No API key management
  • Graceful fallback on failure
  • Footer shows active mode without token-savings counters

Theme: Harpy