acceptance-criteria-authoring

Write clear, testable acceptance criteria in Given-When-Then format following INVEST principles and BDD best practices.

181 stars

Best use case

acceptance-criteria-authoring is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Write clear, testable acceptance criteria in Given-When-Then format following INVEST principles and BDD best practices.

Teams using acceptance-criteria-authoring should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/acceptance-criteria-authoring/SKILL.md --create-dirs "https://raw.githubusercontent.com/majiayu000/claude-skill-registry/main/skills/data/acceptance-criteria-authoring/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/acceptance-criteria-authoring/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How acceptance-criteria-authoring Compares

Feature / Agentacceptance-criteria-authoringStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Write clear, testable acceptance criteria in Given-When-Then format following INVEST principles and BDD best practices.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Acceptance Criteria Authoring

## When to Use This Skill

Use this skill when:

- **Acceptance Criteria Authoring tasks** - Working on write clear, testable acceptance criteria in given-when-then format following invest principles and bdd best practices
- **Planning or design** - Need guidance on Acceptance Criteria Authoring approaches
- **Best practices** - Want to follow established patterns and standards

## Overview

Acceptance criteria define the conditions that must be met for a user story to be considered complete. Well-written acceptance criteria enable clear communication between stakeholders and drive automated acceptance tests.

## Given-When-Then Format

```gherkin
Given [precondition/context]
When [action/event]
Then [expected outcome]
```

### Components

| Component | Purpose | Example |
|-----------|---------|---------|
| **Given** | Set up initial context | "Given a logged-in premium user" |
| **When** | Trigger action/event | "When they click 'Download Report'" |
| **Then** | Assert expected outcome | "Then a PDF report downloads" |
| **And** | Chain multiple conditions | "And the report includes all orders" |
| **But** | Negative assertion | "But archived orders are excluded" |

## INVEST Principles for User Stories

| Letter | Principle | Description |
|--------|-----------|-------------|
| **I** | Independent | Can be developed in any order |
| **N** | Negotiable | Details can be discussed |
| **V** | Valuable | Delivers user/business value |
| **E** | Estimable | Can be sized by team |
| **S** | Small | Fits in one sprint |
| **T** | Testable | Has clear acceptance criteria |

## Acceptance Criteria Best Practices

### Do ✅

- Use business language, not technical jargon
- Be specific and measurable
- Include happy path and edge cases
- Keep scenarios focused and atomic
- Write from user perspective
- Include error scenarios

### Don't ❌

- Include implementation details
- Make criteria too broad
- Use ambiguous terms ("fast", "user-friendly")
- Combine multiple behaviors in one scenario
- Skip error handling scenarios

## Example: E-commerce Checkout

### User Story

```text
As a registered customer
I want to checkout with a saved payment method
So that I can complete purchases quickly
```

### Acceptance Criteria

```gherkin
Feature: Checkout with Saved Payment

  Background:
    Given I am logged in as a registered customer
    And I have a saved Visa card ending in 4242

  Scenario: Successful checkout with saved card
    Given I have items in my cart totaling $50.00
    When I proceed to checkout
    And I select my saved Visa card
    And I click "Place Order"
    Then I see an order confirmation page
    And I receive a confirmation email
    And my card is charged $50.00

  Scenario: Checkout with expired saved card
    Given my saved card has expired
    And I have items in my cart
    When I proceed to checkout
    And I select my expired card
    Then I see a message "This card has expired"
    And I am prompted to update the card or add a new one

  Scenario: Checkout when card is declined
    Given I have items in my cart
    When I proceed to checkout
    And I select my saved card
    And I click "Place Order"
    And the payment is declined
    Then I see a message "Payment declined. Please try another payment method."
    And the order is not created
    And my cart is preserved

  Scenario: Checkout with insufficient inventory
    Given I have 3 units of "Widget X" in my cart
    And only 2 units are in stock
    When I proceed to checkout
    Then I see a message "Widget X: Only 2 available"
    And I am prompted to update quantity
```

## Scenario Patterns

### Happy Path

```gherkin
Scenario: User successfully [action]
  Given [valid preconditions]
  When [correct action]
  Then [expected positive outcome]
```

### Error Handling

```gherkin
Scenario: [Action] fails due to [reason]
  Given [preconditions that lead to failure]
  When [action that will fail]
  Then [appropriate error message]
  And [system state is preserved/recovered]
```

### Edge Cases

```gherkin
Scenario: [Action] with boundary condition
  Given [boundary condition setup]
  When [action at boundary]
  Then [expected behavior at boundary]
```

### Security

```gherkin
Scenario: Unauthorized user attempts [action]
  Given I am not logged in
  When I try to access [protected resource]
  Then I am redirected to login page
  And I see "Please log in to continue"
```

## Scenario Outlines

Use for testing multiple data variations:

```gherkin
Scenario Outline: Discount applied based on order value
  Given I have items in my cart totaling <order_total>
  When I proceed to checkout
  Then I see a discount of <discount>
  And my final total is <final_total>

  Examples:
    | order_total | discount | final_total |
    | $50.00      | $0.00    | $50.00      |
    | $100.00     | $5.00    | $95.00      |
    | $200.00     | $20.00   | $180.00     |
```

## .NET SpecFlow Example

```csharp
[Binding]
public class CheckoutSteps
{
    private readonly CheckoutContext _context;

    public CheckoutSteps(CheckoutContext context)
    {
        _context = context;
    }

    [Given(@"I am logged in as a registered customer")]
    public void GivenIAmLoggedInAsARegisteredCustomer()
    {
        _context.Customer = TestCustomers.CreateRegistered();
        _context.Session = _context.AuthService.Login(_context.Customer);
    }

    [Given(@"I have items in my cart totaling \$(.*)")]
    public void GivenIHaveItemsInMyCartTotaling(decimal total)
    {
        _context.Cart = TestCart.WithTotal(total);
    }

    [When(@"I click ""(.*)""")]
    public void WhenIClick(string button)
    {
        _context.Result = _context.CheckoutPage.Click(button);
    }

    [Then(@"I see an order confirmation page")]
    public void ThenISeeAnOrderConfirmationPage()
    {
        Assert.IsType<OrderConfirmationPage>(_context.Result);
    }

    [Then(@"I receive a confirmation email")]
    public void ThenIReceiveAConfirmationEmail()
    {
        var emails = _context.EmailService.GetEmailsFor(_context.Customer.Email);
        Assert.Contains(emails, e => e.Subject.Contains("Order Confirmation"));
    }
}
```

## Coverage Checklist

For each user story, ensure coverage of:

- [ ] **Happy path**: Main success scenario
- [ ] **Validation errors**: Invalid input handling
- [ ] **Business rule violations**: Domain constraint failures
- [ ] **Authorization failures**: Access control
- [ ] **External service failures**: Third-party integration errors
- [ ] **Boundary conditions**: Min/max values, empty states
- [ ] **Concurrency**: Multiple users, race conditions
- [ ] **State transitions**: Valid and invalid state changes

## Acceptance Criteria Template

```markdown
## User Story
As a [role]
I want to [action]
So that [benefit]

## Acceptance Criteria

### Scenario 1: [Happy path description]
Given [precondition]
When [action]
Then [expected outcome]

### Scenario 2: [Error case description]
Given [error-inducing condition]
When [action]
Then [error handling behavior]

### Scenario 3: [Edge case description]
Given [edge condition]
When [action]
Then [boundary behavior]

## Out of Scope
- [Explicitly excluded scenarios]

## Notes
- [Implementation hints or business context]
```

## Integration Points

**Inputs from**:

- Requirements → Story context
- `jtbd-analysis` skill → Job steps
- `test-case-design` skill → Test techniques

**Outputs to**:

- SpecFlow/Cucumber automation
- `test-strategy-planning` skill → Acceptance test scope
- Definition of Done

Related Skills

acceptance-testing

181
from majiayu000/claude-skill-registry

Plan and (when feasible) implement or execute user acceptance tests (UAT) / end-to-end acceptance scenarios. Converts requirements or user stories into acceptance criteria, test cases, test data, and a sign-off checklist; suggests automation (Playwright/Cypress for web, golden/snapshot tests for CLIs/APIs). Use when validating user-visible behavior for a release, or mapping requirements to acceptance coverage.

acceptance-tester

181
from majiayu000/claude-skill-registry

Execute systematic acceptance testing to verify implementations against acceptance criteria. Use this skill when tasks mention "驗收測試", "acceptance testing", "驗收", "validate implementation", or when Gherkin scenarios need to be executed.

acceptance-test-writing

181
from majiayu000/claude-skill-registry

Guide for writing high-quality acceptance criteria and acceptance tests using industry-standard BDD (Behavior-Driven Development) and ATDD (Acceptance Test-Driven Development) practices. Use this skill when creating acceptance criteria for user stories, writing Gherkin scenarios, or implementing acceptance test specifications following Given-When-Then format.

acceptance-criteria

181
from majiayu000/claude-skill-registry

检查Acceptance Criteria格式和完整性,验证是否符合Given-When-Then结构、覆盖正常流程/边界条件/异常场景。适合在为User Story编写AC后、准备测试用例前使用,当需要验收AC质量时。帮助不熟悉BDD的PM/BA确保AC明确、可测试、覆盖完整,避免遗漏关键场景。

acceptance-criteria-verification

181
from majiayu000/claude-skill-registry

Use after implementing features - verifies each acceptance criterion with structured testing and posts verification reports to the GitHub issue

acceptance-criteria-creator

181
from majiayu000/claude-skill-registry

Create acceptance criteria creator operations. Auto-activating skill for Enterprise Workflows. Triggers on: acceptance criteria creator, acceptance criteria creator Part of the Enterprise Workflows skill category. Use when working with acceptance criteria creator functionality. Trigger with phrases like "acceptance criteria creator", "acceptance creator", "acceptance".

doc-coauthoring

181
from majiayu000/claude-skill-registry

Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.

chrome-debug

159
from majiayu000/claude-skill-registry

This skill empowers AI agents to debug web applications and inspect browser behavior using the Chrome DevTools Protocol (CDP), offering both collaborative (headful) and automated (headless) modes.

Coding & DevelopmentClaude

vly-money

159
from majiayu000/claude-skill-registry

Generate crypto payment links for supported tokens and networks, manage access to X402 payment-protected content, and provide direct access to the vly.money wallet interface.

Fintech & CryptoClaude

thor-skills

159
from majiayu000/claude-skill-registry

An entry point and router for AI agents to manage various THOR-related cybersecurity tasks, including running scans, analyzing logs, troubleshooting, and maintenance.

SecurityClaude

grail-miner

159
from majiayu000/claude-skill-registry

This skill assists in setting up, managing, and optimizing Grail miners on Bittensor Subnet 81, handling tasks like environment configuration, R2 storage, model checkpoint management, and performance tuning.

DevOps & Infrastructure

ux

159
from majiayu000/claude-skill-registry

This AI agent skill provides comprehensive guidance for creating professional and insightful User Experience (UX) designs, covering user research, information architecture, interaction design, visual guidance, and usability evaluation. It aims to produce actionable, user-centered solutions that avoid generic AI aesthetics.

UX Design & StrategyClaude