0_spec

A tool that turns requirements in a project's .claude/input/ folder into a detailed feature specification before coding begins.

In plain words
What is it for?
Use it to prepare specs for new features, including relevant project references and, when available, linked work items such as tickets or issues.
Why use it?
It organizes scattered requirements and project context into a written plan, reducing uncertainty before implementation.

Skill for Claude CodeCodex

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 skills/dixus/claudeframework/0_spec
Any agent
npx skills add dixus/claudeframework --skill 0_spec
Clone the repo
git clone --depth 1 https://github.com/dixus/claudeframework

Made for: Claude Code, Codex.

Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,853 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.00026 $0.01853
Opus 5 $0.00013 $0.00927
Sonnet 5 $0.00005 $0.00371
Haiku 4.5 $0.00003 $0.00185

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

Security

Grade A, and why

0_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.

.claude/skills/0_spec/SKILL.md · 62 lines

How it starts

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

Create a detailed spec for the following feature: $ARGUMENTS

$ARGUMENTS is an optional feature name or focus hint. The primary requirements source is .claude/input/.

Steps:

  1. Read CLAUDE.md for project context and conventions
  2. Read all files in .claude/context/ if the directory exists — these are long-lived project references (schemas, API docs, glossaries) 2b. Resolve linked work items — if the input or $ARGUMENTS mentions a ticket/issue ID (e.g. "Ticket 1234", "#1234", "1234.Improvement..."), try to fetch it using the project's configured work-item tracker. Check which MCP tools are available (Azure DevOps, Jira, Linear, GitHub Issues, or similar). If a tool is available, fetch the ticket with comments and linked items. Review resolved related/parent items: their linked commits, branches, and PRs point to prior work. Run git show <sha> or git log master..<branch> on those references and fold the actual implementation status into the spec. Doing this before codebase exploration prevents you from re-scoping work that is already done elsewhere. If no tracker MCP tool is available, skip this step.
  3. Read all files in .claude/input/ if the directory exists — these are the raw requirements materials (docs, images, wireframes, PDFs). Treat them as the primary source of truth for what to build 3b. Historical pattern awareness — if the subagent prompt includes historical pattern analysis (from /ship Step 1b), use it to increase spec depth in problem areas. For example:
    • If prior features in this area had recurring validation issues → add an explicit "Input validation rules" subsection under Implementation notes listing every input, its type, its constraints, and what happens on invalid input
    • If prior features had recurring edge-cases issues → add an explicit "Edge cases" subsection listing boundary conditions, empty states, concurrent access scenarios, and off-by-one risks
    • If prior features had recurring types issues → add explicit type signatures in Implementation notes for all new/changed functions
    • If prior features had high review cycles (>2 avg) → write more granular test cases and tighter validation criteria
    • If no historical data is provided (standalone /0_spec run), skip this step — it changes nothing about the default behavior
  4. Explore the codebase to understand the relevant architecture — find and read the files most likely affected by this feature 4b. Check completed work: Before deferring any scope (especially frontend) because a dependency "is not yet implemented", verify the actual completion status. If a work-item tracker was queried in Step 2b, resolved related/parent items expose linked commits and branches. Use git show <sha> or git log master..<branch> to inspect what was actually built. If no tracker is available, check git log for related branch names or commit messages. Never assume a dependency is missing — check first.
  5. Identify: which files will change, what new files are needed, and what existing patterns to follow
  6. Before writing the spec, surface any ambiguous requirements or missing decisions. Ask 2–3 targeted clarifying questions — use selectable answer options where possible to keep responses fast. Wait for answers before proceeding. Skip this step if the requirements are already unambiguous. 6b. For PRDs that involve UI/UX decisions or architectural patterns not explicitly stated in the requirements, always surface these as questions — even if the PRD appears complete. Mark them as "(Implementation choice — not in PRD)" so the user knows they are optional and can be skipped if Claude should decide freely. Examples: component selection, state management granularity, polling intervals, retry logic, file upload UX patterns, where to place cross-cutting concerns in the service layer. 6c. After writing the spec, explicitly state which decisions were made freely (not specified in the PRD) under a section called "Decisions made by Claude". This makes assumptions visible and prevents silent architectural drift.
  7. Write the spec to .claude/specs/<kebab-case-feature-name>.md with these sections:
    • Goal: one-sentence summary
    • Requirements: bulleted list of what it must do
    • Out of scope: what it explicitly will not do
    • Affected files: list existing files that will change and why
    • New files: list any new files needed
    • Patterns to mirror: 2–3 specific existing files whose structure, naming, or style the implementation should follow — this is the codebase intelligence that lets /1_implement match conventions without exploring
    • Implementation notes: key decisions, edge cases to handle
    • UX concept (REQUIRED when the PRD includes a Frontend section — never silently drop frontend scope; if deferring, state the target PRD explicitly):
      • Component tree: hierarchical breakdown of components needed (leaf → container), noting which are new vs existing. Use indentation to show nesting.
      • Interaction flows: describe each distinct user journey as a numbered sequence of steps. For multi-step flows (wizards, forms, onboarding), include: trigger → intermediate states → success state → error/edge states. Use mermaid stateDiagram-v2 for complex flows with branching.
      • State & data flow: which component owns which state, what gets lifted, what goes into global store vs local state. Map data dependencies (e.g. "ResultsChart reads scores from Zustand store, computed by calculateScores() in scoring engine").
      • Responsive behavior: specify layout changes at breakpoints if the feature involves layout (e.g. "stack cards vertically below md"). Skip if not applicable.
      • Accessibility: required keyboard navigation, ARIA roles, focus management, screen reader considerations. At minimum: all interactive elements keyboard-reachable, form inputs labeled, error states announced.
      • Reuse check: list existing UI components/patterns in the codebase that can be reused or extended instead of built from scratch. Avoid creating new components when existing ones can be composed.
    • Validation criteria: explicit, observable conditions that confirm the feature is done (e.g. "navigating to /results shows a radar chart with 6 axes"); complement the test cases. These will be verified by both /1_implement and /3_fix — write them precisely enough to be checkable.
    • Test cases: describe expected behavior with enough specificity to write a failing test from each case — include inputs, expected outputs, and key error/edge cases. Include both pure-function tests (engine/logic) AND component-level rendering tests (e.g. "renders X when prop Y") — implementations consistently skip component tests when only logic tests are listed
    • Decisions made by Claude: list any architectural or implementation decisions that were not specified in the requirements, each with a risk classification — makes assumptions visible to the reviewer. Risk levels: (low) = naming, file structure, cosmetic choices; (medium) = state management, data flow, API shape; (high) = security, auth, data model, persistence strategy. High-risk decisions should be confirmed by the user before implementation proceeds.
  8. After writing: count the total files listed under "Affected files" + "New files". If the total exceeds complexity_gate_max_files from CLAUDE.md (default: 10), add a ⚠ Complexity flag section noting that this feature may be too large for a single implementation session and suggesting decomposition into sub-specs.
  9. Suggest to the user that they move the processed files from .claude/input/ to .claude/archive/ now that the spec is written.

Read the full file on GitHub · 62 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 · 62 lines · 26 tokens per session scan A 0e3e79e07b6d

Subscribe to this mod's changes

0_spec is a skill published in the GitHub repository dixus/claudeframework (10 stars, last pushed 4mo ago), licensed MIT. It adds 26 tokens to every session and 1,853 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.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens