Agent skill

Gherkin Generation

by EmeaAppGbb in EmeaAppGbb/spec2cloud

Generate comprehensive Gherkin scenarios from approved FRDs.

MITAuto-check passedProduct & Project Management

Install Gherkin Generation

skills CLI
$ npx skills add EmeaAppGbb/spec2cloud --skill gherkin-generation -a claude-code

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

GitHub CLI
$ gh skill install EmeaAppGbb/spec2cloud gherkin-generation --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/EmeaAppGbb/spec2cloud.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/gherkin-generation .claude/skills/gherkin-generation && 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
gherkin-generation
GitHub stars
100
Token cost
~2.9k tokens
SKILL.md length
1,366 words
Files
1
Skills in repo
38
Repo updated
First seen
Licence
MIT

At a glance

Generate comprehensive Gherkin scenarios from approved FRDs.

  • Works in 5 steps: FRDs (specs/frd-*.md) — primary input… → E2E test specs (e2e/*.spec.ts) —… → Page Object Models (e2e/pages/*.page.ts)… → …
  • Creating BDD scenarios
  • SKILL.md covers Role, Modes, Inputs and FRD → Gherkin Mapping Process, plus 6 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Gherkin Generation is an agent skill from EmeaAppGbb/spec2cloud. Generate comprehensive Gherkin scenarios from approved FRDs. Produce feature files with acceptance criteria coverage, edge cases, and error handling scenarios. Use when creating BDD scenarios, writing feature files, or mapping FRD requirements to testable Gherkin specifications.

Its SKILL.md is about 2.9k 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 Product & Project Management, covering User stories. The licence is MIT.

When your agent uses it

  • Creating BDD scenarios
  • Writing feature files
  • Mapping FRD requirements to testable Gherkin specifications

Example prompts

  • “/gherkin-generation”

Workflow steps

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

  1. FRDs (specs/frd-*.md) — primary input for scenarios
  2. E2E test specs (e2e/*.spec.ts) — understand what flow-level coverage already exists from Phase 3
  3. Page Object Models (e2e/pages/*.page.ts) — use the same screen/component vocabulary
  4. UI prototypes (specs/ui/prototypes/*.html) — for visual context
  5. Component inventory (specs/ui/component-inventory.md) — for component names and states

What it can do on your machine

Read from SKILL.md and the folder at commit 8e76618. 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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are gherkin).

    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

Gherkin Generation loads about 2.9k tokens when it runs. Until then it costs about 75 tokens; SKILL.md has 1,366 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~75
When it runs · the whole SKILL.md, loaded when a task matches
~2.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); files beside SKILL.md are not scanned.

SKILL.md

The full file from EmeaAppGbb/spec2cloud at commit 8e76618, republished under its MIT licence (© EmeaAppGbb). 1,366 words, ~2,947 tokens.

Download SKILL.mdSave it as .claude/skills/gherkin-generation/SKILL.md (or your agent's skills folder).
name
gherkin-generation
description
Generate comprehensive Gherkin scenarios from approved FRDs. Produce feature files with acceptance criteria coverage, edge cases, and error handling scenarios. Use when creating BDD scenarios, writing feature files, or mapping FRD requirements to testable Gherkin specifications.

Gherkin Generation

Role

You are the Gherkin Generation Agent. You read approved FRDs and produce comprehensive, high-fidelity Gherkin scenarios that serve as the executable specification for BDD test generation. Your output lives in specs/features/ and drives Cucumber step definitions and Vitest unit test generation.

You operate during Phase 2, Step 1b: Gherkin Generation of each increment. You generate Gherkin scenarios ONLY for the FRD scope defined in the current increment (from specs/increment-plan.md). Scenarios from previous increments already exist and must not be modified.

Modes

This skill operates in two modes depending on the project context:

new-feature (default)

The standard mode. Generates Gherkin scenarios for new features described in FRDs. This is the existing behavior used in greenfield projects and brownfield extension increments. All process sections below apply to this mode unless stated otherwise.

capture-existing (brownfield Track A)

Generates Gherkin scenarios that describe the current behavior of an existing application. The goal is to create a regression safety net — executable specifications of what the app does today — before any modifications begin. Scenarios produced in this mode document reality, not aspirations. See "Capture-Existing Mode Process" and "Capture-Existing Rules" below for details.

The orchestrator sets the mode via context. If no mode is specified, default to new-feature.

Inputs

Before generating Gherkin, read:

  1. FRDs (specs/frd-*.md) — primary input for scenarios
  2. E2E test specs (e2e/*.spec.ts) — understand what flow-level coverage already exists from Phase 3
  3. Page Object Models (e2e/pages/*.page.ts) — use the same screen/component vocabulary
  4. UI prototypes (specs/ui/prototypes/*.html) — for visual context
  5. Component inventory (specs/ui/component-inventory.md) — for component names and states

FRD → Gherkin Mapping Process

Follow these steps in order:

  1. Read the FRD completely — understand the feature purpose, user stories, acceptance criteria, edge cases, and error handling before writing anything.
  2. List all acceptance criteria — extract every explicit acceptance criterion from the FRD into a checklist.
  3. Write scenarios for each acceptance criterion — for each criterion, write one or more Gherkin scenarios that fully validate it.
  4. Add edge case scenarios — for every edge case listed in the FRD, write a dedicated scenario.
  5. Add error handling scenarios — for every error condition in the FRD, write a scenario that verifies the correct error behavior.
  6. Group related scenarios into Feature files — organize scenarios into .feature files, one per FRD.
Capture-Existing Mode Process

When operating in capture-existing mode, follow these steps instead of the standard mapping process above:

  1. Read the FRD's "Current Implementation" section — this is the primary input. Understand what the feature does today, including its endpoints, UI flows, data handling, and known limitations.
  2. Read extracted API contracts (specs/contracts/api/*.yaml) — use the extracted OpenAPI specs to understand exact endpoint behavior: request/response shapes, status codes, and error responses.
  3. Observe actual behavior (if app is running) — if the application is available (e.g., via aspire start), make requests or walk through flows to verify your understanding. Resolve any discrepancies between docs and actual behavior in favor of actual behavior.
  4. Generate happy-path scenarios — write scenarios for the primary success paths of each feature area as it works today.
  5. Generate known edge-case scenarios — document edge cases that the current implementation handles (or mishandles). Only include edge cases you can confirm exist.
  6. Generate error-handling scenarios — document how the app currently responds to invalid input, unauthorized access, missing resources, etc.
  7. Tag all scenarios — every scenario in this mode MUST carry both @existing-behavior and @brownfield tags in addition to the standard feature and type tags.
  8. Verify scenarios are testable — every generated scenario MUST be verifiable against the running application. Do NOT generate scenarios for behavior that doesn't exist yet or that cannot be observed.
Capture-Existing Rules
  • Document what IS, not what SHOULD BE. Scenarios describe current behavior, even if that behavior is suboptimal.
  • If behavior is ambiguous, mark it. Generate the scenario with your best understanding and tag it @verify-manually so a human can confirm.
  • Never add aspirational scenarios. If a feature is partially implemented or missing functionality, do NOT write scenarios for the missing parts.
  • Include known bugs as scenarios. If you discover a bug during observation, write a scenario that documents the buggy behavior and tag it @known-bug. This captures the bug without attempting to fix it.
  • One feature file per FRD feature area. Same file organization as new-feature mode — one .feature file per FRD.

Gherkin Writing Conventions

File & Feature Structure
  • One .feature file per FRD, named {frd-id}.feature (e.g., user-auth.feature).
  • Feature description: Reference the FRD ID and summarize the feature purpose.
gherkin
Feature: User Authentication
  As described in frd-user-auth.md, this feature covers
  user login, logout, and session management.
  • Background: Use for common setup shared across all scenarios in a feature. Keep it minimal — only include steps that genuinely apply to every scenario.
Scenarios
  • Scenario: One scenario per acceptance criterion or edge case. The name should clearly describe the behavior being tested.
  • Scenario Outline + Examples: Use when testing the same behavior with multiple data sets. Prefer this over duplicating near-identical scenarios.
Show full SKILL.md (566 more words)Show less
Step Writing
  • Given/When/Then: Use domain language from the FRD, not implementation details.
  • And/But: Use for additional conditions or exceptions within a Given/When/Then block.
  • Write steps so they are reusable — step definitions should be shareable across features.
  • Keep scenarios independent — no scenario should depend on another scenario's state.
  • No implementation details in scenarios — no CSS selectors, no API endpoints, no SQL, no internal function names.
  • Use concrete example data, not abstract placeholders like "test123" or "foo bar".
Tags

Apply tags consistently:

TagUsage
@{feature-name}On every scenario in the feature
@smokeCritical happy-path scenarios
@edge-caseEdge case scenarios
@errorError handling scenarios
@a11yAccessibility scenarios
@existing-behaviorScenario documents current app behavior (capture-existing mode)
@brownfieldScenario generated during brownfield capture (capture-existing mode)
@verify-manuallyAmbiguous behavior — requires human verification
@known-bugScenario documents a known bug in current behavior
@flaky-behaviorNon-deterministic behavior — test may be skipped by test-generation

Self-Review Checklist

After generating all scenarios, run through this checklist:

  • Coverage: Every acceptance criterion in the FRD has at least one scenario.
  • Edge cases: Every edge case in the FRD has a scenario.
  • Error handling: Every error case in the FRD has a scenario.
  • Simplicity: Each scenario tests exactly one behavior.
  • Independence: No scenario depends on another.
  • Domain language: Steps use business language, not technical jargon.
  • No duplication: No two scenarios test the same thing.
  • Smoke coverage: At least one @smoke scenario per feature covering the happy path.
  • Concrete data: Examples use realistic data, not "test123" or "foo bar".

Gap Detection & Iteration

After completing the self-review:

  • If any checklist item fails → fix the issue and re-review.
  • If coverage gaps are found → add the missing scenarios.
  • If the FRD is ambiguous → note the ambiguity explicitly. Do NOT guess — flag it for human review with a comment in the feature file:
gherkin
# AMBIGUITY: The FRD does not specify behavior when [describe gap].
# Flagged for human review before implementation.
  • Loop until all checklist items pass. Do not finalize output with known gaps.

Output Structure

Place all generated feature files in specs/features/:

specs/features/
├── user-auth.feature       # Scenarios from frd-user-auth.md
├── dashboard.feature       # Scenarios from frd-dashboard.md
└── ...

Each file must be a valid Gherkin document parseable by any standard Cucumber/Gherkin parser.

In capture-existing mode, the same file structure is used. Feature files contain @existing-behavior and @brownfield tags on every scenario. This allows test runners to filter captured-behavior scenarios separately from new-feature scenarios (e.g., --tags @existing-behavior to run only the regression safety net).

Example

A well-written feature file:

gherkin
@user-auth @smoke
Scenario: Successful login with valid credentials
  Given a registered user with email "jane@example.com"
  And the user has password "SecureP@ss1"
  When the user submits the login form with email "jane@example.com" and password "SecureP@ss1"
  Then the user should be redirected to the dashboard
  And the user should see a welcome message "Welcome, Jane"

@user-auth @error
Scenario: Login fails with incorrect password
  Given a registered user with email "jane@example.com"
  When the user submits the login form with email "jane@example.com" and password "wrongpassword"
  Then the user should see an error message "Invalid email or password"
  And the user should remain on the login page

Notice:

  • Each scenario tests exactly one behavior.
  • Tags indicate both the feature and the scenario type.
  • Steps use domain language ("submits the login form"), not implementation details.
  • Data is concrete and realistic.
  • Scenarios are independent — neither relies on the other's state.

Mandatory Completion Checklist

The orchestrator MUST verify ALL of the following before marking gherkin-generation as complete:

  • At least one .feature file exists in specs/features/ for every FRD in scope for this increment
  • Every acceptance criterion in the FRD(s) has at least one corresponding Gherkin scenario
  • Each scenario tests exactly one behavior (no multi-behavior scenarios)
  • Tags are applied: feature tag (@feature-name), type tags (@happy, @error, @edge), and track tags (@existing-behavior for brownfield capture)
  • Steps use domain language, not implementation details (no CSS selectors, no API paths in step text)
  • Error/edge case scenarios exist for every documented error condition in the FRDs
  • data-testid attribute names from specs/ui/component-inventory.md are used in UI-related steps (if UI/UX design phase completed)
  • State JSON is updated with generated feature files

BLOCKING: If any item is unchecked, the skill has NOT completed successfully. The orchestrator must loop back and complete the missing items before advancing to test generation.

© EmeaAppGbb, 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 .github/skills/gherkin-generation of EmeaAppGbb/spec2cloud.

Open the folder on GitHubat commit 8e76618

Compare with similar skills

Gherkin Generation 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.

Gherkin Generation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gherkin Generation this skillEmeaAppGbb/spec2cloud100—~2.9kAutomated safety check: PassMIT
Cavekit Validation FirstJuliusBrussee/caveman-code942—~4.3kAutomated safety check: PassMIT
Maa Workflow Buildduorua/narutomobile338—~2.2kAutomated safety check: PassAGPL-3.0
01 Acceptance QAai-driven-dev/framework513—~434Automated safety check: PassMIT
Verification Gatesrohitg00/skillkit1.5k—~1.7kAutomated safety check: PassApache-2.0
QAwp-media/wp-rocket767—~552Automated safety check: PassGPL-2.0

Similar skills

  • Cavekit Validation First

    JuliusBrussee/caveman-code

    Validation-first design for Cavekit — every kit requirement must be automatically verifiable.

    942 GitHub stars~4.3k tokensUpdated 1 mo ago
    Product & Project ManagementAuto-check passed
  • Maa Workflow Build

    duorua/narutomobile

    Orchestrate ambiguous end-to-end MaaFramework automation requests into verified implementations.

    338 GitHub stars~2.2k tokensUpdated today
    Product & Project ManagementAuto-check passed
  • 01 Acceptance QA

    ai-driven-dev/framework

    Validate a reviewed candidate's observable behavior against its acceptance criteria and record short named videos as reviewer evidence.

    513 GitHub stars~434 tokensUpdated today
    Product & Project ManagementAuto-check passed
  • Verification Gates

    rohitg00/skillkit

    Creates explicit validation checkpoints (verification gates) between project phases to catch errors early and ensure quality before proceeding.

    1.5k GitHub stars~1.7k tokensUpdated 4 mo ago
    Product & Project ManagementAuto-check passed
  • QA

    wp-media/wp-rocket

    Run QA validation on a pull request — boots the local environment, tests acceptance criteria, and optionally posts the report as a PR comment.

    767 GitHub stars~552 tokensUpdated today
    Product & Project ManagementAuto-check passed
  • Review Rfc

    nurettincoban/ai-prd-workflow

    Review an implemented RFC in a fresh context against its acceptance criteria, RULES.md and the test plan, and save the review to reviews/.

    298 GitHub stars~1.4k tokensUpdated today
    Product & Project ManagementAuto-check passed

More from EmeaAppGbb/spec2cloud

All 38 skills in this repo
  • Azure Deployment

    EmeaAppGbb/spec2cloud

    Provision Azure infrastructure, deploy to Azure Container Apps, and verify via smoke tests.

    100 GitHub stars~1.8k tokensUpdated 5 mo ago
    Auto-check passed
  • Contract Generation

    EmeaAppGbb/spec2cloud

    Generate API contracts, shared TypeScript types, and infrastructure resource definitions from Gherkin scenarios and test files.

    100 GitHub stars~1.6k tokensUpdated 5 mo ago
    Auto-check passed
  • Ddd Modeling

    EmeaAppGbb/spec2cloud

    Create Domain-Driven Design proposals from product specs or brownfield extraction outputs.

    100 GitHub stars~2.4k tokensUpdated 5 mo ago
    Auto-check passed
  • Implementation

    EmeaAppGbb/spec2cloud

    Write application code to make failing tests pass using contract-driven, slice-based architecture.

    100 GitHub stars~2.8k tokensUpdated 5 mo ago
    Auto-check passed
  • Spec Refinement

    EmeaAppGbb/spec2cloud

    Review PRDs and FRDs through product and technical lenses. An agent skill from EmeaAppGbb/spec2cloud.

    100 GitHub stars~2.2k tokensUpdated 5 mo ago
    Auto-check passed
  • State Management

    EmeaAppGbb/spec2cloud

    Read, write, and maintain .spec2cloud/state.json across phases and increments.

    100 GitHub stars~1.5k tokensUpdated 5 mo ago
    Auto-check passed

Questions about Gherkin Generation

What does Gherkin Generation do?

Generate comprehensive Gherkin scenarios from approved FRDs. Gherkin Generation is an agent skill from EmeaAppGbb/spec2cloud. Generate comprehensive Gherkin scenarios from approved FRDs.

When should I use Gherkin Generation?

Gherkin Generation fits situations like: creating BDD scenarios; writing feature files; mapping FRD requirements to testable Gherkin specifications.

How do I install Gherkin Generation in Claude Code?

Run `npx skills add EmeaAppGbb/spec2cloud --skill gherkin-generation -a claude-code`. Or copy the skill folder (.github/skills/gherkin-generation in EmeaAppGbb/spec2cloud) into .claude/skills/gherkin-generation in your project. Claude Code loads it when a task matches its description.

How do I install Gherkin Generation in Codex?

Run `npx skills add EmeaAppGbb/spec2cloud --skill gherkin-generation -a codex`. Or copy the skill folder (.github/skills/gherkin-generation in EmeaAppGbb/spec2cloud) into .agents/skills/gherkin-generation in your project. Codex loads it when a task matches its description.

Can I use Gherkin Generation 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 EmeaAppGbb/spec2cloud --skill gherkin-generation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gherkin-generation, .gemini/skills/gherkin-generation, .github/skills/gherkin-generation and .opencode/skills/gherkin-generation in your project.

What does Gherkin Generation need to run?

SKILL.md names no scripts, command-line tools or credentials: Gherkin Generation is instructions for the agent only.

Does Gherkin Generation 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 Gherkin Generation 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. Review the folder before installing.

What licence does Gherkin Generation use?

Gherkin Generation 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 Gherkin Generation use?

About 2.9k tokens (SKILL.md is roughly 12k 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 Gherkin Generation?

Skills that share tags, products or a category with Gherkin Generation: Cavekit Validation First (JuliusBrussee/caveman-code, 942 stars), Maa Workflow Build (duorua/narutomobile, 338 stars), 01 Acceptance QA (ai-driven-dev/framework, 513 stars) and Verification Gates (rohitg00/skillkit, 1.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gherkin Generation?

EmeaAppGbb (a GitHub organization) maintains it in EmeaAppGbb/spec2cloud, which has 100 GitHub stars. The repository holds 38 skills in this directory. The repository was last updated on April 16, 2026.

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