gherkin-from-stories
Use whenever user stories, acceptance criteria, manual test steps or a spec need to become Gherkin, or when asked how to write good acceptance scenarios: maps…
от testland★ 18 звёзд на GitHub
Установить gherkin-from-stories в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
gherkin-from-stories
Overview
The shift-left flow:
Spec / User story → Acceptance Criteria → Gherkin Feature → Step definitions → Tests
This skill is the authoring umbrella for the left half of that flow: it
turns requirements text into a .feature file. Four input shapes route to
the same core transform:
| Input you have | Section to use | Extra output |
|---|---|---|
| A user story with the As-a / I-want / So-that triple | "From a user story" | - |
| A signed-off, numbered acceptance-criteria list | "From an acceptance-criteria list (ATDD)" | @AC-N tags, step stubs, traceability table |
| Already-written manual test steps (TestRail / Qase / Xray export, prose script) | "From manual test steps" | side-by-side rewrite table |
| A raw spec / PRD section with no AC structure yet | "Extracting acceptance criteria from a raw spec" | Gherkin or plain numbered AC list |
Whatever the input, the same core discipline applies: one Scenario per behavior, Scenario Outline when only data varies, shared Background, step library reuse, and flag-and-ask on implicit preconditions.
When to use
- A PM hands over a story, spec, or AC list and the team's first test
artifact is the
.featurefile. - The team practices ATDD and gates stories on green acceptance tests.
- A team is migrating manual test scripts (or a whole TestRail / Qase library) to BDD.
- A migration from non-BDD to BDD wants to convert existing requirements into Gherkin in bulk.
Not this skill: reviewing existing Gherkin for style (use
gherkin-style-reviewer); wiring step definitions to a runner end to end
(use bdd-scenario-author, which invokes this skill first); non-functional
requirements - perf / a11y / security thresholds have a different shape
(thresholds, not Given/When/Then) - use
non-functional-requirement-extractor in the qa-shift-left plugin.
From a user story
Step 1 - Extract the user-story triple
# Story: Apply promo code at checkout
**As a** logged-in customer
**I want** to apply a promotional code at checkout
**So that** I receive the advertised discount on my order
The triple maps to the Feature header:
Feature: Apply promo code at checkout
As a logged-in customer
I want to apply a promotional code at checkout
So that I receive the advertised discount on my order
If the story doesn't have the triple, flag and ask - a story without explicit value is a signal the team should clarify before testing.
Step 2 - Map acceptance criteria to Scenarios
The story body usually has an AC list; each AC becomes a Scenario:
Background:
Given I am a logged-in customer
And my cart contains 1 item at $24.99
Scenario: Apply valid promo
Given promo code "WELCOME10" is active
When I enter "WELCOME10" in the promo input
And I click "Apply"
Then the subtotal updates to $22.49
And a confirmation toast appears: "Code applied"
Scenario: Apply expired promo
Given promo code "EXPIRED50" is inactive
When I enter "EXPIRED50" in the promo input
And I click "Apply"
Then an error appears: "This code has expired"
Step 3 - Identify Scenario Outline opportunities
Multiple ACs that vary only in input data become a Scenario Outline - use one whenever the underlying logic is identical and only the data varies:
Scenario Outline: Promo validation rejects bad input
When I enter "<code>" in the promo input
And I click "Apply"
Then an error appears: "<error>"
Examples:
| code | error |
| EXPIRED50 | This code has expired |
| NOTREAL | Code not found |
| (empty) | Please enter a code |
| WELCOME10*2 | Already applied |
From an acceptance-criteria list (ATDD)
When the input is a signed-off, numbered AC list and the team gates implementation on green acceptance tests (per ISTQB, ATDD is "a collaboration-based test-first approach that defines acceptance tests in the stakeholders' domain language"):
- One Scenario per AC, tagged
@AC-X.Y- the tag is the load-bearing traceability that maps failures back to the criterion. - Tests are written before implementation - the initial run fails on every scenario, and the failing tests are the work backlog.
- Scaffold step stubs whose bodies raise
NotImplementedError(orPendingException) so nothing passes silently. - Emit the AC-to-test traceability table - a 1:1 mapping of AC → test → status that answers "did we test what the customer asked for?"
- Run via the team's incumbent BDD runner - never force a runner switch alongside test-first adoption.
The full worked feature, stub examples, traceability artifact, per-runner tag-filter commands, and ATDD-specific anti-patterns: references/atdd-traceability.md.
From manual test steps
When the input is an already-written manual ste
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- .tessl-plugin/plugin.json
- references/atdd-traceability.md
- references/manual-step-rules.md
- references/spec-extraction-examples.md
FAQ
Что делает скилл gherkin-from-stories?
Use whenever user stories, acceptance criteria, manual test steps or a spec need to become Gherkin, or when asked how to write good acceptance scenarios: maps each criterion to scenarios, finds Scenario Outlines and Background, reuses existing steps and flags hidden preconditions. Writes .feature files only, not step code.
Как установить скилл gherkin-from-stories?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл gherkin-from-stories запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…