Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

sparc-spec — Claude Code skill: what it does, how to install

Runs the first SPARC phase: turns a feature description into requirements, acceptance criteria and constraints, then keeps the spec in ruflo memory.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add ruvnet/ruflo --skill sparc-spec -a claude-code
Open on GitHub

What sparc-spec does

This skill handles the specification phase. It reads the feature description against the codebase and lists functional and non-functional requirements, integration points, and the data the feature touches. Then it writes at least three acceptance criteria in Given/When/Then form and at least three edge cases, covering bad input, concurrent access and failing dependencies.

Underneath it is a chain of ruflo MCP calls. The skill opens a trajectory, looks for similar past specs through neural_predict, and checks for existing work under current-phase-{feature-slug} in the sparc-state namespace. The finished document lands in sparc-phases as spec-{feature-slug}, so it survives a session restart.

None of that runs without the ruflo MCP server connected: the memory and task tools are what the save steps call. At the end the skill prints the document with a summary table and points at /ruflo-sparc:ruflo-sparc advance to clear the gate and start pseudocode. Check the server is up before pointing it at something large.

What it helps with

  • gather requirements for a feature before any code exists
  • write testable acceptance criteria in Given/When/Then form
  • list performance, security and compatibility constraints
  • map edge cases and failure paths for external dependencies
  • store the spec in memory so it survives a restart

Example prompts for the agent

  • Run the SPARC specification phase for `<feature-description>` — PDF report export
  • sparc-spec: add OAuth login, gather requirements, acceptance criteria and constraints
  • Save the spec to `sparc-phases` as `spec-export-report` and show it as a table

How to install sparc-spec

1Skills CLI (Vercel)

npx skills add ruvnet/ruflo --skill sparc-spec -a claude-code

2Manually: put the files in place

~/.claude/skills/sparc-spec/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/sparc-spec/

From the same set104

The whole set →
ruflo ruvnet This skill adds multi-agent orchestration, memory, routing, and MCP tools to a project. Use it for swarm tasks and multi-step workflows. Claude Code CX Codex Cursor +1 4,000installs Swarm Orchestration ruvnet Skill for managing agent swarms with parallel execution, dynamic topology, and automatic load balancing. Use when a single agent is not enough and you need to orchestrate specialists of different types. Claude Code CX Codex Cursor +1 2,100installs github-project-management ruvnet Turns issue triage and board upkeep into gh and ruv-swarm calls: labels, subtasks, duplicate lookup. Useful when the tracker holds more tickets than order. Claude Code CX Codex Cursor +1 1,400installs github-workflow-automation ruvnet Automates GitHub Actions with AI agent coordination. Generates optimised pipelines, manages pull requests, analyzes failed runs, and deploys updates with risk assessment. Claude Code CX Codex Cursor +1 1,300installs github-code-review ruvnet Runs a swarm of specialized AI agents to inspect GitHub pull requests for security, performance, and architecture issues. Claude Code CX Codex Cursor +1 1,300installs stream-chain ruvnet Chains sequential agent steps together using streaming JSON flow and provides ready-to-run pipelines. Claude Code CX Codex Cursor +1 1,200installs flow-nexus-swarm ruvnet Deploy cloud-based AI agent swarms and define event-driven workflows with message queues. Use it to coordinate tasks, inspect runs, and scale a swarm. Claude Code CX Codex Cursor +1 1,200installs performance-analysis ruvnet Detects bottlenecks in Claude Flow swarms, profiles agent operations, and generates reports with actionable optimization recommendations. Claude Code CX Codex Cursor +1 1,200installs

Similar

verify Yeachan-Heo Turns "it should work" into evidence you can read: which check ran, what passed, and what stayed unverified. Claude Code CX Codex Cursor +1 642installs setup-matt-pocock-skills Matt Pocock This skill configures a repository for Matt Pocock's engineering skills by setting its issue tracker, triage labels, and domain docs layout. Run it before using the other skills. Claude Code 1,052,851installs to-tickets Matt Pocock Turns a plan, spec, or conversation into small end-to-end tickets with explicit blockers. Use it to agree on the work breakdown before tickets go to a tracker. Claude Code 711,230installs writing-plans Jesse Vincent This skill turns requirements for a multi-step task into an implementation plan before code changes begin. It helps when another engineer needs exact files, interfaces, and checks. Claude Code CX Codex 282,859installs caveman-review JuliusBrussee Turns code review comments into one line per finding: location, problem, fix. Useful when a diff or PR needs a fast pass without the filler. Claude Code CX Codex Cursor +1 410,700installs slideshow heygen-com Builds a HyperFrames deck you present live: slides, fragment reveals, branching hotspots and presenter notes. Meant for showing, not for rendering video. Claude Code CX Codex Cursor +1 415,500installs google-agents-cli-adk-code official Google A reference for the Agent Development Kit API: agent types, tools, callbacks, state and the graph Workflow API. Useful when you are writing agent code, not scaffolding a project. Claude Code CX Codex Cursor +1 511,400installs

