AgentSkillsCN

acceptance-criteria

从代码文件中生成验收标准。适用场景:当用户分享代码文件并要求为 Jira 工单编写 AC、验收标准,或总结代码的功能时。

SKILL.md
--- frontmatter
name: acceptance-criteria
description: Generate Acceptance Criteria from code files. Use when user shares a code file and asks to write AC, acceptance criteria, or summarize what the code does for Jira tickets.

Acceptance Criteria Generator

Generate concise AC from code files for Jira ticket descriptions.

Workflow

  1. User shares a code file (via @ mention)
  2. Read and analyze the code to identify user-facing behaviors
  3. Generate AC in GWT format with AC number prefix

Output Rules

  • Plain text only, absolutely no markdown (no bold, no bullets, no backticks)
  • English only
  • Always use GWT (Given-When-Then) format
  • Prefix each AC with number: AC1:, AC2:, AC3:, ...
  • One AC per line
  • Keep each AC concise, fit in a single line
  • Target 5-10 ACs total, merge related behaviors into one AC when appropriate
  • Only describe behaviors that actually exist in the code, never assume or invent functionality

Accuracy Requirement

Critical: AC must accurately reflect what the code actually does.

  • Read the code logic carefully before writing
  • Do not write AC that contradicts the code
  • Do not assume features that are not implemented
  • If uncertain about a behavior, omit it rather than guess

Output Format

AC1: Given [context], When [action], Then [result] AC2: Given [context], When [action], Then [result] AC3: Given [context], When [action], Then [result] ...

Example Output

AC1: Given a user on the login page, When they enter valid credentials and click submit, Then they are redirected to the dashboard AC2: Given a user on the login page, When they enter an invalid password, Then an error message is displayed and they remain on the login page AC3: Given a user is logged in, When their session expires, Then they are redirected to the login page AC4: Given a user on the login page, When they click "Forgot Password", Then they are navigated to the password reset page AC5: Given a logged-in user, When they click logout, Then their session is cleared and they are redirected to the login page