ask-user

ask-user is a skill for Claude Code, Codex from edlsh/pi-ask-user. It costs 48 tokens per session (1,371 once invoked), scanned A, original, MIT.

A decision checkpoint that asks for an explicit choice before an architectural, security, deployment, or other hard-to-reverse change, or when requirements are unclear.

In plain words
What is it for?
Review options and collect the user's decision before changing architecture, schemas, APIs, deployment plans, or security settings.
Why use it?
It prevents an agent from making a consequential assumption without confirming the intended direction.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/edlsh/pi-ask-user/ask-user
Any agent
npx skills add edlsh/pi-ask-user --skill ask-user
Clone the repo
git clone --depth 1 https://github.com/edlsh/pi-ask-user

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ask-user

README.md
[![agentmods](https://agentmods.dev/badge/skills/edlsh/pi-ask-user/ask-user.svg)](https://agentmods.dev/skills/edlsh/pi-ask-user/ask-user)
Your own site
<a href="https://agentmods.dev/skills/edlsh/pi-ask-user/ask-user"><img src="https://agentmods.dev/badge/skills/edlsh/pi-ask-user/ask-user.svg" alt="Measured on agentmods" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,371 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00048 $0.01371
Opus 5 $0.00024 $0.00685
Sonnet 5 $0.00010 $0.00274
Haiku 4.5 $0.00005 $0.00137

Measured yesterday against content hash 6ed9c3ef88a7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ask-user scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/ask-user/SKILL.md · 164 lines

How it starts

The opening of the file, as written. The whole thing — 164 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Ask User Decision Gate

Use this skill to force explicit user alignment before consequential decisions.

This skill is about decision control, not general chit-chat.

Non-negotiable rule

Invoke ask_user before proceeding when any of the following is true:

  1. The next step changes architecture, schema, API contracts, deployment strategy, or security posture.
  2. The work is costly to undo (large refactor, migration, destructive edit, production-facing behavior change).
  3. Requirements, constraints, or success criteria are unclear, conflicting, or missing.
  4. Multiple valid options exist and the trade-off is preference-dependent.
  5. You are about to assume something that can materially change implementation.

Do not skip this gate unless the user has already provided a clear, explicit decision for the exact trade-off.

Agent Protocol Handshake (required)

Follow this handshake in order.

1) Detect boundary

Classify the current step as:

  • high_stakes
  • ambiguous
  • both
  • clear (no gate needed)

If classification is not clear, continue.

2) Gather evidence first

Before asking, gather context from available tools (read, bash, exa, ref, etc.). Do not ask the user to decide blind.

3) Synthesize context

Prepare a short neutral summary (3-7 bullets or short paragraph) covering:

  • current state
  • key constraints
  • trade-offs
  • recommendation (if any)

4) Ask one focused question

Call ask_user with one decision at a time:

  • question: concrete decision prompt
  • context: synthesized summary
  • options: 2-5 clear choices when possible
  • allowMultiple: false unless independent selections are genuinely needed
  • allowFreeform: usually true
  • displayMode (optional): "overlay" (default) or "inline". Use "inline" when preceding assistant context (summary, trade-offs, recommendation) is essential to the decision and should remain visible — overlays cover the conversation underneath. The user may set a personal default via the PI_ASK_USER_DISPLAY_MODE environment variable; only pass this when you intentionally want to override it for one call.
  • contextExpanded (optional): true opens oversized context fully expanded instead of collapsed behind a one-line summary. The user may set a personal default via PI_ASK_USER_CONTEXT_EXPANDED; only pass this when the context is the evidence the user needs to weigh the options.

Read the full file on GitHub · 164 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed · +1 lines 6ed9c3ef88a7
  2. 5d ago First seen · 163 lines · 48 tokens per session scan A 4e7615a29066

Subscribe to this mod's changes

ask-user is a skill published in the GitHub repository edlsh/pi-ask-user (149 stars, last pushed 2d ago), licensed MIT. It adds 48 tokens to every session and 1,371 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.