Questions about sparc-spec

How do I install sparc-spec in Claude Code?

Run npx skills add ruvnet/ruflo --skill sparc-spec -a claude-code. The skill file then sits at ~/.claude/skills/sparc-spec/SKILL.md.

What does sparc-spec do?

It runs phase one of the SPARC method: requirements, acceptance criteria, constraints, edge cases and integration points, saved afterwards to ruflo memory.

Does it work without the ruflo MCP server?

No. The skill calls ruflo memory, task and trajectory tools to check prior work and store the spec, so the server has to be connected.

Source text

SKILL.md · MIT
---
name: sparc-spec
description: Run the SPARC Specification phase — gather requirements, define acceptance criteria, identify constraints, and store the spec in memory
argument-hint: "<feature-description>"
allowed-tools: mcp__plugin_ruflo-core_ruflo__memory_store mcp__plugin_ruflo-core_ruflo__memory_search mcp__plugin_ruflo-core_ruflo__memory_retrieve mcp__plugin_ruflo-core_ruflo__task_create mcp__plugin_ruflo-core_ruflo__task_update mcp__plugin_ruflo-core_ruflo__task_complete mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-start mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-step mcp__plugin_ruflo-core_ruflo__neural_predict Bash Read Edit
---

# SPARC Specification Phase

Run Phase 1 of the SPARC methodology: define what must be built and how success is measured.

## When to use

When starting a new feature or project that needs structured requirements gathering before any code is written. This phase produces the foundational specification that all subsequent phases (Pseudocode, Architecture, Refinement, Completion) build upon.

## Steps

1. **Initialize phase tracking** — call `mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-start` with metadata `{ "phase": "specification", "feature": "$ARGUMENTS" }`

2. **Check for prior work** — call `mcp__plugin_ruflo-core_ruflo__memory_retrieve` with namespace `sparc-state` and exact key `current-phase-{feature-slug}` to see if this workflow exists. If it does, retrieve existing artifacts. If not, initialize state at that exact key with phase 1, `status: "active"`, and `startedAt` and `updatedAt` set to the current ISO timestamp.

3. **Search for similar patterns** — call `mcp__plugin_ruflo-core_ruflo__neural_predict` with the feature description to find relevant past specifications and learned patterns

4. **Gather requirements** — analyze the feature description and the codebase to identify:
   - **Functional requirements**: what the feature must do (user-facing behaviors)
   - **Non-functional requirements**: performance targets, security constraints, scalability needs
   - **Integration points**: what existing systems or APIs are affected
   - **Data requirements**: what data is created, read, updated, or deleted

5. **Define acceptance criteria** — write at least 3 concrete, testable acceptance criteria in Given/When/Then format:
   ```
   AC-1: Given [precondition], when [action], then [expected result]
   AC-2: Given [precondition], when [action], then [expected result]
   AC-3: Given [precondition], when [action], then [expected result]
   ```

6. **Identify constraints** — document:
   - Performance constraints (latency, throughput, resource limits)
   - Security constraints (authentication, authorization, data sensitivity)
   - Compatibility constraints (browser support, API versions, backward compatibility)
   - Infrastructure constraints (deployment environment, dependencies)

7. **Map edge cases** — list at least 3 edge cases or failure scenarios:
   - What happens with invalid input?
   - What happens under concurrent access?
   - What happens when external dependencies fail?

8. **Store specification** — call `mcp__plugin_ruflo-core_ruflo__memory_store` with:
   - Namespace: `sparc-phases`
   - Key: `spec-{feature-slug}`
   - Value: JSON with `{ status: "complete", requirements, acceptanceCriteria, constraints, edgeCases, integrationPoints }`

9. **Update phase state** — call `mcp__plugin_ruflo-core_ruflo__memory_store` with:
   - Namespace: `sparc-state`
   - Key: `current-phase-{feature-slug}`
   - Value: preserve existing state fields, update artifacts list to include the spec key, and set `updatedAt` to the current ISO timestamp

10. **Record trajectory step** — call `mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-step` with the specification summary

11. **Present specification** — display the full specification document to the user with a summary table and suggest running `/ruflo-sparc:ruflo-sparc advance` to pass the gate and move to the Pseudocode phase

## Output format

```
# Specification: {Feature Name}

## Requirements
### Functional
- FR-1: ...
- FR-2: ...

### Non-Functional
- NFR-1: ...

## Acceptance Criteria
- AC-1: Given ..., when ..., then ...
- AC-2: Given ..., when ..., then ...
- AC-3: Given ..., when ..., then ...

## Constraints
- Performance: ...
- Security: ...
- Compatibility: ...

## Edge Cases
- EC-1: ...
- EC-2: ...
- EC-3: ...

## Integration Points
- IP-1: ...

---
Phase 1 complete. Run `/ruflo-sparc:ruflo-sparc advance` to pass the gate check.
```

© ruvnet · MIT · ruvnet/ruflo

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor