Execute BDD scenarios

Execute BDD scenarios is a skill for Claude Code from Intai/story-flow. It costs 18 tokens per session (15,362 once invoked), scanned A, original, MIT.

A skill for running BDD scenarios from .feature files in a browser. BDD, or behavior-driven development, describes expected behavior in readable Given, When, and Then steps.

In plain words
What is it for?
Use it to execute browser-based acceptance scenarios, including their setup steps, and compare each result with the feature file.
Why use it?
It checks the real browser behavior against the written expectations and stops at the first failed check, with evidence and a likely cause.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions subagents.

Part of the story-flow plugin — 5 skills, 4 commands, 5 agents shipped together

Good fit Use it to execute browser-based acceptance scenarios, including their setup steps, and compare each result with the feature file.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/intai/story-flow/execute-bdd-scenario
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Intai/story-flow --skill execute-bdd-scenario
Clone the repo
git clone --depth 1 https://github.com/Intai/story-flow

Made for: Claude Code.

Or install story-flow, the plugin that ships this one along with the rest of its 5 skills, 4 commands, 5 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for Execute BDD scenarios

README.md
[![agentmods](https://agentmods.dev/badge/skills/intai/story-flow/execute-bdd-scenario/github.svg)](https://agentmods.dev/skills/intai/story-flow/execute-bdd-scenario)
Your own site
<a href="https://agentmods.dev/skills/intai/story-flow/execute-bdd-scenario"><img src="https://agentmods.dev/badge/skills/intai/story-flow/execute-bdd-scenario/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for Execute BDD scenarios

Your own site · 80×15
<a href="https://agentmods.dev/skills/intai/story-flow/execute-bdd-scenario"><img src="https://agentmods.dev/badge/skills/intai/story-flow/execute-bdd-scenario.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 15,362 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 4 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 79
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium Output Handling · line 555
    Output size or generation rate is not bounded. Unbounded output enables denial-of-service through resource exhaustion, log flooding, or context-window stuffing.
    Fix: Set explicit limits on output length, generation count, and rate. Use max_tokens and truncation to prevent unbounded output.
  • medium Data Exfiltration · line 617
    Data is uploaded to cloud storage (S3 / GCS / Azure Blob). This may be a legitimate backup or exfiltration to an external bucket. Manual review is recommended.
    Fix: Verify the destination bucket is trusted and owned by you. Never upload credentials, secrets, or workspace contents to external or unverified cloud storage.
  • medium Data Exfiltration · line 620
    Data is uploaded to cloud storage (S3 / GCS / Azure Blob). This may be a legitimate backup or exfiltration to an external bucket. Manual review is recommended.
    Fix: Verify the destination bucket is trusted and owned by you. Never upload credentials, secrets, or workspace contents to external or unverified cloud storage.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00018 $0.15362
Opus 5 $0.00009 $0.07681
Sonnet 5 $0.00004 $0.03072
Haiku 4.5 $0.00002 $0.01536

Measured 9d ago against content hash a86425ff7991, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

Execute BDD scenarios scanned grade A with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- **Execute all Background steps:** Background sections (both global and rule-specific) in feature files define prerequisite setup steps. **EVERY** step MUST be completed before executing the scenario steps, including bo

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

execSync('make reseed', { stdio: 'inherit' });
plugins/story-flow/skills/execute-bdd-scenario/SKILL.md · 1,336 lines

How it starts

The opening of the file, as written. The whole thing — 1,336 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Execute BDD scenarios

Instructions

  • Use mcp__plugin_story-flow_playwright__* tools to manipulate browser to EXECUTE the BDD scenarios directly without generating any Playwright test file.
  • Test Execution Protocol:
    • Before executing: Read the feature file and confirm the exact line numbers, scenario title, background sections and all "Then" and "And" assertions.
    • Execution order is CRITICAL:
      1. Scenario tags FIRST (e.g., @purge-data)
      2. Background steps SECOND (setup prerequisites)
      3. Scenario steps THIRD (Given/When/Then)
    • Execute all Background steps: Background sections (both global and rule-specific) in feature files define prerequisite setup steps. EVERY step MUST be completed before executing the scenario steps, including both UI interactions and API calls by curl.
    • During execution: Compare actual behavior against expected behavior at each assertion step.
    • On failure: STOP immediately and provide a summary including:
      • Expected behavior (with line numbers from feature file)
      • Actual behavior (with evidence from page snapshot)
      • Root cause analysis
      • CRITICAL: Do NOT continue to subsequent test steps after a failure
  • Executing Multiple Scenarios: When executing multiple scenarios (e.g., "Execute all scenarios in @path/to/file.feature", "Execute ARMR-01,ARMR-02 scenarios in @path/to/file.feature"):
    1. Read the feature file to identify all scenario IDs and titles
    2. For each scenario, use the Task tool with subagent_type="general-purpose" to run it in isolated context sequentially:
      Load BOTH skills in this order using the Skill tool:
      1. First: `story-flow:execute-bdd-scenario` (plugin - general BDD framework)
      2. Then: `execute-bdd-scenario` (project-level - overrides/extends the plugin)
      3. Confirm both skills are loaded before continuing with the execution.
      
      Execute BDD scenario <SCENARIO-ID> in @path/to/file.feature [--record if recording mode is active].
      
      IMPORTANT: Replace <SCENARIO-ID> with the individual scenario ID (e.g., ARMR-01), NOT "all". Each subagent executes exactly one scenario. Recording Mode: When executing multiple scenarios with --record, pass the --record flag to each subagent prompt. Each subagent is responsible for generating/updating the .spec.js file after executing its scenario — do NOT defer spec file generation to the parent orchestrator.
    3. Wait for subagent completion, record PASS/FAIL result
    4. If the scenario FAILED: STOP immediately and print the summary table with remaining scenarios marked as "⊘ SKIPPED". Do NOT proceed to the next scenario.
    5. Print summary table:
      | Scenario | Title | Result |
      |----------|-------|--------|
      | SMG-01   | Display available languages | ✓ PASSED |
      | SMG-02   | Search and filter strings   | ✗ FAILED |
      | SMG-03   | Inline edit a string value  | ⊘ SKIPPED |
      
  • Save .feature files in the same folder as the stories.
  • If a BDD scenario has the @screenshots tag, take one screenshot per assertion group — a maximal run of consecutive assertion steps with no action or wait step between them, since nothing re-renders in between — captured after the group's last UI assertion so every asserted condition has settled, and, in --record mode when VRT is configured, emit one visual regression tracking call per group (see Visual Regression Testing (VRT)). Command and polling assertion steps (S3/CLI/API checks) assert outside the viewport: they take no screenshot and do not break the group. Pass browser_take_screenshot a filename explicitly prefixed with .playwright-mcp/ — e.g. .playwright-mcp/SMG-01-i-should-see-the-dashboard.png so it lands in the .playwright-mcp output folder — never an absolute path, which writes to the project root.
  • If a BDD scenario doesn't have the @screenshots tag, do not take any screenshot.
  • If a BDD scenario has the @purge-data tag, restore the seed data first (before the Background steps) by executing the make reseed command.
  • If a BDD scenario does not have the @purge-data tag, do not restore the seed data before running the scenario.
  • If a BDD scenario has the @timeout-* tag, extend the scenario and expect timeout to be longer. e.g. @timeout-600s means timeout for the scenario and every expect step is 600s(10m).
  • Use mcp__plugin_story-flow_playwright__browser_run_code_unsafe to set the browser offline.
  • Reference the @Makefile for local development workflows.
  • Navigate relative to the base URL from BASE_URL, falling back to use.baseURL in the project's @playwright.config.js. Never hardcode a host.

Read the full file on GitHub · 1,336 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 1,336 lines · 18 tokens per session scan A a86425ff7991

Subscribe to this mod's changes

Execute BDD scenarios is a skill published in the GitHub repository Intai/story-flow (12 stars, last pushed 2d ago), licensed MIT. It adds 18 tokens to every session and 15,362 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

qawolf-cli

Manage QA Wolf through the qawolf CLI. Use when asked to create, update, or list coverage requests, bug reports, or maintenance reports; start a run of flows or tags on the QA Wolf platform or read a run's results; list, set, or delete environment variables; manage environments, flows, or tags; request automation of…

qawolf/cli · 118 tokens

playwright-expert

Expert in Playwright E2E testing framework, auto-waiting mechanisms, test generation, trace viewer, and CI/CD integration. Use when the user mentions testing, end-to-end tests, QA, automation, end-to-end testing, or test automation, or when the task involves Playwright Framework, Test Organization, Advanced Features…

personamanagmentlayer/pcl · 77 tokens

selenium-expert

Expert in Selenium WebDriver, Selenium Grid, page object model, waits, cross-browser testing, and test automation frameworks. Use when the user mentions testing, end-to-end tests, QA, automation, WebDriver, or Selenium grid, or when the task involves Selenium Components, Browser Support, Advanced Features, or Basic…

personamanagmentlayer/pcl · 72 tokens

argus

Argus AI-powered QA harness — Chrome DevTools MCP reference for browser automation, accessibility, performance, security, and debugging.

ironclawdevs27/Argus · 27 tokens

playwright-cli

Automate browser interactions, test web pages and work with Playwright tests.

microsoft/playwright · 19 tokens

playwright-component-testing

Set up component testing with Playwright using a story gallery — scaffold stories and a gallery dev page driven by the built-in mount fixture, no dedicated component-testing runtime. Use when asked to test React or Vue components in isolation with Playwright, or to migrate off @playwright/experimental-ct-react / -vue.

microsoft/playwright · 69 tokens