bdd-scenarios — скилл для Claude Code: сценарии BDD и установка
Скилл bdd-scenarios для Claude Code описывает поведение системы через BDD-сценарии, критерии приёмки и крайние случаи. Помогает согласовать требования до реализации.
Apache-2.0 180 установок ★ 201 обновлён 2026-09-08
npx skills add TheBushidoCollective/han --skill bdd-scenarios -a claude-codeЧто делает bdd-scenarios
Скилл предлагает строить сценарии вокруг одного поведения и описывать результат на языке предметной области, а не шаги интерфейса или внутреннюю логику кода. Он помогает оформить критерии приёмки через правила и сценарии, добавить негативные случаи и разложить сценарии по тегам.
В рекомендациях есть порядок работы: начать с основного сценария, затем проверить крайние случаи и организовать сценарии тегами. Каждый сценарий лучше держать коротким и независимым от других. Это помогает заметить пробелы в требованиях до реализации; сами сценарии стоит обсуждать с заинтересованными сторонами.
Какие задачи решает
- описать критерии приёмки для пользовательской истории
- зафиксировать ожидаемое поведение системы
- добавить сценарии для ошибочных и пограничных случаев
- сгруппировать сценарии тегами для фильтрации
Примеры запросов агенту
- Составь BDD-сценарии для этой пользовательской истории и добавь критерии приёмки.
- Проверь сценарии регистрации: найди пропущенные крайние случаи и негативные проверки.
- Разложи сценарии входа по тегам и отдели основной поток от проверки блокировки аккаунта.
Как установить bdd-scenarios
1Через Skills CLI (Vercel)
npx skills add TheBushidoCollective/han --skill bdd-scenarios -a claude-code2Вручную: положить файлы
~/.claude/skills/bdd-scenarios/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/bdd-scenarios/
1Через Skills CLI (Vercel)
npx skills add TheBushidoCollective/han --skill bdd-scenarios -a codex2Вручную: положить файлы
.agents/skills/bdd-scenarios/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add TheBushidoCollective/han --skill bdd-scenarios -a cursor2Вручную: положить файлы
.cursor/skills/bdd-scenarios/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install TheBushidoCollective/han plugins/patterns/bdd/skills/bdd-scenarios2Вручную: положить файлы
.github/skills/bdd-scenarios/SKILL.md1Через Skills CLI (Vercel)
npx skills add TheBushidoCollective/han --skill bdd-scenarios -a gemini-cli2Командой платформы
gemini skills install https://github.com/TheBushidoCollective/han --path plugins/patterns/bdd/skills/bdd-scenariosВручную: положить файлы
.devin/skills/bdd-scenarios/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add TheBushidoCollective/han --skill bdd-scenarios -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о bdd-scenarios
Как установить bdd-scenarios в Claude Code?
Выполните npx skills add TheBushidoCollective/han --skill bdd-scenarios -a claude-code. Файл скилла будет доступен по пути ~/.claude/skills/bdd-scenarios/SKILL.md.
Что делает скилл bdd-scenarios?
Помогает описывать требования и ожидаемое поведение в виде BDD-сценариев, включая критерии приёмки и крайние случаи.
Как организовать сценарии с помощью bdd-scenarios?
Начните с основного сценария, затем добавьте пограничные случаи. Теги помогают группировать сценарии и фильтровать их.
Исходный текст
SKILL.md · Apache-2.0
---
name: bdd-scenarios
description: Use when writing effective BDD scenarios including acceptance criteria, edge cases, and scenario organization. Use when defining behavior specifications.
allowed-tools:
- Bash
- Read
---
# BDD Scenarios
Learn to write clear, maintainable BDD scenarios that effectively capture business requirements and drive implementation.
## Writing Good Scenarios
A good scenario should be:
- **Specific**: Test one behavior
- **Declarative**: Describe what, not how
- **Business-focused**: Use domain language
- **Independent**: No dependencies on other scenarios
```gherkin
# Good scenario - specific and declarative
Scenario: Customer receives loyalty discount
Given a customer with Gold membership status
And a cart total of $100
When the customer proceeds to checkout
Then a 10% loyalty discount should be applied
And the final total should be $90
# Bad scenario - too implementation-focused
Scenario: Apply discount
Given I click the membership dropdown
And I select "Gold" from the list
When I click the checkout button
Then the JavaScript calculates 10% off
```
## Acceptance Criteria Format
```gherkin
Feature: Order Refunds
# Rule-based acceptance criteria
Rule: Full refunds are available within 30 days
Scenario: Refund requested within return window
Given an order placed 15 days ago
When the customer requests a refund
Then a full refund should be processed
Scenario: Refund requested after return window
Given an order placed 45 days ago
When the customer requests a refund
Then the refund should be denied
And the customer should see "Return window expired"
```
## Edge Case Scenarios
```gherkin
Feature: User Registration
Scenario: Successful registration
Given I am on the registration page
When I submit valid registration details
Then my account should be created
# Edge cases
Scenario: Registration with existing email
Given a user exists with email "[email protected]"
When I try to register with email "[email protected]"
Then I should see "Email already registered"
Scenario: Registration with invalid email format
When I try to register with email "not-an-email"
Then I should see "Please enter a valid email"
Scenario: Registration with empty required fields
When I submit the registration form with empty fields
Then I should see validation errors for required fields
```
## Scenario Tags and Organization
```gherkin
@authentication @critical
Feature: User Login
@smoke
Scenario: Basic login flow
# ...
@security
Scenario: Account lockout after failed attempts
# ...
@wip
Scenario: Two-factor authentication
# Work in progress
```
## When to Use This Skill
Use bdd-scenarios when you need to:
- Define acceptance criteria for user stories
- Document expected system behavior
- Create comprehensive test coverage
- Identify edge cases early in development
- Communicate requirements clearly
## Best Practices
- Start with the happy path scenario
- Add edge cases systematically
- Use tags for organization and filtering
- Keep scenarios at 3-7 steps
- Write scenarios before implementation
- Review scenarios with stakeholders
## Common Pitfalls
- Writing scenarios after implementation
- Including too many steps per scenario
- Using vague or ambiguous language
- Forgetting negative test cases
- Not organizing with tags effectively
© TheBushidoCollective · Apache-2.0 · TheBushidoCollective/han