generate-spec

generate-spec is a command for coding agents from Viniciuscarvalho/mindkit. It costs 6 tokens per session (827 once invoked), scanned A, original, MIT.

A command that turns a product requirements document (PRD) into a technical specification for building the feature.

In plain words
What is it for?
Use it to review requirements, identify affected files and modules, compare existing libraries with custom code, and save an implementation-ready tech spec.
Why use it?
It reduces the work of translating product goals into implementation details and checking how the feature fits the existing codebase.

Command

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/viniciuscarvalho/mindkit/generate-spec
Clone the repo
git clone --depth 1 https://github.com/Viniciuscarvalho/mindkit

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 generate-spec

README.md
[![agentmods](https://agentmods.dev/badge/commands/viniciuscarvalho/mindkit/generate-spec.svg)](https://agentmods.dev/commands/viniciuscarvalho/mindkit/generate-spec)
Your own site
<a href="https://agentmods.dev/commands/viniciuscarvalho/mindkit/generate-spec"><img src="https://agentmods.dev/badge/commands/viniciuscarvalho/mindkit/generate-spec.svg" alt="Measured on agentmods" height="20"></a>
Per session 6 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 827 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.00006 $0.00827
Opus 5 $0.00003 $0.00413
Sonnet 5 $0.00001 $0.00165
Haiku 4.5 $0.00001 $0.00083

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

Security

Grade A, and why

generate-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 3d 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.

templates/commands/generate-spec.md · 97 lines

How it starts

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

<system_instructions> You are an expert in technical specifications focused on producing clear, implementation-ready Tech Specs based on a complete PRD. Your outputs must be concise, architecture-focused, and follow the provided template.

Primary Objectives

  1. Translate PRD requirements into technical guidance and architectural decisions
  2. Perform deep project analysis before drafting any content
  3. Evaluate existing libraries vs custom development
  4. Generate a Tech Spec using the standardized template and save it in the correct location

Templates and Inputs

  • Tech Spec template: {{DOCS}}/specs/techspec-template.md
  • Required PRD: {{DOCS}}/tasks/prd-[feature-name]/prd.md
  • Output document: {{DOCS}}/tasks/prd-[feature-name]/techspec.md

Prerequisites

  • Review project standards in {{DOCS}}/specs/code-standards.md
  • Confirm PRD exists at {{DOCS}}/tasks/prd-[feature-name]/prd.md

Workflow

1. Analyze PRD (Mandatory)

  • Read the full PRD
  • Identify misplaced technical content
  • Extract main requirements, constraints, success metrics, and rollout phases

2. Deep Project Analysis (Mandatory)

  • Discover involved files, modules, interfaces, and integration points
  • Map symbols, dependencies, and critical paths
  • Explore solution strategies, patterns, risks, and alternatives
  • Perform broad analysis: callers/callees, configs, middleware, persistence, concurrency, error handling, tests, infra

3. Technical Clarifications (Mandatory)

Ask focused questions about:

  • Domain placement
  • Data flow
  • External dependencies
  • Core interfaces
  • Test focus

4. Standards Compliance Mapping (Mandatory)

  • Map decisions to {{DOCS}}/specs/code-standards.md
  • Highlight deviations with justification and compliant alternatives

5. Generate Tech Spec (Mandatory)

  • Use {{DOCS}}/specs/techspec-template.md as the exact structure
  • Provide: architecture overview, component design, interfaces, models, endpoints, integration points, impact analysis, testing strategy, observability
  • Keep up to ~2,000 words
  • Avoid repeating PRD functional requirements; focus on how to implement

Read the full file on GitHub · 97 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. 3d ago First seen · 97 lines · 6 tokens per session scan A 4ca72cfd8a9a

Subscribe to this mod's changes

generate-spec is a command published in the GitHub repository Viniciuscarvalho/mindkit (10 stars, last pushed 5mo ago), licensed MIT. It adds 6 tokens to every session and 827 once invoked, about $0.0000 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.