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

@alpino13/pi-ask

v0.1.0

Published

Pi package for interactive multi-question clarification flows, with a model-callable ask_questions tool and tabbed questionnaire UI.

Readme

pi-ask

pi-ask is a Pi package for interactive multi-question clarification flows in Pi.

It adds:

  • a marketplace-installable skill for multi-question clarification workflows
  • an ask_questions tool that models can call directly
  • an /ask command for manual invocation
  • an interactive tabbed questionnaire UI inside Pi

Install

From npm (recommended):

pi install npm:@alpino13/pi-ask

From the GitHub repo:

pi install git:github.com/AlvaroRausell/pi-ask

From a local clone:

git clone https://github.com/AlvaroRausell/pi-ask.git
cd pi-ask
pi install .

After installing, the ask skill, ask_questions tool, and /ask command will be available in your next Pi session.

Recommended flow

The primary flow is: the model calls ask_questions directly.

That means when the assistant has several clarification questions, it can open the interactive questionnaire immediately instead of asking the user to manually run /ask.

/ask still exists as a manual fallback and for testing.

What it does

When a model produces a message like:

1. Which framework should I use?
2. Do you want TypeScript?
3. Should I optimize for speed or readability?

run:

/ask 1. Which framework should I use?
2. Do you want TypeScript?
3. Should I optimize for speed or readability?

You can also run /ask immediately after the assistant asks those questions; it will use the latest assistant message as input.

The ask flow will:

  1. send the raw text to a smaller LLM
  2. convert it into structured questions + options
  3. open a tabbed UI, one tab per question plus a final Submit tab
  4. show progress like 2/3 answered
  5. load a natural-language answer bundle into the editor

The package currently keeps answers in the editor only. It does not auto-send them back to the main model.

Configuring the smaller LLM

Recommended model:

openai/gpt-4.1-mini

Resolution order:

  1. PI_ASK_MODEL
  2. /ask-settings saved configuration
  3. current active Pi model

Commands:

/ask-model      # show which model will be used
/ask-settings   # save a default /ask model

Environment override:

export PI_ASK_MODEL="openai/gpt-4.1-mini"

Commands and tool

  • ask_questions — primary model-facing tool
  • /ask — manual command for running the questionnaire flow from text or the latest assistant message
  • /ask-model — shows which small model will be used
  • /ask-settings — saves the default small model configuration

Current questionnaire behavior

  • tab labels use 1 2 3 ... with type icons ( multi, checkbox)
  • final dedicated Submit tab
  • auto-jumps to Submit after the last answer
  • three question types:
    • single — pick one option (default, numbered list with >)
    • checkbox — yes/no toggle (radio-style [●] / [○] for Yes/No)
    • multi-select — pick multiple options (checkbox-style [■] / [□], Space to toggle, Enter to confirm)
  • freeform fallback via Write my own answer (single-select only)
  • simple fallback parsing if the small model does not return valid JSON
  • simple A or B option inference
  • automatic type inference from question phrasing:
    • "all that apply", "which of", "select all" → multi-select
    • "do you want", "should I", "would you like" → checkbox
    • everything else → single
  • multi-select answers display as comma-separated labels in the submit tab and summary

Planned future enhancements

  • priority ranking
  • stronger validation and parsing
  • custom option entry in multi-select mode
  • conditional question flow (show q3 only if q2 is yes)

Files

  • skills/ask/SKILL.md — skill instructions for the main model
  • extensions/pi-ask/index.ts/ask, /ask-model, /ask-settings, ask_questions, and the interactive UI

Publishing

pi install npm:@alpino13/pi-ask