pdir-criar-spec

pdir-criar-spec is a command for coding agents from hmaurus/masterclaude. It costs 25 tokens per session (520 once invoked), scanned A, original, MIT.

A specification-writing command turns a software idea into a detailed document after reviewing the project and interviewing the developer. A specification describes what should be built and how it should behave.

In plain words
What is it for?
Use it to create a complete spec for a new feature or project. The resulting document can then be used as input for a planning step.
Why use it?
It helps uncover technical details, user-interface needs, edge cases, concerns, and tradeoffs before implementation begins.

Command

Part of the pdir-workflow plugin — 7 commands shipped together

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 commands/hmaurus/masterclaude/pdir-criar-spec
Clone the repo
git clone --depth 1 https://github.com/hmaurus/masterclaude

Or install pdir-workflow, the plugin that ships this one along with the rest of its 7 commands.

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 pdir-criar-spec

README.md
[![agentmods](https://agentmods.dev/badge/commands/hmaurus/masterclaude/pdir-criar-spec.svg)](https://agentmods.dev/commands/hmaurus/masterclaude/pdir-criar-spec)
Your own site
<a href="https://agentmods.dev/commands/hmaurus/masterclaude/pdir-criar-spec"><img src="https://agentmods.dev/badge/commands/hmaurus/masterclaude/pdir-criar-spec.svg" alt="Measured on agentmods" height="20"></a>
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 520 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.00025 $0.00520
Opus 5 $0.00013 $0.00260
Sonnet 5 $0.00005 $0.00104
Haiku 4.5 $0.00003 $0.00052

Measured 5d ago against content hash f366a0cac581, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pdir-criar-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 5d 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.

plugins/pdir-workflow/commands/pdir-criar-spec.md · 65 lines

What it actually says

PDIR: Criar Spec

Cria um documento de especificação completo a partir de uma entrevista em profundidade com o usuário. Baseado no Interview Pattern documentado pela Anthropic.

Este comando NÃO planeja nem implementa. Ele produz apenas a spec — o input ideal para o plan-mode do Claude Code.

Em qualquer passo, se algo falhar ou faltar informação, informe o erro e pergunte ao usuário como prosseguir.

Processar $ARGUMENTS

Extrair do $ARGUMENTS:

  • Descrição da demanda: o que o usuário quer construir

Se vazio: perguntar ao usuário o que ele quer construir.

Instruções

1. Explorar Contexto do Projeto

Ler CLAUDE.md, README.md e arquivos relacionados à demanda. Entender stack, padrões e estrutura existentes para fazer perguntas informadas.

2. Entrevistar o Usuário

Entrevistar o usuário em profundidade usando AskUserQuestion. Cobrir:

  • Implementação técnica
  • UI/UX
  • Edge cases
  • Preocupações
  • Tradeoffs

Regras da entrevista:

  • Focar nas partes difíceis que o usuário pode não ter considerado
  • Ir fundo — se uma resposta revela complexidade, explorar antes de avançar
  • Continuar até cobrir tudo — não encerrar prematuramente

3. Gerar Spec

Criar docs/projeto/specs/ se não existir.

Saída: docs/projeto/specs/spec-[nome-da-demanda].md

Escrever uma spec completa cobrindo tudo que foi discutido na entrevista. Formato livre — estruturar conforme fizer sentido para a demanda, sem template rígido.

4. Revisar com o Usuário

Apresentar a spec e perguntar se algo está faltando, errado ou ambíguo. Ajustar até o usuário aprovar.

5. Feedback Final

Spec criada!

Arquivo: docs/projeto/specs/spec-[nome].md

Próximos passos:
1. /clear — limpar contexto antes de implementar
2. Entrar em plan-mode e pedir para implementar a spec:
   "Planeje e implemente a spec em docs/projeto/specs/spec-[nome].md"
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. 5d ago First seen · 65 lines · 25 tokens per session scan A f366a0cac581

Subscribe to this mod's changes

pdir-criar-spec is a command published in the GitHub repository hmaurus/masterclaude (2 stars, last pushed 1mo ago), licensed MIT. It adds 25 tokens to every session and 520 once invoked, about $0.0001 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-31.