gherkin

Write and review declarative Gherkin .feature files for BDD test specifications.

Updated Sep 9, 2026
One-click install
npx skills add https://github.com/DeepSpaceCartel/skills --skill gherkin-deepspacecartel
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gherkin
Source: https://github.com/DeepSpaceCartel/skills/tree/main/skills/gherkin
Command: npx skills add https://github.com/DeepSpaceCartel/skills --skill gherkin-deepspacecartel

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Poorly written Gherkin feature files — imperative steps, bundled behaviors, brittle hardcoded data — produce flaky, hard-to-maintain test suites that stakeholders stop reading. This Skill provides the conventions needed to keep .feature files readable as living documentation while remaining cheap to maintain as implementations change. ## Core Features & Use Cases - Feature structure guidance: Rules for feature titles, Connextra/inverted narratives, one-feature-per-file scoping, and disciplined Background usage. - Step writing standards: Given-When-Then integrity, declarative over imperative phrasing, third-person present tense, and atomic single-behavior scenarios. - Scenario Outlines and data: Guidance on Examples tables, inline data tables, and Doc Strings for data-driven scenarios. - Review checklists: A consolidated anti-patterns reference with before/after examples for auditing existing feature files. - Use Case: Convert a set of acceptance criteria from a ticket into a well-structured .feature file with a narrative, Background, and scenarios covering both happy and unhappy paths. ## Quick Start Write a Gherkin feature file for the user login requirement, using declarative steps, a Background for shared state, and scenarios for both successful and failed login attempts.

Frequently Asked Questions about gherkin

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write good Gherkin feature files for BDD?▼

Write declarative steps that describe business behavior rather than UI mechanics, keep one When/Then pair per scenario, and use third-person present tense throughout. Add a narrative explaining who wants the feature and why, and cover unhappy paths alongside the golden path.

What is the difference between declarative and imperative Gherkin steps?▼

Declarative steps describe what happens at a business level, like "When the user logs in", while imperative steps expose mechanics like filling fields and clicking buttons. Declarative steps survive implementation changes because the mechanics live in step definitions, not the feature file.

When should I use a Scenario Outline instead of a Scenario?▼

Use a Scenario Outline with an Examples table when the same behavior needs testing across meaningfully different inputs, with each row representing a distinct equivalence class. Do not use it to bundle unrelated behaviors, and keep tables under roughly 10 rows.

When should I avoid using Background in Gherkin?▼

Skip Background when a feature has only one scenario, since nothing is being deduplicated. Also avoid it for technical setup like starting servers or seeding tables — that belongs in hooks — and never tag a Background.

Why are my Gherkin scenarios brittle and hard to maintain?▼

Brittleness usually comes from imperative steps referencing UI elements, hardcoded expected values that drift when data changes, or scenarios bundling multiple behaviors. Rewrite steps declaratively, assert on rules rather than exact values, and split multi-behavior scenarios.