spec

spec is a command for Claude Code from nxtg-ai/forge-plugin. It costs 5 tokens per session (642 once invoked), scanned A, original, MIT.

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 for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: names the AskUserQuestion tool.

Part of the nxtg-forge plugin — 27 skills, 24 commands, 33 agents shipped together

Good fit 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.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/nxtg-ai/forge-plugin/spec
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.

Clone the repo
git clone --depth 1 https://github.com/nxtg-ai/forge-plugin

Made for: Claude Code.

Or install nxtg-forge, the plugin that ships this one along with the rest of its 27 skills, 24 commands, 33 agents.

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/nxtg-ai/forge-plugin/spec/github.svg)](https://agentmods.dev/commands/nxtg-ai/forge-plugin/spec)
Your own site
<a href="https://agentmods.dev/commands/nxtg-ai/forge-plugin/spec"><img src="https://agentmods.dev/badge/commands/nxtg-ai/forge-plugin/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/nxtg-ai/forge-plugin/spec"><img src="https://agentmods.dev/badge/commands/nxtg-ai/forge-plugin/spec.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 642 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.00005 $0.00642
Opus 5.5 $0.00002 $0.00257
Sonnet 5.5 $0.00001 $0.00128
Haiku 4.5 $0.00001 $0.00064

Measured 12d ago against content hash ae8dc8605bad, 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 12d 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/nxtg-forge/commands/spec.md · 122 lines

How it starts

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

NXTG-Forge Spec Generator

You are the Spec Writer - generate comprehensive technical specifications from feature descriptions.

Parse Arguments

Arguments received: $ARGUMENTS

  • If feature name provided: generate spec for that feature
  • --interactive: Step-by-step spec building with questions
  • --output <file>: Save to specific file
  • No arguments: ask what to spec using AskUserQuestion

Step 1: Understand the Feature

If not in interactive mode, analyze the feature description and the current codebase to understand:

  1. What exists already (use Glob/Grep to find related code)
  2. What patterns are used (read existing implementations)
  3. What dependencies are available (read package.json)

Step 2: Generate Spec

Create a structured specification:

# Feature Spec: {feature_name}

## Overview
{1-2 sentence description}

## Requirements

### Functional
- {requirement 1}
- {requirement 2}
- {requirement 3}

### Non-Functional
- {performance requirement}
- {security requirement}

## Architecture

### Components
{What new components/modules are needed}

### Data Models
{New types/interfaces needed}

### Integration Points
{How this connects to existing code}

## Implementation Plan

### Files to Create
- `src/{path}/{file}.ts` - {purpose}
- `src/{path}/__tests__/{file}.test.ts` - {tests}

### Files to Modify
- `src/{existing}.ts` - {what changes}

### Implementation Steps
1. {step}
2. {step}
3. {step}

## Testing

### Unit Tests
- {test case 1}
- {test case 2}

### Integration Tests
- {test case}

### Edge Cases
- {edge case}

## Acceptance Criteria
- [ ] {criterion 1}
- [ ] {criterion 2}
- [ ] {criterion 3}
- [ ] All tests passing
- [ ] TypeScript compiles without errors

## Estimated Complexity
{LOW / MEDIUM / HIGH}

## Dependencies
- {any external libraries needed}

Step 3: Save Spec

Create .claude/plans/ directory if it doesn't exist: mkdir -p .claude/plans

Save to .claude/plans/{feature-slug}-spec.md

Spec saved: .claude/plans/{feature-slug}-spec.md

Next steps:
  /nxtg-forge:feature {feature_name}   Implement this feature
  /nxtg-forge:checkpoint save           Save state before starting

Read the full file on GitHub · 122 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. 12d ago Changed ae8dc8605bad
  2. 1mo ago Changed · +7 lines · +5 tokens per session c247a441482e
  3. 1mo 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 (6 stars, last pushed 4d ago), licensed MIT. It adds 5 tokens to every session and 642 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-31.