VI

vitest-bdd-3layer

Implement structured BDD testing with Vitest. Separates business-readable scenarios from technical mock/adapter implementations.

Install

mkdir -p .claude/skills/vitest-bdd-3layer && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/4571" && unzip -o skill.zip -d .claude/skills/vitest-bdd-3layer && rm skill.zip

Installs to .claude/skills/vitest-bdd-3layer

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

DashPlayer 三层 Vitest-BDD 技能。Use when developers want business-readable BDD scenarios without coupling scenario writing to code implementation details. Triggers on: "BDD 三层", "行为测试分层", "给定当那么", "Vitest BDD", "不想在场景里写实现".
219 chars✓ has a “when” trigger
Intermediate

Key capabilities

  • Write BDD tests using Vitest and a three-layer model
  • Decouple scenario writing from implementation details
  • Organize business actions into a step dictionary
  • Manage mock, fixture, and dependency injection in an implementation layer
  • Ensure business-readable BDD scenarios

How it works

The skill enforces a three-layer structure for Vitest BDD tests, separating business sentences (scenario layer) from business actions (step dictionary layer) and underlying mock/fixture management (implementation layer). This ensures scenarios are business-readable and maintainable.

Inputs & outputs

You give it
Business requirements as 'Given/When/Then' sentences
You get back
BDD test scenarios with decoupled implementation details

When to use vitest-bdd-3layer

  • Write business-readable tests
  • Decouple tests from service logic
  • Standardize BDD test structure
  • Verify complex service contracts

About vitest-bdd-3layer

Enforces a three-layer model (Scenario, Step Dictionary, Implementation) for Vitest tests. It keeps business requirements readable while isolating mock and fixture complexity.

DashPlayer 三层 Vitest-BDD 技能。Use when developers want business-readable BDD scenarios without coupling scenario writing to code implementation details. Triggers on: "BDD 三层", "行为测试分层", "给定当那么", "Vitest BDD", "不想在场景里写实现".

When not to use it

  • For pure algorithm utility functions
  • For highly volatile, flaky, or strongly sequential use cases

Limitations

  • Scenario layer cannot contain technical details like mock or new service instances
  • Step methods must follow 'given/when/then' naming conventions
  • A single scenario should not cover multiple business promises

How it compares

This skill standardizes BDD testing by strictly separating concerns into three layers, preventing the coupling of business scenarios with technical implementation details often found in less structured testing approaches.

Compared to similar skills

vitest-bdd-3layer side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
vitest-bdd-3layer (this skill)16moReviewIntermediate
dependency-upgrade265moReviewIntermediate
angular-best-practices213moNo flagsAdvanced
validate-typescript59moReviewBeginner

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry