Agent skill

Sparc Refine

by ruvnet in ruvnet/ruflo

Run the SPARC Refinement and Completion phases — review code, improve test coverage, validate against specification, and generate documentation

MITAuto-check: notesTesting & QA

Install Sparc Refine

skills CLI
$ npx skills add ruvnet/ruflo --skill sparc-refine -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ruvnet/ruflo sparc-refine --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ruvnet/ruflo.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/ruflo-sparc/skills/sparc-refine .claude/skills/sparc-refine && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
sparc-refine
GitHub stars
74k
Token cost
~1.5k tokens
SKILL.md length
500 words
Files
1
Skills in repo
264
Repo updated
First seen
Licence
MIT

At a glance

Run the SPARC Refinement and Completion phases — review code, improve test coverage, validate against specification, and generate documentation

  • Works in 2 steps: Refinement → Completion
  • Tasks that involve Code review
  • SKILL.md covers When to use, Steps and Output format
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Sparc Refine is an agent skill from ruvnet/ruflo. Run the SPARC Refinement and Completion phases — review code, improve test coverage, validate against specification, and generate documentation

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Code review and Test coverage. The repository describes itself as: 🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory…. The licence is MIT.

When your agent uses it

  • Tasks that involve Code review
  • Tasks that involve Test coverage

Example prompts

  • “/sparc-refine”

