Skip to content

Structured Given-When-Then guidance and feature file patterns for writing business-readable acceptance tests and specifications.

CCM score
50 of 100
skills.sh installs
213
GitHub stars
202
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers Given-When-Then scenario structure, feature file organization, Background blocks, and Scenario Outlines for data-driven tests
  • Includes Gherkin examples for authentication, shopping cart, and password validation, plus a Ruby/Cucumber step definition pattern
  • Provides best practices and common pitfalls, such as keeping steps declarative and avoiding coupling to specific UI implementations
  • Designed for teams defining behavior before implementation and creating living documentation from acceptance tests

Install

$ npx -y skills add thebushidocollective/han --skill bdd-patterns -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

BDD Patterns

Master Behavior-Driven Development patterns to write clear, business-readable specifications that drive implementation.

Given-When-Then Structure

The fundamental BDD pattern uses three parts:

  • Given: The initial context or preconditions
  • When: The action or event being tested
  • Then: The expected outcome or result
Feature: User Authentication

  Scenario: Successful login with valid credentials
    Given a registered user with email "user@example.com"
    And the user has password "secure123"
    When the user submits the login form with correct credentials
    Then the user should be redirected to the dashboard
    And a session should be created

Feature File Organization

Feature: Shopping Cart
  As a customer
  I want to manage items in my cart
  So that I can purchase products I'm interested in

  Background:
    Given I am logged in as a customer
    And the product catalog is available

  Scenario: Add item to empty cart
    Given my cart is empty
    When I add "Blue T-Shirt" to my cart
    Then my cart should contain 1 item
    And the cart total should be $29.99

Details

Repository
github.com/thebushidocollective/han
Categories
Testing & QA, Technical Documentation
First seen
Jun 3, 2026

Questions

What does the bdd-patterns skill do for Claude Code?

The bdd-patterns skill guides the agent in Behavior-Driven Development, covering Given-When-Then structure, feature files and acceptance criteria. It helps write clear, business-readable specifications and BDD-style tests that drive implementation.

How do I install the bdd-patterns skill?

Run npx -y skills add thebushidocollective/han --skill bdd-patterns -y in your project. Once installed, the agent can write scenarios with Given-When-Then steps, Scenario Outlines and Background setup.

Which skills lead the Testing & QA category alongside bdd-patterns?

Other skills in the Testing & QA category include tdd, test-driven-development, webapp-testing and break-ui. Where bdd-patterns differs is its focus on Given-When-Then specifications and feature files written from the user's perspective.

What tools does the bdd-patterns skill need?

The skill's SKILL.md lists Bash and Read as its allowed tools. Its examples use Ruby with Cucumber step definitions, so a Cucumber-style setup is needed to run them.

More from thebushidocollective/han

All 14

Similar to Bdd Patterns

More Testing & QA