Token导航 LogoToken导航TokenDH.com
开发只读github未标认证来源可访问clear审计异常

bdd-patternsBDD 模式

Agent Skill

bdd-patterns 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,812

周安装

116

GitHub Stars

143

下载量

919
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:bdd-patterns(BDD 模式)
来源仓库:https://github.com/thebushidocollective/han
仓库路径:skills/bdd-patterns
安装命令:
npx skills add https://github.com/thebushidocollective/han --skill bdd-patterns
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/thebushidocollective/han --skill bdd-patterns

简介

bdd-patterns 提供 BDD 核心模式参考,包括 Given-When-Then 结构、用户认证等典型场景示例。

  • 帮助团队编写清晰、可维护的业务可读规范,驱动实现而非描述实现。
  • 适用于新项目开发初期建立标准化流程,提升需求一致性。
  • 输出场景应使用通用语言,避免技术术语干扰业务理解。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

BDD Patterns

Master Behavior-Driven Development patterns to write clear, business-readable specifications that drive implementation.

Given-When-Then Structure

The fundamental BDD pattern uses three parts:

  • Given: The initial context or preconditions
  • When: The action or event being tested
  • Then: The expected outcome or result
Feature: User Authentication

  Scenario: Successful login with valid credentials
    Given a registered user with email "user@example.com"
    And the user has password "secure123"
    When the user submits the login form with correct credentials
    Then the user should be redirected to the dashboard
    And a session should be created

Feature File Organization

Feature: Shopping Cart
  As a customer
  I want to manage items in my cart
  So that I can purchase products I'm interested in

  Background:
    Given I am logged in as a customer
    And the product catalog is available

  Scenario: Add item to empty cart
    Given my cart is empty
    When I add "Blue T-Shirt" to my cart
    Then my cart should contain 1 item
    And the cart total should be $29.99

  Scenario: Remove item from cart
    Given my cart contains "Blue T-Shirt"
    When I remove "Blue T-Shirt" from my cart
    Then my cart should be empty

Scenario Outlines for Data-Driven Tests

Scenario Outline: Password validation
  Given I am on the registration page
  When I enter password "<password>"
  Then I should see "<message>"

  Examples:
    | password    | message                        |
    | abc         | Password too short             |
    | abcdefgh    | Password needs a number        |
    | abcdefgh1   | Password accepted              |
    | abcdefgh1!  | Password accepted              |

Step Definition Patterns

# Ruby/Cucumber example
Given('a registered user with email {string}') do |email|
  @user = User.create!(email: email, password: 'password123')
end

When('the user submits the login form with correct credentials') do
  visit login_path
  fill_in 'Email', with: @user.email
  fill_in 'Password', with: 'password123'
  click_button 'Log In'
end

Then('the user should be redirected to the dashboard') do
  expect(page).to have_current_path(dashboard_path)
end

When to Use This Skill

Use bdd-patterns when you need to:

  • Write acceptance tests that stakeholders can understand
  • Define behavior before implementation
  • Create living documentation from tests
  • Bridge communication between developers and business
  • Ensure features meet business requirements

Best Practices

  • Write scenarios from the user's perspective
  • Keep scenarios focused on single behaviors
  • Use declarative language, not implementation details
  • Reuse step definitions across scenarios
  • Use Background for common setup steps
  • Keep feature files organized by domain area

Common Pitfalls

  • Writing scenarios that are too technical
  • Coupling steps to specific UI implementations
  • Creating overly complex scenario outlines
  • Not maintaining feature files as code changes
  • Mixing multiple behaviors in one scenario

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

31.5%
按下载量换算289

Antigravity

22.86%
按下载量换算210

OpenCode

17.81%
按下载量换算164

Codex

13.08%
按下载量换算120

Gemini CLI

8.67%
按下载量换算80

windsurf

3.65%
按下载量换算34

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills