Gherkin acceptance criteria authoring. Use when writing Given/When/Then scenarios, feature files, or BDD-style specifications. Provides syntax reference, best practices, and Reqnroll integration guidance.
View on GitHubmelodic-software/claude-code-plugins
spec-driven-development
plugins/spec-driven-development/skills/gherkin-authoring/SKILL.md
January 21, 2026
Select agents to install to:
npx add-skill https://github.com/melodic-software/claude-code-plugins/blob/main/plugins/spec-driven-development/skills/gherkin-authoring/SKILL.md -a claude-code --skill gherkin-authoringInstallation paths:
.claude/skills/gherkin-authoring/# Gherkin Authoring
Gherkin/BDD acceptance criteria authoring for executable specifications.
## When to Use This Skill
**Keywords:** Gherkin, Given/When/Then, BDD, behavior-driven development, feature files, scenarios, acceptance criteria, Reqnroll, Cucumber, SpecFlow, executable specifications
**Use this skill when:**
- Writing acceptance criteria in Given/When/Then format
- Creating .feature files for BDD testing
- Converting requirements to executable specifications
- Setting up Reqnroll tests in .NET projects
- Understanding Gherkin syntax and best practices
## Quick Syntax Reference
### Feature File Structure
```gherkin
Feature: <Feature Name>
<Feature description>
Background:
Given <common precondition>
Scenario: <Scenario Name>
Given <precondition>
When <action>
Then <expected outcome>
Scenario Outline: <Parameterized Scenario>
Given <precondition with <parameter>>
When <action with <parameter>>
Then <expected outcome with <parameter>>
Examples:
| parameter |
| value1 |
| value2 |
```
### Step Keywords
| Keyword | Purpose | Example |
| --- | --- | --- |
| `Given` | Setup preconditions | Given a user is logged in |
| `When` | Describe action | When the user clicks submit |
| `Then` | Assert outcome | Then the form is saved |
| `And` | Additional step (same type) | And an email is sent |
| `But` | Negative condition | But no error is shown |
## Writing Effective Scenarios
### The Three A's Pattern
Gherkin maps to the Arrange-Act-Assert pattern:
| Gherkin | AAA | Purpose |
| --- | --- | --- |
| Given | Arrange | Set up the test context |
| When | Act | Perform the action under test |
| Then | Assert | Verify the expected outcome |
### Single Behavior Per Scenario
**Good - One behavior:**
```gherkin
Scenario: User login with valid credentials
Given a registered user exists
When the user enters valid credentials
Then the user is logged in
```
**Bad - Multiple behaviors:**