spec

A planning command that studies your existing code and creates a detailed specification for a proposed feature. It documents requirements, design, implementation steps, tests, and acceptance criteria based on the project’s current patterns.

In plain words
What is it for?
Use it to plan a feature, identify files to create or change, define how the parts connect, and outline unit tests, integration tests, and edge cases.
Why use it?
It replaces a generic plan with one that fits your actual files, dependencies, naming, and testing practices. This gives you an agreed plan before code changes begin.

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/nxtg-ai/forge-plugin/spec
Clone the repo
git clone --depth 1 https://github.com/nxtg-ai/forge-plugin
Per session 0 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,152 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.00000 $0.01152
Opus 5 $0.00000 $0.00576
Sonnet 5 $0.00000 $0.00230
Haiku 4.5 $0.00000 $0.00115

Measured 2d ago against content hash f5d69f569e5f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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.

docs/commands/spec.md · 115 lines

How it starts

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

/forge:spec

Generate a comprehensive technical specification for a feature by analyzing your codebase and producing a structured plan with requirements, architecture, implementation steps, and test cases.

Level L1 Vibe Coder
Category Feature Development
Syntax /forge:spec [feature name or description] [--interactive] [--output <file>]

What It Does

/forge:spec is the planning-only counterpart to /forge:feature. It analyzes your existing codebase -- directory structure, code patterns, test conventions, and available dependencies -- then produces a structured specification document covering requirements (functional and non-functional), architecture (components, data models, integration points), implementation plan (files to create, files to modify, ordered steps), testing strategy (unit tests, integration tests, edge cases), and acceptance criteria.

The spec is grounded in your actual code. Instead of producing a generic template, Forge reads your existing implementations via Glob and Grep to understand naming conventions, module organization, and testing patterns. The resulting spec follows those patterns so that implementation feels natural, not foreign.

Without this command, writing a spec means manually surveying the codebase, documenting the plan in a separate file, and hoping you did not miss an integration point. /forge:spec automates the survey and produces a spec that directly feeds into /forge:feature for implementation.

Syntax & Options

/forge:spec [feature name or description] [--interactive] [--output <file>]
Option Description
feature name A short name or description of what to spec. If omitted, the command asks interactively.
--interactive Step-by-step spec building with guided questions about requirements, constraints, and test coverage.
--output <file> Save the spec to a specific file path instead of the default .claude/plans/{slug}-spec.md.

Read the full file on GitHub · 115 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. 2d ago First seen · 115 lines · 0 tokens per session scan A f5d69f569e5f

Subscribe to this mod's changes

spec is a command published in the GitHub repository nxtg-ai/forge-plugin (5 stars, last pushed 12d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,152 tokens. 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.