AGENT SKILL

gherkin-authoring

Authors `.feature` files that stay business-readable, translate cleanly from PRD acceptance criteria, and reuse a shared step-definition library. Use when writing or editing scenarios — the SSOT enforcement rules live in `.agents/rules/gherkin-standards.md`; this skill shows authors how to apply them.

License 许可
MIT
所属仓库
dsj1984/mandrel
最近更新
2026-11-13
Stars
★ 7
Forks
1

01 前言 Front Matter

name
gherkin-authoring
description
Authors `.feature` files that stay business-readable, translate cleanly from PRD acceptance criteria, and reuse a shared step-definition library. Use when writing or editing scenarios — the SSOT enforcement rules live in `.agents/rules/gherkin-standards.md`; this skill shows authors how to apply them.

02 资源文件 5

03 SKILL.md 正文

Skill: gherkin-authoring

Policy Capsule

  • Write Given clauses as stative preconditions, When as a single business action, and Then as a user-visible outcome.
  • Allow exactly one When per scenario; if you need two, split into two scenarios.
  • Never assert on HTTP status codes, SQL state, DOM selectors, URLs, or JSON payloads inside .feature prose — push those to contract tests.
  • Tag every Scenario or Outline with exactly one canonical @domain-* tag and the appropriate risk/platform tags from the gherkin-standards taxonomy.
  • Use Background only when every scenario in the file genuinely shares the precondition with no per-scenario variation.
  • Complete the step-reuse sequence in gherkin-standards.md § Step Reuse before authoring any scenario text; that rule is the only home for it.
  • Author one scenario per PRD acceptance criterion; for bounded matrices, use a Scenario Outline with ≤12 Examples rows.
  • Use third-person present-tense, role-qualified actors (the billing-admin), never first person.

The enforcement rules — tag taxonomy, forbidden patterns, Outline conventions, selector discipline, step reuse — live in .agents/rules/gherkin-standards.md, which is the SSOT. This skill shows authors how to apply those rules; read the rule for the what.

Long-form reference — read on demand

The step-definition library layout and the pre-PR authoring checklist live in the on-demand sibling reference.md. Open a section only when the task engages it.

Cross-References

04 同仓库更多 Skills

dsj1984
dsj1984/mandrel

no-capsule-skill

Fixture without a Policy Capsule section.

Skill与智能体开发
★ 7
dsj1984
dsj1984/mandrel

qa-harness

Conventions for agent-driven QA driving — the one driving-conventions reference behind both `/qa-run` (the known-scenario sweep through a real browser) and `/qa-explore` (agent-led exploratory driving). Use when instrumenting a live surface — covers navigation-first execution, per-surface console and network capture, design-token visual checks, the `F#` finding shape, per-environment resolution, and static driving as the documented interim. The run procedures live in `.agents/workflows/qa-run.md` and `.agents/workflows/qa-explore.md`; this skill is the conventions reference they lean on.

视觉设计Skill与智能体开发
★ 7
dsj1984
dsj1984/mandrel

playwright

Robust E2E browser testing with Playwright. Use when writing browser-driven tests — leverage auto-waiting (no `waitForTimeout`), prefer user-visible locators (`getByRole`, `getByText`, `getByLabel`) over CSS/XPath, reuse `storageState` for auth, and enable trace-on-first-retry for CI debugging. Also carries the `data-testid` contract a UI change states in its acceptance criteria.

律师与法务测试与质量
★ 7
dsj1984
dsj1984/mandrel

playwright-bdd

Wires Gherkin `.feature` files to Playwright via the `playwright-bdd` library. Use when running BDD scenarios on a Playwright runtime — pairs with the `gherkin-authoring` skill (scenario prose) and the `playwright` skill (browser conventions). Drives execution by tag expression with trace-first debugging and Playwright-native sharding.

测试与质量
★ 7
dsj1984
dsj1984/mandrel

security-and-hardening

Hardens code against vulnerabilities. Use when handling user input, authentication, data storage, or external integrations. The non-negotiable security MUSTs live in `.agents/rules/security-baseline.md`; this skill shows how to apply them, with the project's surfacing and validation-response process.

★ 7
dsj1984
dsj1984/mandrel

idea-refinement

Refines ideas iteratively. Refine ideas through structured divergent and convergent thinking. Use "idea-refine" or "ideate" to trigger.

★ 7