Requirements

  • Pre-approved tools (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-step, mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-end, mcp__plugin_ruflo-core_ruflo__neural_train, mcp__plugin_ruflo-core_ruflo__neural_predict, Bash, Read, Write, Edit

Workflow steps

2 steps, taken from the step headings in SKILL.md.

  1. Refinement
  2. Completion

What it can do on your machine

Read from SKILL.md and the folder at commit 58e0ae7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • 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-step
    • mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-end
    • mcp__plugin_ruflo-core_ruflo__neural_train
    • mcp__plugin_ruflo-core_ruflo__neural_predict

    …and 4 more on the same allowed-tools line.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Sparc Refine loads about 1.5k tokens when it runs. Until then it costs about 39 tokens; SKILL.md has 500 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~39
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: mcp__plugin_ruflo-core_ruflo__memory_store, mcp__plugin_ruflo-core_ruflo__memory_search, mcp__plugin

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ruvnet/ruflo at commit 58e0ae7, republished under its MIT licence (© ruvnet). 500 words, ~1,510 tokens.

Download SKILL.mdSave it as .claude/skills/sparc-refine/SKILL.md (or your agent's skills folder).
name
sparc-refine
description
Run the SPARC Refinement and Completion phases — review code, improve test coverage, validate against specification, and generate documentation
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-step, mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-end, mcp__plugin_ruflo-core_ruflo__neural_train, mcp__plugin_ruflo-core_ruflo__neural_predict, Bash, Read, Write, Edit

SPARC Refinement + Completion

Run Phases 4 and 5 of the SPARC methodology: iteratively improve through code review and testing, then finalize with validation, documentation, and deployment readiness.

When to use

After the Architecture phase is complete and its gate has been passed. This skill covers the final two phases that bring a feature from implemented to production-ready.

Steps

Phase 4 — Refinement
  1. Retrieve all prior artifacts — call mcp__plugin_ruflo-core_ruflo__memory_search with namespace sparc-phases and query for the feature slug. Load spec (acceptance criteria), pseudocode, and architecture.

  2. Retrieve phase state — call mcp__plugin_ruflo-core_ruflo__memory_search with namespace sparc-state to confirm we are in Phase 4.

  3. Code review — review the implementation against: a. Specification compliance: does every acceptance criterion have a corresponding code path? b. Architecture adherence: do modules follow the defined boundaries and dependency rules? c. Pseudocode fidelity: does the implementation match the designed algorithms? d. Code quality: naming conventions, single responsibility, error handling, no dead code e. Document findings as review comments

  4. Test coverage analysis: a. Run existing tests and measure coverage b. Identify uncovered acceptance criteria c. Write missing tests:

    • Unit tests for each public function
    • Integration tests for cross-module interactions
    • Edge case tests for each identified edge case from the spec d. Target coverage >= 80% on new code
  5. Performance validation — if the spec includes performance constraints: a. Profile critical paths identified in the pseudocode b. Compare measured performance against constraint thresholds c. Optimize if thresholds are not met

  6. Iterate — repeat steps 3-5 until:

    • All acceptance criteria have passing tests
    • Code review has no critical or high-severity issues
    • Coverage meets the threshold
    • Performance constraints are satisfied
  7. Store refinement artifact — call mcp__plugin_ruflo-core_ruflo__memory_store with namespace sparc-phases, key refine-{feature-slug}, value: { status: "complete", reviewFindings: [...], coveragePercent: N, performanceResults: {...}, iterations: N }

  8. Record trajectory step — call mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-step with refinement summary

Show full SKILL.md (204 more words)Show less
Phase 5 — Completion
  1. Full regression — run the complete test suite to verify no regressions from refinement changes

  2. Traceability matrix — build a matrix mapping every acceptance criterion to:

    • The test(s) that verify it
    • The code file(s) that implement it
    • The current pass/fail status
  3. Documentation: a. Generate API documentation from code comments and type definitions b. Write usage examples for key public interfaces c. Update any existing documentation affected by the changes

  4. Deployment readiness checklist:

    • All tests passing
    • Documentation complete
    • Database migrations prepared (if applicable)
    • Configuration changes documented
    • Feature flags configured (if applicable)
    • Rollback plan defined
    • Security review complete (no secrets, inputs validated)
  5. Store completion artifact — call mcp__plugin_ruflo-core_ruflo__memory_store with namespace sparc-phases, key complete-{feature-slug}, value: { status: "complete", traceabilityMatrix: [...], documentationFiles: [...], deploymentChecklist: {...}, regressionResult: "pass" }

  6. End trajectory — call mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-end with the full SPARC cycle summary

  7. Train neural patterns — call mcp__plugin_ruflo-core_ruflo__neural_train with the successful SPARC cycle data to improve future predictions

  8. Store learned pattern — call mcp__plugin_ruflo-core_ruflo__memory_store with namespace patterns, key sparc-{feature-slug}, value summarizing what worked, phase durations, and common blockers encountered

  9. Present completion report — display the traceability matrix, deployment checklist, and final status. Suggest running /sparc advance to pass the final gate, or /sparc report for the full methodology report.

Output format

# Refinement: {Feature Name}

## Code Review Summary
- Critical issues: {N} (must be 0 to pass gate)
- High issues: {N}
- Medium issues: {N}
- Resolved: {N}/{total}

## Test Coverage
- Overall: {N}%
- New code: {N}%
- Acceptance criteria covered: {N}/{total}

## Performance
| Constraint | Target | Measured | Status |
|-----------|--------|----------|--------|
| Response time | <200ms | 145ms | Pass |

---

# Completion: {Feature Name}

## Traceability Matrix
| AC | Test | Code | Status |
|----|------|------|--------|
| AC-1 | test_xxx | service.ts:42 | Pass |
| AC-2 | test_yyy | controller.ts:18 | Pass |
| AC-3 | test_zzz | repository.ts:31 | Pass |

## Deployment Checklist
- [x] All tests passing
- [x] Documentation complete
- [x] Migrations prepared
- [x] Config documented
- [x] Rollback plan defined
- [x] Security reviewed

---
SPARC workflow complete. Run `/sparc report` for the full methodology report.

© ruvnet, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/ruflo-sparc/skills/sparc-refine of ruvnet/ruflo.

Open the folder on GitHubat commit 58e0ae7

Compare with similar skills

Sparc Refine next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Sparc Refine compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Sparc Refine this skillruvnet/ruflo74k—~1.5kAutomated safety check: NotesMIT
Evaluate PR Testsdotnet/maui23k—~2.9kAutomated safety check: PassMIT
Reviewatelier-fashion/adlc-toolkit171—~1.9kAutomated safety check: PassMIT
Code Reviewpolyipseity/obsidian-terminal950—~1.6kAutomated safety check: PassAGPL-3.0
Core Components Code Reviewcore-ds/core-components137—~5.4kAutomated safety check: PassMIT
Reviewmhmzdev/the-holy-quran-app889—~907Automated safety check: PassMIT

Similar skills

  • Official

    Reviews the tests added in a pull request for fix coverage, quality, edge cases and test type, and recommends lighter test types where they would do.

    23k GitHub stars~2.9k tokensUpdated today
    Testing & QAAuto-check passed
  • Review

    atelier-fashion/adlc-toolkit

    Multi-agent code review covering correctness, quality, architecture, test coverage, and security

    171 GitHub stars~1.9k tokensUpdated 10 days ago
    Testing & QAAuto-check passed
  • Code Review

    polyipseity/obsidian-terminal

    A skill your agent uses when reviewing PRs, code changes, or conducting code audits in obsidian-terminal.

    950 GitHub stars~1.6k tokensUpdated 6 days ago
    DevelopmentAuto-check passed
  • Core Components Code Review

    core-ds/core-components

    Review a Pull Request or diff in the @alfalab/core-components UI library — correctness bugs, public API/breaking changes, accessibility, keyboard/focus/pointer interaction, component states…

    137 GitHub stars~5.4k tokensUpdated today
    DevelopmentAuto-check passed
  • Review

    mhmzdev/the-holy-quran-app

    Review The Holy Qur'an app code against the project's own conventions — layering (UI → Bloc → Repo → DataProvider), bloc anatomy, Provider tier, configs tokens, class widgets, Hive typeId safety…

    889 GitHub stars~907 tokensUpdated 29 days ago
    DevelopmentAuto-check passed
  • Docs Sync

    microsoft/apm

    Official

    A skill your agent uses whenever a pull request is opened, reopened, or synchronized in microsoft/apm to assess whether and how the documentation corpus must change to stay truthful with the…

    4k GitHub stars~3k tokensUpdated 2 days ago
    DevelopmentAuto-check passed

More from ruvnet/ruflo

All 264 skills in this repo
  • Stores, searches, and retrieves successful patterns with HNSW-indexed semantic search so agents can reuse past solutions instead of relearning them.

    74k GitHub starsUsed in 2 repos~830 tokens
    Auto-check passed
  • Runs claude-flow CLI security scans for input validation, path traversal, SQL injection, XSS, hardcoded secrets and known CVEs, and writes an audit report.

    74k GitHub starsUsed in 2 repos~823 tokens
    Auto-check passed
  • Applies the SPARC method (specification, pseudocode, architecture, refinement, completion) with 17 specialized modes and multi-agent orchestration, from research to deployment.

    74k GitHub starsUsed in 2 repos~829 tokens
    Auto-check passed
  • Coordinates a hierarchical swarm of specialized agents through the claude-flow CLI for work that spans several files or modules at once.

    74k GitHub starsUsed in 2 repos~779 tokens
    Auto-check passed
  • Sets up and drives Ruflo, an npm-installed orchestration layer for multi-agent swarms, persistent memory, routing, hooks and its MCP tool catalog.

    74k GitHub starsUsed in 1 repo~975 tokens
    Auto-check passed
  • Agent Coordination

    ruvnet/ruflo

    Reference for spawning, listing, monitoring and stopping agents with claude-flow commands, with agent type families, routing codes and coordination tips.

    74k GitHub starsUsed in 2 repos~519 tokens
    Auto-check passed

Questions about Sparc Refine

What does Sparc Refine do?

Run the SPARC Refinement and Completion phases — review code, improve test coverage, validate against specification, and generate documentation. Sparc Refine is an agent skill from ruvnet/ruflo.

When should I use Sparc Refine?

Sparc Refine fits situations like: tasks that involve Code review; tasks that involve Test coverage.

How do I install Sparc Refine in Claude Code?

Run `npx skills add ruvnet/ruflo --skill sparc-refine -a claude-code`. Or copy the skill folder (plugins/ruflo-sparc/skills/sparc-refine in ruvnet/ruflo) into .claude/skills/sparc-refine in your project. Claude Code loads it when a task matches its description.

How do I install Sparc Refine in Codex?

Run `npx skills add ruvnet/ruflo --skill sparc-refine -a codex`. Or copy the skill folder (plugins/ruflo-sparc/skills/sparc-refine in ruvnet/ruflo) into .agents/skills/sparc-refine in your project. Codex loads it when a task matches its description.

Can I use Sparc Refine in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ruvnet/ruflo --skill sparc-refine -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sparc-refine, .gemini/skills/sparc-refine, .github/skills/sparc-refine and .opencode/skills/sparc-refine in your project.

What does Sparc Refine need to run?

SKILL.md names no scripts, command-line tools or credentials: Sparc Refine is instructions for the agent only. Its frontmatter pre-approves these 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-step, mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-end, mcp__plugin_ruflo-core_ruflo__neural_train, mcp__plugin_ruflo-core_ruflo__neural_predict, Bash, Read, Write, Edit.

Does Sparc Refine access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Sparc Refine safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Sparc Refine use?

Sparc Refine is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Sparc Refine use?

About 1.5k tokens (SKILL.md is roughly 6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Sparc Refine?

Skills that share tags, products or a category with Sparc Refine: Evaluate PR Tests (dotnet/maui, 23k stars), Review (atelier-fashion/adlc-toolkit, 171 stars), Code Review (polyipseity/obsidian-terminal, 950 stars) and Core Components Code Review (core-ds/core-components, 137 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Sparc Refine?

ruvnet (a GitHub user) maintains it in ruvnet/ruflo, which has 74,159 GitHub stars. The repository holds 264 skills in this directory. The repository was last updated on October 9, 2026.

Source: ruvnet/ruflo on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.