# Execute BDD scenarios

> Execute BDD scenarios is an open-source agent skill for browser automation. Lets an AI coding agent run BDD .feature scenarios through a live browser or shell. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/Intai/story-flow/tree/main/plugins/story-flow/skills/execute-bdd-scenario
- **Repository:** https://github.com/intai/story-flow
- **GitHub stars:** 16
- **License:** MIT
- **Skill name:** Execute BDD scenarios
- **Collection:** https://github.com/Intai/story-flow
- **Categories:** [browser automation](https://ai-powered.com/categories/browser-automation)
- **Listing updated:** 2026-12-03

## About

This skill has the agent execute Gherkin scenarios from .feature files directly, driving a browser through Playwright tools instead of writing a test file first. Background steps run before the scenario's own steps, and tags such as purge-data trigger a reseed, while screenshot and timeout tags adjust how the run captures evidence and how long it waits.

On a failed assertion the run stops at once and reports the expected behavior with feature line numbers, the observed behavior, and a root-cause note. Scenarios that only touch the command line run in the shell, and when a recording mode is requested the skill can also generate Playwright or language-native test files from the executed steps.

It expects a project with browser automation available through the Playwright MCP tools, and may reference a Makefile and a Playwright config for base URLs and seed commands.

## When your agent uses it

> Execute BDD test scenarios from .feature files using browser automation.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/Intai/story-flow/tree/HEAD/plugins/story-flow/skills/execute-bdd-scenario)
- [License: MIT](https://github.com/Intai/story-flow/tree/HEAD/plugins/story-flow/skills/execute-bdd-scenario)

## Features

- **Ordered scenario execution:** Runs tags first, then Background steps, then the Given, When and Then steps, stopping at the first failure.
- **Browser-driven checks:** Executes UI steps through Playwright browser tools and compares page state with each expected outcome.
- **Command-line scenarios:** Runs scenarios without UI steps in the shell and reports command output and exit codes as evidence.
- **Test recording mode:** Can turn executed steps into a generated Playwright spec file, with helper functions for Background setup.
- **Screenshot and VRT hooks:** Captures screenshots for tagged scenarios and can send them to a visual regression tracker when configured.
- **Multi-scenario runs:** Runs each scenario of a feature file in its own subagent and prints a pass, fail or skipped summary table.

## Good for

- Run all scenarios in a feature file against the running app
- Execute one scenario by ID and report where its assertions failed
- Reseed test data and then run a tagged scenario
- Record executed BDD scenarios as a Playwright test file
- Check a command-line workflow from a feature file and report its output

## Install

### Claude Code

This skill ships in the `story-flow` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add Intai/story-flow
/plugin install story-flow@story-flow
```

Or copy only this skill to `~/.claude/skills/execute-bdd-scenario`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Intai/story-flow.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/execute-bdd-scenario &&
cp -R "$tmp/plugins/story-flow/skills/execute-bdd-scenario" ~/.claude/skills/execute-bdd-scenario &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/execute-bdd-scenario` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/execute-bdd-scenario` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Intai/story-flow.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/execute-bdd-scenario &&
cp -R "$tmp/plugins/story-flow/skills/execute-bdd-scenario" ~/.agents/skills/execute-bdd-scenario &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/execute-bdd-scenario` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/execute-bdd-scenario` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Intai/story-flow.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/execute-bdd-scenario &&
cp -R "$tmp/plugins/story-flow/skills/execute-bdd-scenario" ~/.cursor/skills/execute-bdd-scenario &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/execute-bdd-scenario` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/Intai/story-flow.git --path plugins/story-flow/skills/execute-bdd-scenario
```

Or copy the folder to `~/.gemini/skills/execute-bdd-scenario` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/execute-bdd-scenario`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Intai/story-flow.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/execute-bdd-scenario &&
cp -R "$tmp/plugins/story-flow/skills/execute-bdd-scenario" ~/.copilot/skills/execute-bdd-scenario &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/execute-bdd-scenario` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/Intai/story-flow.git
```

Then copy `story-flow/plugins/story-flow/skills/execute-bdd-scenario` into your agent's skills folder as `execute-bdd-scenario`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Does Execute BDD scenarios need a browser?

Scenarios with browser or app steps use Playwright browser tools. Scenarios that only run commands or call APIs execute in the shell without a browser.

### What happens when a scenario fails?

The run stops immediately, and the report lists the expected behavior with feature line numbers, the actual behavior, and a root-cause analysis. Later steps are not run.

### Does Execute BDD scenarios write test files by default?

No. Direct execution runs the scenario without generating a test file. Test files are only generated when the recording flag is passed.

### How are test data resets handled?

Scenarios tagged purge-data run a make reseed command before the Background steps. Other scenarios keep existing data.

### How do I install Execute BDD scenarios in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/execute-bdd-scenario to use it in all your projects, or to .claude/skills/execute-bdd-scenario in one project. Or install the story-flow plugin, which includes it: /plugin marketplace add Intai/story-flow, then /plugin install story-flow@story-flow.

### Does Execute BDD scenarios run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Execute BDD scenarios?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Execute BDD scenarios?

The closest alternatives to Execute BDD scenarios are Playwright generate test, Webapp testing, Browser verify, Playwright skill and Playwright verification.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Playwright generate test](https://ai-powered.com/skills/playwright-generate-test): Playwright generate test is an open-source agent skill for browser automation.
- [Webapp testing](https://ai-powered.com/skills/webapp-testing-github): Webapp testing is an open-source agent skill for browser automation.
- [Browser verify](https://ai-powered.com/skills/browser-verify): Browser verify is an open-source agent skill for browser automation.
- [Playwright skill](https://ai-powered.com/skills/playwright-skill): Playwright skill is an open-source agent skill for browser automation.
- [Playwright verification](https://ai-powered.com/skills/playwright-verification-ajyadav013): Playwright verification is an open-source agent skill for browser automation.
- [Webapp testing](https://ai-powered.com/skills/webapp-testing): Webapp testing is an open-source agent skill for browser automation.
- [Playwright interactive](https://ai-powered.com/skills/playwright-interactive): Playwright interactive is a free agent skill for browser automation.
- [Agent browser](https://ai-powered.com/skills/agent-browser-melandlabs): Agent browser is an open-source agent skill for browser automation.

---
Source: https://ai-powered.com/skills/execute-bdd-scenarios
