Command Palette

Search for a command to run...

Назад к скиллам
скилл № 51968

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от 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 .feature file.
  • 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"):

  1. One Scenario per AC, tagged @AC-X.Y - the tag is the load-bearing traceability that maps failures back to the criterion.
  2. Tests are written before implementation - the initial run fails on every scenario, and the failing tests are the work backlog.
  3. Scaffold step stubs whose bodies raise NotImplementedError (or PendingException) so nothing passes silently.
  4. 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?"
  5. 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

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • .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), без исполняемых скриптов.

Похожие скиллы

Сравнить gherkin-from-stories с