Skip to content
Back to skills

Gherkin

ASecurity

Write Gherkin (Given/When/Then) scenarios. Use for the expected behaviour of every bug, acceptance criteria for an issue, a Cucumber .feature file, or reviewing a scenario; also when the user mentions Gherkin, BDD, Cucumber or Given/When/Then.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 7, 2026
ai-agentstestingapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 7, 2026

npx -y skills add andeeplus/aplus --skill gherkin --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Gherkin?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Gherkin
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/andeeplus-gherkin/badge)](https://www.skillsdirectory.com/skills/andeeplus-gherkin)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: gherkin
description: Write Gherkin (Given/When/Then) scenarios. Use for the expected behaviour of every bug, acceptance criteria for an issue, a Cucumber .feature file, or reviewing a scenario; also when the user mentions Gherkin, BDD, Cucumber or Given/When/Then.
---

# Gherkin

A scenario is one concrete example of one behaviour, in the project's own words: given a state, when one thing happens, then something anyone can check.

## Rules

- **One behaviour,** named by a one-line title. A second `When` means a second scenario.
- **Domain words,** one term per concept, taken from the project's docs or `CONTEXT.md`. For a library or CLI, its public API, commands, options and output are domain words.
- **Given** holds only the state the outcome depends on, described as state rather than the steps that reach it.
- **When** is a single action.
- **Then** names something a reader can check: a value, a message, a file, a status, an exit code.
- **Real values** in double quotes, such as `"/about"` or `"nav.ts"`.
- **Steps** are third person, present tense, one fact each. `And` continues the phase above it; `But` marks a contrast.
- **Short:** under ten steps. A list of inputs is a table.

## References

| Task                                                                                     | Read                                                       |
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| A `.feature` file: layout, Background, Rule, Scenario Outline, tables, doc strings, tags | [references/feature-files.md](references/feature-files.md) |

## A bug's scenario

It states the correct behaviour, so it fails today. Put it in a `gherkin` code block in the issue's expected-behaviour or acceptance section, and keep the actual behaviour in prose beside it. The regression test implements it ([testing](../testing/SKILL.md)).

```gherkin
Scenario: Exporting again rebuilds the pages that import a changed module
  Given the pages "/" and "/about" import "nav.ts"
  And "nav.ts" has changed since the last export
  When the site is exported again
  Then the exported "/" and "/about" show the new navigation
```

Files in this skill

  • SKILL.md2.2 KB
  • references/feature-files.md2.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.