ask-gate

ask-gate is a skill for Claude Code from allemaar/open-skills. It costs 118 tokens per session (1,692 once invoked), scanned A, original, Apache-2.0.

A protocol for deciding when a coding agent should ask the user a question. It separates questions the agent can answer itself from questions that genuinely require the user's choice.

In plain words
What is it for?
Use it before showing an AskUserQuestion prompt, either automatically or when quality-checking a specific question.
Why use it?
It helps avoid unnecessary interruptions and improves the framing of important, high-stakes, branching, or irreversible questions.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: names the AskUserQuestion tool; mentions Claude Code; mentions Codex.

Part of the open-skills plugin — 58 skills shipped together

Good fit Use it before showing an AskUserQuestion prompt, either automatically or when quality-checking a specific question.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/allemaar/open-skills/ask-gate
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.

Any agent
npx skills add allemaar/open-skills --skill ask-gate
Clone the repo
git clone --depth 1 https://github.com/allemaar/open-skills

Made for: Claude Code.

Or install open-skills, the plugin that ships this one along with the rest of its 58 skills.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/allemaar/open-skills/ask-gate/github.svg)](https://agentmods.dev/skills/allemaar/open-skills/ask-gate)
Your own site
<a href="https://agentmods.dev/skills/allemaar/open-skills/ask-gate"><img src="https://agentmods.dev/badge/skills/allemaar/open-skills/ask-gate/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ask-gate

Your own site · 80×15
<a href="https://agentmods.dev/skills/allemaar/open-skills/ask-gate"><img src="https://agentmods.dev/badge/skills/allemaar/open-skills/ask-gate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 118 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,692 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00118 $0.01692
Opus 5 $0.00059 $0.00846
Sonnet 5 $0.00024 $0.00338
Haiku 4.5 $0.00012 $0.00169

Measured 10d ago against content hash 17bb88266721, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

ask-gate 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 10d ago.

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-gate/SKILL.md · 96 lines

How it starts

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

/ask-gate

Ask-Gate (AGP) governs the moment just before a handler-facing question. Asking is cheap to type and expensive to waste — a question the agent could have answered itself is a nag, and a high-stakes question asked with the wrong options or framing burns the one interaction that mattered. AGP makes AskUserQuestion a deliberate, quality-gated reflex instead of a casual reach: triage whether to ask at all, ask routine questions directly after a quick checklist, and escalate the questions that actually matter through /insight-critique then /insight-assess before surfacing them.

AGP is invoked two ways: automatically, as the standard reflex before any AskUserQuestion (it can fire inside COP's surface step, inside NSP's surface step, or standalone); or directly, as /ask-gate to quality-gate a specific pending question.

Structured execution spec: protocol.yon. Read it for the canonical rules and step sequence; this file is explanation. The two must stay in sync — if you edit one, update the other and refresh the @STAMP date.

The protocol — three steps

1. Triage (anti-nag)

A question is the handler's to answer only if it cannot be resolved from the request, the code, or sensible defaults. If it can be resolved, resolve it, state the choice you made, and do not ask. Asking a resolvable question is the single most common nag failure — this gate exists to kill it. This mirrors COP's step-1 anti-nag triage; if nothing genuinely needs the handler, AGP surfaces nothing.

2. Classify stakes

If a question is warranted, classify it:

  • Routine — low-stakes, reversible, one obvious framing (a preference, an NSP "which next skill?", a yes/no with a clear default). → Routine path (3a).
  • High-stakes — architecturally load-bearing, hard to reverse, commits resources or time, or 3+ viable options where the framing itself is uncertain, or the answer shapes a plan/roadmap. → High-stakes path (3b).

Read the full file on GitHub · 96 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. 10d ago First seen · 96 lines · 118 tokens per session scan A 17bb88266721

Subscribe to this mod's changes

ask-gate is a skill published in the GitHub repository allemaar/open-skills (14 stars, last pushed 23d ago), licensed Apache-2.0. It adds 118 tokens to every session and 1,692 once invoked, about $0.0006 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.