spec-feature

A command for turning a feature request into a Gherkin specification and a GitHub issue. Gherkin is a plain-language format using Given, When, and Then to describe expected behaviour.

In plain words
What is it for?
It is for gathering requirements, defining scope and risks, writing scenarios and acceptance criteria, and creating the issue with the GitHub CLI.
Why use it?
It helps turn incomplete product ideas into requirements that developers can implement and test.

Command for Claude Code

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 commands/sapientpants/deepsource-mcp-server/spec-feature
Clone the repo
git clone --depth 1 https://github.com/sapientpants/deepsource-mcp-server

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 959 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.00000 $0.00959
Opus 5 $0.00000 $0.00479
Sonnet 5 $0.00000 $0.00192
Haiku 4.5 $0.00000 $0.00096

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

Security

Grade A, and why

spec-feature 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 2d 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/commands/spec-feature.md · 160 lines

How it starts

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

Spec a Feature

You are about to create a feature specification in Gherkin format and turn it into a GitHub issue ready for implementation.

Process

  1. Gather Requirements

    • Ask the user for the feature name and description if not provided
    • Understand the business value and user needs
    • Identify scope, non-goals, and risks
  2. Write Gherkin Specification Create a comprehensive specification including:

    • Feature name and description
    • Background (if needed)
    • Scenarios using Given/When/Then format
    • Examples with data tables where appropriate
    • Acceptance Criteria
    • Non-Goals (what this feature won't do)
    • Risks & Mitigations
    • Technical Considerations
  3. Format as GitHub Issue Structure the issue with:

    • Clear title: feat: [Feature Name]
    • Labels: enhancement, needs-implementation
    • Milestone (if applicable)
    • Complete Gherkin specification in the body
    • Testing requirements
  4. Create the Issue Use the gh CLI to create the issue:

    gh issue create --title "feat: [Feature Name]" \
      --body "[Full specification]" \
      --label enhancement \
      --label needs-implementation
    

Template for Issue Body

## Feature: [Feature Name]

### Business Value

[Describe the business value and user benefit]

### User Story

As a [type of user]
I want [goal/desire]
So that [benefit/value]

### Gherkin Specification

```gherkin
Feature: [Feature Name]
  [Feature description explaining the feature's purpose]

  Background:
    Given [common preconditions for all scenarios]

  Scenario: [Happy path scenario]
    Given [initial context]
    When [action/event]
    Then [expected outcome]
    And [additional outcomes]

  Scenario: [Edge case or error scenario]
    Given [initial context]
    When [action/event]
    Then [expected outcome]

  Scenario Outline: [Parameterized scenario if needed]
    Given [context with <parameter>]
    When [action with <parameter>]
    Then [outcome with <expected>]

Read the full file on GitHub · 160 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. 2d ago First seen · 160 lines · 0 tokens per session scan A 308a4dd60905

Subscribe to this mod's changes

spec-feature is a command published in the GitHub repository sapientpants/deepsource-mcp-server (7 stars, last pushed 10mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 959 tokens. 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.