Skip to content
Back to skills

Bdd From Api Spec

ASecurity

Generate Gherkin BDD feature files from API handler definitions — map endpoints to executable business scenarios

  • 57 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 17, 2026
testinggotestingapi

Works with

  • api

Security analysis

A100/100

Scanned October 17, 2026

npx -y skills add diegosouzapw/awesome-omni-skill --skill bdd-from-api-spec --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Bdd From Api Spec?

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

Security grade badge for Bdd From Api Spec
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/diegosouzapw-bdd-from-api-spec/badge)](https://www.skillsdirectory.com/skills/diegosouzapw-bdd-from-api-spec)

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: BDD from API Spec
description: Generate Gherkin BDD feature files from API handler definitions — map endpoints to executable business scenarios
category: testing
version: 1.0.0
triggers:
  - new-handler
  - endpoint-change
  - bdd-request
globs: "**/handler/**,**/features/**"
---

# BDD from API Spec Skill

Automatically generate Gherkin feature files from API handler definitions, producing executable business specifications for each endpoint.

## Trigger Conditions
- New handler file is created
- Existing handler endpoint is modified
- BDD scenarios are requested
- User invokes with "write BDD" or "bdd-from-api-spec"

## Input Contract
- **Required:** Path to handler files
- **Optional:** OpenAPI spec for additional context

## Output Contract
- Gherkin `.feature` files per handler/resource
- Scenario coverage: happy path, error cases, edge cases, auth checks
- Step definition stubs (Go/Godog format)

## Tool Permissions
- **Read:** Handler files, DTO files, service interfaces, OpenAPI spec
- **Write:** Feature files in `features/` directory, step definition stubs
- **Search:** Grep for handler methods, route registrations

## Execution Steps

1. **Extract endpoints**: Parse handler files for all endpoint methods with HTTP method and path
2. **Identify scenarios**: For each endpoint, generate scenarios:
   - Happy path (valid request, successful response)
   - Authentication failure (missing/invalid token)
   - Authorization failure (wrong user/scope)
   - Validation failure (invalid input)
   - Business rule failure (e.g., insufficient funds, account frozen)
   - Idempotency (duplicate request returns same result)
3. **Generate Gherkin**: Write `.feature` files with Given/When/Then format
4. **Generate step stubs**: Create step definition file stubs for Godog

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.

Comments

Loading comments…

Newsletter

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