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

@henryqw/pi-prompt-creator

v2.0.10

Published

Turn current Pi conversation signals into user-approved prompt templates.

Readme

@henryqw/pi-prompt-creator

Turn repeated requests or corrections in the current conversation into a reviewed global Pi prompt. A tool-free child drafts one candidate, while Main and the user control review and saving.

Automatic analysis only prepares a candidate; the extension never saves it without your approval.

Install

pi install npm:@henryqw/pi-task-models
pi install npm:@henryqw/pi-prompt-creator

Run /task-models before analysis. Assign a model to fast, or override pi-prompt-creator/draft. Open /task-models again and verify the saved route or task assignment.

Works with

| Package | Relationship | Purpose | | --- | --- | --- | | @henryqw/pi-task-models | Required | Provides the isolated draft model route. |

Use

Run /promptor in the interactive TUI after a repeated request or correction appears:

  1. Run /promptor. The completed candidate appears automatically.
  2. Ask Main to refine it and return only the complete Final Prompt Draft.
  3. Run /promptor save to save under the suggested name, or /promptor save <name> to rename it.

The prompt is created at ~/.pi/agent/prompts/<name>.md, then Pi reloads its resources. No selection menu or name prompt is required.

| Surface | Type | Purpose | | --- | --- | --- | | /promptor [analyze|dismiss|save [name]|automatic <on\|off>] | command | For users in the interactive TUI: start or show analysis, dismiss a pending candidate, save a reviewed prompt, or control automatic analysis. | | pi-prompt-creator/draft | task | For users configuring /task-models: choose the child model and thinking level for drafting. | | Analysis status widget and candidate message | ui | Show analysis progress, readiness, or failure; a displayed candidate is marked as untrusted. |

Flow

Prompt creator lifecycle from conversation to saved prompt

Automatic analysis

Automatic mode waits for the configured number of non-empty user inputs. The default is three.

It starts at the next idle agent_settled event. It starts at most once per extension runtime.

A manual analysis consumes that opportunity.

Branch changes reset the input counter. Automatic analysis and candidate widgets require the interactive TUI.

Only one analysis can run at a time. A pending candidate blocks another analysis.

Manual and automatic analysis send Pi's current model-visible session context to the child model configured through /task-models. Session context edits that omit or replace messages are honored; original text removed from model context is not sent to the child. Request-local context and context_with_system transformations are not included.

Its payload includes the active compaction or branch summary, user text, successfully completed assistant text, and effective prompt names and descriptions.

Project context files and prompt templates are disabled for the child. Tool traffic, thinking, images, custom messages, and inactive branches are excluded.

Analysis asks a tool-free child for one JSON response. It has no user extensions, Skills, or saved session. The extension does not retry failed analysis.

New user input does not stop a running child. Branch navigation discards its old result without stopping the child.

Review and save

A manually requested analysis displays its completed candidate immediately. Automatic analysis shows a running widget, then keeps a completed candidate behind the Prompt ready — /promptor widget until you run /promptor or /promptor dismiss, so background work never interrupts the conversation.

Displayed candidates are visible messages marked as untrusted.

Refine the candidate with Main. Ask Main to return only the complete Final Prompt Draft before saving it with /promptor save [name].

Saving is allowed only after you show a candidate and Main then completes a valid Markdown review reply. Saving uses that latest retained Main reply as the entire file. Replies before the active compaction or branch summary cannot be saved.

An interrupted, failed, empty, or tool-use reply cannot be saved. The extension never falls back to an older reply.

A successful save ends that review. Show another candidate and complete another Main review reply before saving again.

/promptor save uses the suggested candidate name. Pass /promptor save <name> to choose another. Names must be lowercase kebab-case, start with a letter, and contain at most 64 ASCII characters. Existing command names and prompt files are rejected.

A successful save reloads Pi resources. If reload fails, the prompt remains saved and /reload can load it.

Model routing

The extension registers pi-prompt-creator/draft. Its default task profile is fast.

Use /task-models to select the model and thinking level. The extension owns no model configuration.

Config

Package-owned: ~/.pi/agent/config/pi-prompt-creator/config.json

| Name | Description | Values | Default | | --- | --- | --- | --- | | automatic | Runs automatic analysis after enough user inputs. | Boolean. | true | | inputThreshold | Sets the number of non-empty user inputs before automatic analysis. | Positive safe integer (1–9007199254740991). | 3 |

Edit either field, then run /reload to apply the change. Omitted fields use their defaults.

A missing file quietly uses both defaults. Startup never creates or rewrites the file.

Malformed config or unknown keys disable automatic analysis. Pi warns once and leaves the file unchanged.

Only /promptor automatic on or /promptor automatic off writes the config. Toggling preserves the configured threshold.

State and storage

A pending candidate stays in memory only. Automatic mode persists, but counters and candidates do not.

Saved prompts live at ~/.pi/agent/prompts/<name>.md. Saving never replaces an existing file.

Limits and recovery

The child payload stays within 30,000 characters, including its JSON envelope and prompt metadata.

It prioritizes the active summary, then the newest complete messages. It omits excess prompt metadata before conversation context.

Old messages may be omitted. Individual messages are never cut.

Generated candidate names use lowercase kebab-case and stay within 64 ASCII characters.

Candidate and Final Prompt Draft Markdown must be non-empty and at most 16 KiB.

Candidate and saved Markdown reject NUL and other terminal controls. Ordinary tabs and line feeds are allowed.

No candidate clears the running widget without a notice. Invalid output or child failure shows Prompt analysis failed — /promptor. Failed analysis is not retried automatically; run /promptor or /promptor analyze to start again.

The failure widget clears after the next non-empty user input. Analysis has a two-minute idle timeout and five-minute hard timeout.

This package does not search past sessions. It does not create Skills or project-local runtime state.