Agent skill

Spec Driven Workflow

by borghei in borghei/Claude-Skills

Run development from an executable specification with traceable requirement IDs and merge-time coverage gates.

MITAuto-check passedAgent Workflows

Install Spec Driven Workflow

skills CLI
$ npx skills add borghei/Claude-Skills --skill spec-driven-workflow -a claude-code

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

GitHub CLI
$ gh skill install borghei/Claude-Skills spec-driven-workflow --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/borghei/Claude-Skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/engineering/spec-driven-workflow .claude/skills/spec-driven-workflow && 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
spec-driven-workflow
GitHub stars
874
Token cost
~3.2k tokens
SKILL.md length
1,610 words
Files
10 (incl. scripts, references, assets)
Skills in repo
364
Repo updated
First seen
Licence
MIT

At a glance

Run development from an executable specification with traceable requirement IDs and merge-time coverage gates.

  • Works in 4 steps: Draft requirements one statement at a… → Attach given/when/then acceptance… → Run the ambiguity linter. Fix every… → …
  • Starting a greenfield feature
  • SKILL.md covers When to use this skill, Inputs the skill expects, Clarify First and Workflows, plus 3 more sections
  • Runs Python scripts from its folder; calls python3

What it does

Spec Driven Workflow is an agent skill from borghei/Claude-Skills. Run development from an executable specification with traceable requirement IDs and merge-time coverage gates. Use when starting a greenfield feature, reviving a stale spec, or gating merges on requirement coverage.

Its SKILL.md is about 3.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 12 other files, including scripts, reference files and assets (for example `assets/sample_requirements.json`, `assets/sample_spec.md` and `assets/sample_trace_index.json`).

It sits in Agent Workflows, covering Spec-driven development. The repository describes itself as: 385 AI skills, 77 expert agents, and 900 stdlib Python tools for every team: engineering, PM, marketing, C-level, compliance, business ops, research, and a LinkedIn toolkit… The licence is MIT.

When your agent uses it

  • Starting a greenfield feature
  • Reviving a stale spec
  • Gating merges on requirement coverage

Example prompts

  • “/spec-driven-workflow”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Draft requirements one statement at a time, each with exactly one obligation and a
  2. Attach given/when/then acceptance criteria directly beneath each requirement.
  3. Run the ambiguity linter. Fix every error before circulating the draft; errors are
  4. Re-run until the precision ratio clears 0.85. Below that, review meetings will be

What it can do on your machine

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

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 3 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3

    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

Spec Driven Workflow loads about 3.2k tokens when it runs, and up to ~7.9k if it reads all its reference files. Until then it costs about 59 tokens; SKILL.md has 1,610 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~59
When it runs · the whole SKILL.md, loaded when a task matches
~3.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~7.9k

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 passed

The automated check found no risky patterns in SKILL.md.

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); the scripts in this folder are not scanned.

SKILL.md

The full file from borghei/Claude-Skills at commit c9a1487, republished under its MIT licence (© borghei). 1,610 words, ~3,175 tokens.

