gherkin-author
Interactive Gherkin scenario authoring. Guides through Given/When/Then construction with BDD best practices.
What this skill does
# Gherkin Scenario Authoring
Interactive assistant for creating Gherkin/BDD scenarios with best practices.
## Gherkin Keywords
| Keyword | Purpose | Example |
| --- | --- | --- |
| Feature | Describes the feature | Feature: User Login |
| Scenario | Single test case | Scenario: Successful login |
| Given | Precondition/context | Given a registered user |
| When | Action/trigger | When they enter credentials |
| Then | Expected outcome | Then they are logged in |
| And | Continue previous | And a session is created |
| But | Negative continuation | But no email is sent |
| Background | Shared setup | Background: Given logged in |
| Scenario Outline | Parameterized | Examples table |
## Workflow
1. **Gather Context**
- If argument provided, analyze feature description
- If `--interactive`, guide through scenario creation
2. **Feature Identification**
- Spawn `spec-author gherkin` agent
- Identify the feature being tested
- Determine user persona (As a...)
3. **Scenario Construction**
- Define preconditions (Given)
- Specify action (When) - single action only
- Describe outcomes (Then)
- Add supporting steps (And/But)
4. **Best Practices Check**
- Declarative over imperative
- Single When per scenario
- Observable outcomes
- Independent scenarios
5. **Output**
- Generate .feature file or inline criteria
- Optionally include Reqnroll/.NET hints
## Arguments
- `$ARGUMENTS` - Feature description
- `--interactive` - Step-by-step guided authoring
- `--output` - Output .feature file path
- `--format` - Output format: feature (default), inline
## Examples
```bash
# From description
/spec-driven-development:gherkin-author "User can add items to shopping cart"
# Interactive mode
/spec-driven-development:gherkin-author --interactive
# Output to file
/spec-driven-development:gherkin-author "Login feature" --output tests/login.feature
# Inline acceptance criteria format
/spec-driven-development:gherkin-author "Password reset" --format inline
```
## Scenario Quality Checklist
```text
SCENARIO QUALITY CHECK
[✓] Name describes behavior (not implementation)
[✓] Given establishes necessary context only
[✓] When has exactly ONE action
[✓] Then has observable, verifiable outcomes
[✓] Uses business language, not technical jargon
[✓] Independent of other scenarios
[✓] Focused on one behavior
[✓] Can be automated
```
## Anti-Patterns to Avoid
| Anti-Pattern | Example | Better |
| --- | --- | --- |
| UI-coupled | "When I click the blue button" | "When I submit the form" |
| Imperative | "When I type 'john' in field" | "When I enter credentials" |
| Too many Ands | Given X And Y And Z... | Use Background |
| Testing code | "Then database has record" | "Then user is registered" |
| Vague Then | "Then it works" | "Then I see confirmation" |
## Output Format
### Feature File (.feature)
```gherkin
Feature: Shopping Cart
As a shopper
I want to add items to my cart
So that I can purchase them later
Background:
Given I am logged in as a customer
And the product catalog is available
Scenario: Add single item to empty cart
Given my cart is empty
When I add "Widget" to my cart
Then my cart contains 1 item
And the cart total reflects the item price
Scenario: Add item already in cart
Given my cart contains 1 "Widget"
When I add another "Widget"
Then my cart contains 2 "Widget"
And the cart total is updated
```
### Inline Acceptance Criteria
```markdown
### Acceptance Criteria
- [ ] AC-1: Given empty cart, when adding item, then cart contains 1 item
- [ ] AC-2: Given item in cart, when adding same item, then quantity increases
- [ ] AC-3: Given item in cart, when removing item, then cart is empty
```
## Related Commands
- `/spec-driven-development:gherkin-convert` - Convert between formats
- `/spec-driven-development:ears-author` - Create EARS requirements
- `/spec-driven-development:specify` - Generate full specification
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.