gherkin-expert

Write and refine Gherkin feature files and step definitions for BDD best practices.

8|4|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/rysweet/amplihack-rs --skill gherkin-expert
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gherkin-expert
Source: https://github.com/rysweet/amplihack-rs/tree/main/amplifier-bundle/skills/gherkin-expert
Command: npx skills add https://github.com/rysweet/amplihack-rs --skill gherkin-expert

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing, reviewing, and refactoring Gherkin feature files and Cucumber step definitions can be error-prone and hard to maintain as projects grow.

Core Features & Use Cases

  • Author well-structured .feature files with proper Given/When/Then flow
  • Review existing feature files for anti-patterns and readability issues
  • Refactor imperative scenarios into declarative specifications
  • Design step definitions with appropriate parameterization
  • Organize feature files with tags, backgrounds, and scenario outlines

Quick Start

Activate with /gherkin and start writing or refactoring your .feature files and step definitions.

Frequently Asked Questions about gherkin-expert

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

FAQPage Schema
How do I write declarative Gherkin feature files instead of imperative steps?

Declarative Gherkin feature files focus on business intent rather than UI interactions. Refactoring imperative scenarios into declarative specifications improves readability and test maintainability by abstracting implementation details out of Given/When/Then steps.

What is the best way to parameterize Cucumber step definitions?

Parameterizing Cucumber step definitions involves using scenario outlines and data tables to pass multiple data sets. Designing step definitions with appropriate parameterization reduces duplication and improves test maintainability across feature files.

How do I refactor Gherkin scenarios to fix BDD anti-patterns?

Refactoring Gherkin scenarios identifies and removes anti-patterns like excessive steps or hidden assumptions. Reviewing feature files for readability issues ensures BDD specifications remain maintainable and consistent across growing projects.

Can I use scenario outlines and backgrounds to organize feature files?

Scenario outlines and backgrounds organize feature files by reusing common preconditions and data sets. Applying these Gherkin structures properly reduces step duplication and improves scenario readability without repeating Given contexts.

How do Cucumber tags work for managing feature file execution?

Cucumber tags organize and filter feature files for targeted test execution. Proper tag usage allows teams to categorize scenarios by smoke tests or integrations, improving test suite management and maintainability across projects.

When should I not use scenario outlines in Gherkin feature files?

Scenario outlines should be avoided when test data variations are minimal or when scenarios require distinct step flows. Overusing outlines with incompatible data sets reduces feature file readability and complicates step definition maintenance.