Download SKILL.mdSave it as .claude/skills/spec-driven-workflow/SKILL.md (or your agent's skills folder). This skill also uses 9 other files; get the full folder from GitHub.
name
spec-driven-workflow
description
Run development from an executable specification with traceable requirement IDs and merge-time coverage gates. Use when starting a greenfield feature, reviving a stale spec, or gating merges on requirement coverage.
license
MIT + Commons Clause
metadata.version
1.0.0
metadata.author
borghei
metadata.category
engineering
metadata.domain
software-process
metadata.updated
2026-07-21
metadata.tags
specification, requirements, traceability, acceptance-criteria, process

Spec-Driven Workflow

Development where the specification is the source of truth and the code is its implementation, rather than a document that was true at kickoff and fiction by week three. The mechanism is unglamorous: every normative statement gets a stable ID, every ID appears in a test, and the merge gate fails when the two drift apart. Without that mechanical link a spec is a memo, and memos do not survive contact with a sprint.

When to use this skill

  • Starting a greenfield feature where the interface is contested and the cost of building the wrong thing is high
  • Reviving a stale spec that no longer matches shipped behaviour and needs reconciling before the next change
  • Gating merges on coverage so a PR that implements two of five committed requirements cannot silently land
  • Auditing what actually shipped ahead of a stakeholder review or a compliance obligation
  • Handing a feature to another team who need the intent, not just the code
  • Generating an implementation from a spec — which only works if the spec is precise enough that two engineers would build the same thing

Inputs the skill expects

  • A specification document in markdown, with normative statements using must/shall/should/may
  • Acceptance criteria per requirement, ideally in given/when/then form
  • The source tree and test suite where implementations will be annotated
  • The coverage bar the merge gate enforces (mandatory-requirement coverage, typically 1.0)
  • The previous requirements snapshot, when checking for drift against a baseline
  • Which requirements are explicitly out of scope for the current milestone

Clarify First

Before writing or auditing a spec, confirm these inputs. If any is unknown or vague, ASK — do not assume:

  • What must be true for this to be "done" — becomes the acceptance criteria; without it the spec is a wish list and nothing is verifiable
  • Which constraints are hard vs preferences — decides must/shall versus should, which in turn decides what the merge gate blocks on
  • Who consumes the spec — an implementing engineer, a generating model, and an auditor need different precision; the generating case needs the most
  • Scope boundary for this milestone — requirements outside it must be marked, or coverage reports will show permanent false gaps

Stop rule: ask only the 2-3 that most change the output. If the user says "just draft it," proceed and list your assumptions at the top of the artifact.

Workflows

Workflow 1 — Write the spec, then prove it is precise
  1. Draft requirements one statement at a time, each with exactly one obligation and a modality keyword. Two obligations in one sentence become two requirements.
  2. Attach given/when/then acceptance criteria directly beneath each requirement.
  3. Run the ambiguity linter. Fix every error before circulating the draft; errors are statements no engineer could implement without guessing.
  4. Re-run until the precision ratio clears 0.85. Below that, review meetings will be spent discovering ambiguity rather than discussing design.
bash
python3 engineering/spec-driven-workflow/scripts/spec_lint.py \
  --spec engineering/spec-driven-workflow/assets/sample_spec.md \
  --max-findings 0 --min-precision 0.85 --format text

The shipped sample scores 0.46 on purpose — it contains the exact failures the linter is built to catch, so you can see each rule fire before pointing it at real work.

Workflow 2 — Extract requirement IDs and freeze the baseline
  1. Parse the spec into requirements. IDs are derived from section and ordinal (REQ-ROTATION-02), so they are stable across unrelated edits elsewhere in the file.
  2. Commit the emitted JSON alongside the spec. This is the baseline.
  3. On every subsequent parse, diff against the baseline. A DRIFT line means a requirement's text changed while its ID stayed the same — its tests now verify something the spec no longer says, which is the most dangerous state in the workflow.
bash
python3 engineering/spec-driven-workflow/scripts/spec_parse.py \
  --spec engineering/spec-driven-workflow/assets/sample_spec.md \
  --baseline engineering/spec-driven-workflow/assets/sample_requirements.json \
  --require-acceptance --format text

Exit code is 1 when a mandatory requirement lacks acceptance criteria or when any requirement has drifted, which makes this the first half of the CI gate.

Workflow 3 — Gate the merge on bidirectional coverage
  1. Annotate implementations and tests with their requirement IDs in comments or test names (def test_rotation_marks_pending_revocation(): # REQ-ROTATION-01).
  2. Run coverage against the source tree. Read both directions: requirements with no implementation, and annotations naming IDs the spec no longer contains.
  3. Fail the build below the mandatory coverage floor, or on any orphan annotation.
bash
python3 engineering/spec-driven-workflow/scripts/trace_coverage.py \
  --requirements engineering/spec-driven-workflow/assets/sample_requirements.json \
  --index engineering/spec-driven-workflow/assets/sample_trace_index.json \
  --min-coverage 1.0 --format text

Swap --index for --code <path> to scan a real tree. The index form exists so the gate can run against a trace index built by another tool, and so this workflow is runnable straight from a fresh clone.

Decision frameworks

How precise does the spec need to be? [PROVEN]

Precision is a cost, and the right amount depends entirely on who reads the spec next.

ConsumerRequired precisionTest
Engineer on the team who wrote itModerateShared context fills gaps; acceptance criteria on mandatory requirements only
Engineer on another teamHighEvery requirement has criteria; no undefined domain terms
A model generating the implementationVery highEvery requirement quantified; no adjective without a number
An auditor or regulatorVery high, plus provenanceEvery requirement traced to a test result and a decision record

Writing at "very high" for an internal one-week feature is waste. Writing at "moderate" for a generated implementation produces confidently wrong code, because ambiguity gets resolved silently rather than escalated.

Requirement status ladder

Every requirement sits in one of four states. Only one is acceptable at merge.

StatusMeaningAction
coveredImplementation and test both annotatedMerge
untestedCode exists, no test references the IDBlock — this is the state that regresses silently
test-onlyTest exists, no implementation annotatedUsually a missing annotation, occasionally a test asserting nothing
unimplementedNeither existsBlock if mandatory; acceptable if explicitly deferred
ModalityKeywordCoverage floor at merge
Mandatorymust, shall1.0 — no exceptions; a mandatory requirement without a test is not implemented
Recommendedshould0.8 — deviations recorded in the PR with a reason
Optionalmay, canNo floor — tracked, not gated

The floors matter less than their being non-negotiable once set. A coverage gate that gets waived twice stops being read.

Show full SKILL.md (631 more words)Show less
Ambiguity rules and what each one prevents
RuleFires onPrevents
unquantified-adjectivefast, scalable, secure, intuitiveRequirements nobody can fail
passive-no-actor"notifications should be delivered"Obligations with no owning component
no-acceptance-criteriaNormative statement with no given/when/thenRequirements that cannot be verified
placeholderTBD, TODO, ???Specs that gate merges while still undecided
compound-requirement"and/or", two obligations in one sentencePartial implementations that still pass
undefined-antecedentOpens with it/this/theyRequirements that break when reordered
vague-quantifiersome, several, mostDisagreement discovered at review time

Anti-Patterns

The Write-Once Spec

Mistake: Writing a thorough specification at kickoff, then implementing against reality for six weeks without touching it. Why it happens: Updating the spec has no forcing function. Nothing breaks when it goes stale, so it loses every contest for attention against shipping code. Instead: Put the spec in the same repository, in the same PR, behind the same merge gate as the code. A requirement change and its implementation land together or neither lands. The gate is what converts "we should keep it updated" into a thing that actually happens.

Adjective-Driven Requirements

Mistake: "The API must be fast and the interface must be intuitive." Why it happens: These feel like requirements and are easy to agree on precisely because nobody can disagree. Everyone leaves the meeting satisfied and holding different pictures. Instead: Every adjective becomes a number with a unit and a measurement method: "p95 latency under 200ms measured at the load balancer over a 5-minute window." If you cannot produce the number, the requirement is not ready and should be marked as such rather than shipped vague.

ID Drift

Mistake: Editing a requirement's text in place while keeping its ID, so tests that reference the ID now verify something the spec no longer says. Why it happens: Renumbering feels disruptive, and editing text feels smaller than adding a requirement. Both are true; the consequence is still a silent divergence. Instead: Fingerprint requirement text and diff against a committed baseline on every parse. A drift finding forces a decision: either the tests get updated, or the edit was actually a new requirement and needs a new ID.

One-Way Traceability

Mistake: Checking that every requirement has code, but never checking that every annotated code path has a requirement. Why it happens: The forward direction answers "did we build what we promised," which is the question stakeholders ask. Nobody asks the reverse question, so nobody builds the report. Instead: Run coverage in both directions and treat orphan annotations as errors. Orphans mark dead features whose requirement was deleted, typos in IDs, and scope that entered the codebase without ever entering the spec — all three are worth knowing.

The Merge Gate Nobody Believes

Mistake: Setting a 100% coverage gate, waiving it under deadline, and waiving it again the following week. Why it happens: The gate was set at an aspirational number rather than the number the team will actually hold, so the first real deadline breaks it. Instead: Gate only on mandatory requirements, at 1.0, and let should requirements report without blocking. A narrow gate that never gets waived changes behaviour; a broad gate that gets waived teaches everyone that red builds are advisory.

Files

FilePurpose
scripts/spec_parse.pyParse a markdown spec into requirements with stable IDs and content fingerprints; diff against a baseline
scripts/spec_lint.pyFlag ambiguity — unquantified adjectives, passive requirements, missing criteria, placeholders
scripts/trace_coverage.pyBidirectional spec-to-code coverage with orphan-annotation detection and a merge gate exit code
references/spec-writing-guide.mdRequirement grammar, acceptance-criteria patterns, and worked ambiguous-to-precise rewrites
references/traceability-model.mdID schemes, annotation conventions per language, CI wiring, and drift handling
assets/sample_spec.mdRunnable sample spec containing both precise and deliberately ambiguous requirements
assets/sample_requirements.jsonParsed baseline for the drift and coverage workflows
assets/sample_trace_index.jsonPrebuilt trace index exercising covered, untested, test-only, and orphan states
assets/spec-template.mdSkeleton for a new specification with the required structure

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

Files

SKILL.md and 9 other files (scripts, references, assets) in engineering/spec-driven-workflow of borghei/Claude-Skills.

  • SKILL.md
  • assets/sample_requirements.json
  • assets/sample_spec.md
  • assets/sample_trace_index.json
  • assets/spec-template.md
  • references/spec-writing-guide.md
  • references/traceability-model.md
  • scripts/spec_lint.py
  • scripts/spec_parse.py
  • scripts/trace_coverage.py

Open the folder on GitHubat commit c9a1487

Compare with similar skills

Spec Driven Workflow 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.

Spec Driven Workflow compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Spec Driven Workflow this skillborghei/Claude-Skills874—~3.2kAutomated safety check: PassMIT
OpenSpec Guided OnboardingFission-AI/OpenSpec71k1 repos~4.5kAutomated safety check: PassMIT
Readyprekuter/dryforge4021 repos~6.8kAutomated safety check: PassApache-2.0
Spec Driven Developzhu1090093659/deepseek-pp1.9k—~6.9kAutomated safety check: PassApache-2.0
MoAI Foundation Coremodu-ai/moai-adk1.2k—~5kAutomated safety check: PassApache-2.0
Goprekuter/dryforge4021 repos~7.2kAutomated safety check: PassApache-2.0

Similar skills

  • OpenSpec Guided Onboarding

    Fission-AI/OpenSpec

    Walks you through a complete OpenSpec workflow cycle with narration while doing real work in your codebase.

    71k GitHub starsUsed in 1 repo~4.5k tokens
    Agent WorkflowsAuto-check passed
  • Ready

    prekuter/dryforge

    Understand what you mean before anything is built. An agent skill from prekuter/dryforge.

    402 GitHub starsUsed in 1 repo~6.8k tokens
    Agent WorkflowsAuto-check passed
  • Spec Driven Develop

    zhu1090093659/deepseek-pp

    Automates pre-development workflow for large-scale complex tasks.

    1.9k GitHub stars~6.9k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • MoAI Foundation Core

    modu-ai/moai-adk

    Reference for MoAI-ADK's core development principles: TRUST 5 quality gates, SPEC-first domain-driven workflow, agent delegation and token budgeting.

    1.2k GitHub stars~5k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Go

    prekuter/dryforge

    Carry out the intent approved in ready, as meant, and prove it with checks that actually ran.

    402 GitHub starsUsed in 1 repo~7.2k tokens
    Agent WorkflowsAuto-check passed
  • agtx Execute Phase

    fynnfluegge/agtx

    Carries out an approved plan for an agtx-managed task: implements the changes, runs tests, commits, writes a summary to .agtx/execute.md and then stops.

    1.7k GitHub stars~439 tokensUpdated 5 days ago
    Agent WorkflowsAuto-check passed

More from borghei/Claude-Skills

All 364 skills in this repo
  • Agents In The Team

    borghei/Claude-Skills

    Run delivery when AI coding and ops agents take tickets. An agent skill from borghei/Claude-Skills.

    874 GitHub stars~4.2k tokensUpdated yesterday
    Auto-check passed
  • AI Content Disclosure

    borghei/Claude-Skills

    Check AI-generated marketing content and reviews for required disclosures under the EU AI Act, FTC rules and platform AI-label policies.

    874 GitHub stars~3.4k tokensUpdated yesterday
    Auto-check passed
  • AI Prototyping

    borghei/Claude-Skills

    Idea to AI-generated prototype to customer validation to engineering handoff.

    874 GitHub stars~3.6k tokensUpdated yesterday
    Auto-check passed
  • Analytics Engineer

    borghei/Claude-Skills

    Analytics engineering across data modeling, dbt, transformation, and semantic layers.

    874 GitHub stars~3.4k tokensUpdated yesterday
    Auto-check passed
  • Ansoff Matrix

    borghei/Claude-Skills

    Ansoff Matrix — 4-quadrant framework for growth options: market penetration, market/product development, and diversification.

    874 GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • Brainstorm Okrs

    borghei/Claude-Skills

    OKR brainstorming and validation using the Radical Focus framework — outcome objectives, measurable key results, counter-metrics.

    874 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed

Questions about Spec Driven Workflow

What does Spec Driven Workflow do?

Run development from an executable specification with traceable requirement IDs and merge-time coverage gates. Spec Driven Workflow is an agent skill from borghei/Claude-Skills. Run development from an executable specification with traceable requirement IDs and merge-time coverage gates.

When should I use Spec Driven Workflow?

Spec Driven Workflow fits situations like: starting a greenfield feature; reviving a stale spec; gating merges on requirement coverage.

How do I install Spec Driven Workflow in Claude Code?

Run `npx skills add borghei/Claude-Skills --skill spec-driven-workflow -a claude-code`. Or copy the skill folder (engineering/spec-driven-workflow in borghei/Claude-Skills) into .claude/skills/spec-driven-workflow in your project. Claude Code loads it when a task matches its description.

How do I install Spec Driven Workflow in Codex?

Run `npx skills add borghei/Claude-Skills --skill spec-driven-workflow -a codex`. Or copy the skill folder (engineering/spec-driven-workflow in borghei/Claude-Skills) into .agents/skills/spec-driven-workflow in your project. Codex loads it when a task matches its description.

Can I use Spec Driven Workflow 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 borghei/Claude-Skills --skill spec-driven-workflow -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/spec-driven-workflow, .gemini/skills/spec-driven-workflow, .github/skills/spec-driven-workflow and .opencode/skills/spec-driven-workflow in your project.

What does Spec Driven Workflow need to run?

Going by SKILL.md and its folder, Spec Driven Workflow needs Python for the scripts in its folder and the command-line tools its instructions call (python3). Our summary lists: Python 3.

Does Spec Driven Workflow 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 Spec Driven Workflow safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Spec Driven Workflow use?

Spec Driven Workflow is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Spec Driven Workflow use?

About 3.2k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.8k tokens, read only when the agent opens those files.

What are the alternatives to Spec Driven Workflow?

Skills that share tags, products or a category with Spec Driven Workflow: OpenSpec Guided Onboarding (Fission-AI/OpenSpec, 71k stars), Ready (prekuter/dryforge, 402 stars), Spec Driven Develop (zhu1090093659/deepseek-pp, 1.9k stars) and MoAI Foundation Core (modu-ai/moai-adk, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Spec Driven Workflow?

borghei (a GitHub user) maintains it in borghei/Claude-Skills, which has 874 GitHub stars. The repository holds 364 skills in this directory. The repository was last updated on October 7, 2026.

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