agent-tui: Command for Claude Code

.claude/commands/spec.md

spec is a command for Claude Code from pproenca/agent-tui. It costs 8 tokens per session (1,472 once invoked), scanned A, original, MIT.

A specification-writing command that turns a brainstorm into a complete implementation specification. A specification records the decisions and details needed to build a feature.

In plain words
What is it for?
It is for reading a feature brainstorm, asking about open decisions, and creating a spec file for a later test-driven development plan. TDD means designing tests alongside the implementation work.
Why use it?
It helps resolve unanswered questions and gives later planning work a clear, agreed source to follow.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

This is pproenca/agent-tui's own configuration. It tells Claude Code how to work on agent-tui itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything agent-tui configures →

Reuse

Borrowing it

Nothing to install: this file belongs to pproenca/agent-tui. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/pproenca/agent-tui/master/.claude/commands/spec.md
Clone the repo
git clone --depth 1 https://github.com/pproenca/agent-tui

Made for: Claude Code.

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 spec

README.md
[![agentmods](https://agentmods.dev/badge/commands/pproenca/agent-tui/spec/github.svg)](https://agentmods.dev/commands/pproenca/agent-tui/spec)
Your own site
<a href="https://agentmods.dev/commands/pproenca/agent-tui/spec"><img src="https://agentmods.dev/badge/commands/pproenca/agent-tui/spec/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 spec

Your own site · 80×15
<a href="https://agentmods.dev/commands/pproenca/agent-tui/spec"><img src="https://agentmods.dev/badge/commands/pproenca/agent-tui/spec.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,472 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.00008 $0.01472
Opus 5.5 $0.00003 $0.00589
Sonnet 5.5 $0.00002 $0.00294
Haiku 4.5 $0.00001 $0.00147

Measured 2mo ago against content hash d406ad4fbde8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

spec 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 2mo 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.

.claude/commands/spec.md · 318 lines

How it starts

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

Spec Command

Transform a brainstorm artifact into a formal, actionable specification with all decisions made.

Artifact Chain

.claude/specs/<feature-name>/
├── brainstorm.md    ← Input (from /brainstorm)
└── spec.md          ← Output (this command)

Downstream: /plan-tdd <feature-name> reads spec.md to create tasks.

Execution Flow

Step 1: Load Brainstorm

Extract feature name from argument: $ARGUMENTS

Look for brainstorm at: .claude/specs/<feature-name>/brainstorm.md

If not found:

No brainstorm found for '<feature-name>'.

Options:
○ Run `/brainstorm <feature-name>` first (Recommended)
○ Create spec from scratch
○ Point to different brainstorm file

If found, read the entire brainstorm.md file.

Step 2: Resolve Open Questions

Extract all - [ ] items from "Open questions" section.

For each unresolved question, use AskUserQuestion to get a decision:

Open Question: <question from brainstorm>

Context: <relevant context from brainstorm>

○ Option A: <if applicable>
○ Option B: <if applicable>
○ Need more research
○ Out of scope for now

If "Need more research" is selected, optionally use WebSearch or Task(Explore) to gather information, then re-ask.

Step 3: Choose Approach

If multiple approaches were identified in brainstorm:

Which approach should we pursue?

Based on brainstorm, the options are:

○ Approach A: <name>
  <brief description>
  Pros: <key pros>
  Cons: <key cons>

○ Approach B: <name>
  <brief description>
  Pros: <key pros>
  Cons: <key cons>

○ Hybrid: Combine elements
○ Need more analysis

Step 4: Define Scope

Present must-haves and nice-to-haves from brainstorm:

Confirm scope for this specification:

Must-haves (from brainstorm):
☑ <item 1>
☑ <item 2>
☐ <item 3> - move to nice-to-have?

Nice-to-haves:
☐ <item 1> - include in v1?
☐ <item 2>

Add anything missing?

Step 5: Architectural Decisions

Based on chosen approach and codebase context, make architectural decisions:

Read the full file on GitHub · 318 lines

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. 2mo ago First seen · 318 lines · 8 tokens per session scan A d406ad4fbde8

Subscribe to this mod's changes

spec is a command published in the GitHub repository pproenca/agent-tui (122 stars, last pushed 8d ago), licensed MIT. It adds 8 tokens to every session and 1,472 once invoked, about $0.0000 per session on Opus 5.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.