Synthèse automatique
Guide la rédaction de spécifications BDD lisibles par le métier avec Gherkin/Cucumber, y compris fichiers .feature, scénarios, définitions d'étapes et notes d'intégration Vitest/Playwright.
Points forts
- Impose une discipline Gherkin claire avec un tableau d'usage des mots-clés et des anti-patrons.
- Couvre Scenario Outline, Background, Rule, tags et définitions d'étapes.
- Fournit des conseils pour refactoriser des fichiers .feature impératifs ou couplés à l'UI.
- Inclut des références dédiées à l'intégration et à l'installation avec Vitest et Playwright.
Limites
- Le corps présenté reste synthétique ; les détails d'implémentation dépendent de fichiers de référence séparés non inclus ici.
- Se concentre sur BDD/Gherkin et exclut explicitement les tests unitaires sans contrat métier, les tests de performance/charge et les questions génériques de framework.
- Suppose une collaboration de type Three Amigos et un réel bénéfice métier, ce qui peut être trop coûteux pour des équipes ou des cas simples.
À utiliser pour transformer des critères d'acceptation en spécifications exécutables en langage naturel avec Gherkin/Cucumber, ou pour refactoriser des fichiers .feature et leurs définitions d'étapes.
Ne pas utiliser pour des tests unitaires sans public métier, des tests de performance/charge, ou des questions génériques sur les frameworks de test sans lien avec des spécifications de comportement.
Analyse de sécurité
SûrThe file is pure documentation/instruction content about writing Gherkin feature files and step definitions. It declares no tools and contains no commands, scripts, network calls, file writes, or obfuscated payloads. There are no instructions attempting to alter the auditor's role or exfiltrate data, so listing it presents no meaningful execution risk.
Aucun point d'attention détecté
Comment cette analyse est faiteExemples
Turn these guest checkout acceptance criteria into a Gherkin feature file with a Scenario Outline for regional tax, and propose the matching step definitions.Refactor this .feature file so it describes business behavior instead of UI clicks, and explain which steps should become step definitions.Help me wire up BDD with Playwright and Cucumber, including the config and a minimal .feature file with step definitions.name: bdd description: Write disciplined Behavior-Driven Development specs and tests with Gherkin / Cucumber. Use whenever the user mentions BDD, Gherkin, Cucumber, .feature files, Given/When/Then, scenarios, Scenario Outline, Background, step definitions, acceptance criteria, executable specifications, living documentation, the Three Amigos, or Example Mapping. Also trigger when the user asks to "write tests in plain English", convert acceptance criteria into tests, design step definitions, refactor an imperative or UI-coupled feature file, or wire up BDD with Vitest (unit/component) or Playwright (end-to-end). Do NOT use for pure unit tests with no business-readable contract, pure performance/load tests, or generic test-framework questions unrelated to behavior specs.
Behavior-Driven Development (BDD)
Produces feature files that read like behavior, step definitions that don't leak implementation, and an honest call on when BDD pays for itself. The body is tool-agnostic — load the relevant reference for Vitest or Playwright.
When to use this skill
- The user names a BDD concept: BDD, Gherkin, Cucumber,
.feature, Given/When/Then, Scenario Outline, Background, Rule, step definitions, executable specifications, living documentation, Three Amigos, Example Mapping. - The user wants to turn acceptance criteria into tests, write tests in plain English, or refactor a
.featurefile. - Vitest + BDD → also load
references/vitest.md. Playwright + BDD → also loadreferences/playwright.md. - Setting up either from zero → load
references/install-vitest.mdorreferences/install-playwright.md.
Skip for: unit tests with no business audience, performance/load tests, internal refactors, or generic test-framework questions.
Gherkin cheat sheet
@checkout # tag (selection + tagged hooks)
Feature: Guest checkout
As a visitor # free-form preamble (not executable)
...
Background: # Given steps run before every Scenario in this file
Given the storefront is online
Rule: Tax is applied per region # Gherkin 6 — groups scenarios by business rule
@smoke
Scenario Outline: Tax for <region>
When Patty adds a "Bluetooth Speaker" to her cart
And she checks out shipping to "<region>"
Then the displayed tax rate is "<rate>"
Examples:
| region | rate |
| California, US | 8.5% |
| Berlin, DE | 19% |
| Keyword | Use for | Don't use for |
|----------------------------------|----------------------------------------------------------------------------|--------------------------------------------------------------|
| Rule: (Gherkin 6+) | Group scenarios that illustrate one business rule. | A feature with only one rule. |
| Background: | Given steps shared by every scenario in the file/Rule. | Anything containing a When. |
| Scenario: / Example: | One behavior. Example: preferred in Gherkin 6+. | Multiple outcomes glued by And. |
| Scenario Outline: + Examples:| Same steps, varied by business-meaningful data with domain-named columns. | Exhaustive boundary testing; rows with technical column names like pw/result. |
| Given / When / Then | Context / action / observable outcome. | More than one When per scenario. |
| @tag | Selective execution, tagged hooks. | Control flow / if on tags inside steps. |
The three rules that move output quality
These are the patterns that distinguish disciplined BDD from "Gherkin-shaped" output. Each is what the model gets wrong by default if you don't insist.
1. Declarative + third-person voice
Steps describe what the system does, not how the user clicks. Voice is third-person/persona (she, Patty, a shopper) — never first-person I. Litmus test: would this wording change if the implementation changed? If yes, rewrite.
# ❌ Wrong — imperative, UI-coupled, first-person; breaks on a CSS rename
Scenario: User registers
Given I navigate to "/signup"
When I enter "jane@acme.com" in the "#email" field
And I click the "Create account" button
Then the URL should be "/welcome"
# ✅ Right — declarative, third-person, survives UI rewrite
Scenario: A new visitor completes registration
Given Jane is a new visitor
When she registers with a valid email and password
Then she is signed in
2. One behavior per scenario; Rule: to group
Multiple Whens usually mean two scenarios pretending to be one. Split them; use Rule: to make the policy structure explicit. The first-line test: if you'd write a scenario title containing "and", split it.
# ❌ Wrong — three orthogonal outcomes; one failure can't tell you which rule broke
Scenario: Checkout
Given Patty has a cart with a $40 item
When she applies the coupon "SAVE10"
And she pays with her saved Visa
Then the order total is $36
And a confirmation email is sent
And the inventory count drops by 1
# ✅ Right — each rule gets its own scenario under a Rule: block
Rule: Coupons apply before payment
Example: A valid coupon reduces the order total
Given Patty has a cart with a $40 item
When she applies the coupon "SAVE10"
Then her order total is $36
Rule: Successful checkout notifies customer and warehouse
Example: Confirmation email is sent on successful payment
Given Patty has a paid order
Then she receives a confirmation email
3. Scenario Outline columns are domain-named, not technical
Use Outline when the steps are identical and each row is a business-meaningful variation. Column headers are domain concepts (missing requirement, region), not literal values dressed up (pw, result). When the table starts looking like fuzz-test input, push it to a unit test.
# ❌ Wrong — Outline as unit-test substitute; columns are technical
Scenario Outline: Password validation
When I submit the password "<pw>"
Then the result is "<result>"
Examples:
| pw | result |
| a | invalid |
| Aaaaaaa1! | valid |
| ...20 rows | ... |
# ✅ Right — domain-named column; exhaustive cases go to a unit test
Rule: Passwords must satisfy the corporate strength policy
Scenario Outline: Sign-up rejects a password that is <missing requirement>
Given Jane is signing up
When she submits a password that is <missing requirement>
Then sign-up is rejected with a message about <missing requirement>
Examples: Strength policy violations
| missing requirement |
| too short |
| missing an uppercase |
| missing a digit |
| missing a symbol |
Output contract
When generating BDD code:
- Feature files: declarative, domain-language, third-person voice. No CSS selectors, no URLs, no UI verbs.
- One behavior per scenario.
Rule:to group;Example:preferred overScenario:in Gherkin 6+. Scenario Outlinecolumns are domain-named. Nopw/result-style technical columns.- State lives in the World / context / fixtures (per scenario), never module globals or file-level
let. - Assertions only in
Then. Setup inGiven; the single state change inWhen. - Tags for selection (
@smoke,@regression,@wip), not for control flow. - No external data files (CSV/Excel). Examples live in the feature file.
Reference quick map
| Task | Read |
|---------------------------------------------------------------|-----------------------------------|
| BDD/Gherkin principles, refactoring scenarios | this SKILL.md |
| Install Vitest BDD in a project from zero | references/install-vitest.md |
| Vitest + Gherkin (@amiceli/vitest-cucumber) — writing tests | references/vitest.md |
| Install Playwright BDD in a project from zero | references/install-playwright.md |
| Playwright + Gherkin (playwright-bdd) — writing tests | references/playwright.md |
If the user names a different runner (Cucumber-JVM, Cucumber.js, behave, SpecFlow), the principles in this file still apply — only the binding API differs. Translate the patterns rather than refusing.
Du fichier au premier essai
Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.
Consulter la source et ses fichiers annexesCe téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.
1. Télécharger le fichier
Télécharger SKILL.mdDepuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/bdd-specs-with-gherkin-cucumber-mvj1obwi/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.
Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.
mkdir -p '.skill-downloads/bdd-specs-with-gherkin-cucumber-mvj1obwi' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/bdd-specs-with-gherkin-cucumber-mvj1obwi/download' --output '.skill-downloads/bdd-specs-with-gherkin-cucumber-mvj1obwi/SKILL.md.part' && mv '.skill-downloads/bdd-specs-with-gherkin-cucumber-mvj1obwi/SKILL.md.part' '.skill-downloads/bdd-specs-with-gherkin-cucumber-mvj1obwi/SKILL.md'2. Vérifier les prérequis
Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.
Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.
Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.
3. Charger la skill
Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.
Claude Code
test -f '.skill-downloads/bdd-specs-with-gherkin-cucumber-mvj1obwi/SKILL.md' && test -s '.skill-downloads/bdd-specs-with-gherkin-cucumber-mvj1obwi/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/bdd' && cp -R '.skill-downloads/bdd-specs-with-gherkin-cucumber-mvj1obwi' '.claude/skills/bdd'Cursor
test -f '.skill-downloads/bdd-specs-with-gherkin-cucumber-mvj1obwi/SKILL.md' && test -s '.skill-downloads/bdd-specs-with-gherkin-cucumber-mvj1obwi/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/bdd' && cp -R '.skill-downloads/bdd-specs-with-gherkin-cucumber-mvj1obwi' '.cursor/skills/bdd'Codex
test -f '.skill-downloads/bdd-specs-with-gherkin-cucumber-mvj1obwi/SKILL.md' && test -s '.skill-downloads/bdd-specs-with-gherkin-cucumber-mvj1obwi/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/bdd' && cp -R '.skill-downloads/bdd-specs-with-gherkin-cucumber-mvj1obwi' '.agents/skills/bdd'OpenSkills
OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.
Installation officielle d’OpenSkillsopenskills install './.skill-downloads/bdd-specs-with-gherkin-cucumber-mvj1obwi'openskills read 'bdd-specs-with-gherkin-cucumber-mvj1obwi'La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.
Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.
openskills syncMode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.
4. Faire un premier essai
Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :
Lis .skill-downloads/bdd-specs-with-gherkin-cucumber-mvj1obwi/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.
Comparaison de performances ClickHouse
Testing
Évaluez les résultats de tests de performance ClickHouse, analysez les régressions de PR, comparez avec l'historique et vérifiez la fiabilité des mesures.
Analyse des rapports de performance CI
Testing
Analyse les rapports de comparaison de performance CI pour une PR ClickHouse. Recoupe l'historique master pour distinguer les vraies régressions des tests instables.
Méthode Santa
Testing
Vérification adversarial multi-agents avec deux réviseurs indépendants. La sortie est vérifiée deux fois et corrigée itérativement jusqu'à ce que les deux acceptent avant publication.