Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/azam-sdet/10xqualitynpx agentmods add rules/azam-sdet/10xquality/script-to-bdd-converterWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/azam-sdet/10xquality/script-to-bdd-converter)<a href="https://agentmods.dev/rules/azam-sdet/10xquality/script-to-bdd-converter"><img src="https://agentmods.dev/badge/rules/azam-sdet/10xquality/script-to-bdd-converter.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00016 | $0.01529 |
| Opus 5 | $0.00008 | $0.00764 |
| Sonnet 5 | $0.00003 | $0.00306 |
| Haiku 4.5 | $0.00002 | $0.00153 |
Grade A, and why
script-to-bdd-converter scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 170 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Script-to-BDD Converter
When the user asks to convert a recorded script to Playwright + Cucumber tests, follow this protocol. The goal is to generate tests that pass on the first run by using the rich metadata captured during recording.
Conversion Workflow
Step 1: Read the Recorded Script
Read the scripts/<name>.md file. It contains:
- Steps with
(hint: ...)blocks that have locator metadata - A
## Form Fields Summarysection with all form controls and their attributes - Auth credentials, base URL, and pre-requisites
Step 2: Identify Pages (Page Object Decomposition)
Group steps by the URL they operate on. Each distinct page/URL becomes a Page Object:
| URL Pattern | Page Object |
|---|---|
/login |
LoginPage |
/dashboard |
DashboardPage |
/settings |
SettingsPage |
/users |
UsersPage |
/users/create |
CreateUserPage |
/users/:id |
UserDetailsPage |
Step 3: Generate Page Objects
For each page, create src/test/pages/<PageName>.ts:
import { Page } from '@playwright/test';
import PlaywrightWrapper from '../../helper/wrapper/PlaywrightWrappers';
import Assert from '../../helper/wrapper/assert';
export default class ExamplePage {
private static instance: ExamplePage;
private page: Page;
base: PlaywrightWrapper;
assert: Assert;
private constructor(page: Page) {
this.page = page;
this.base = PlaywrightWrapper.getInstance(page);
this.assert = Assert.getInstance(page);
}
public static getInstance(page: Page): ExamplePage {
if (!ExamplePage.instance) {
ExamplePage.instance = new ExamplePage(page);
}
return ExamplePage.instance;
}
// ... methods
}
Step 4: Build Locators from Recorded Hints
This is the most critical step. For each element interaction in the recorded script, choose the locator strategy using the hint metadata:
Decision tree for locator selection:
1. Does the hint have locators.name? → Use `input[name="..."]`
2. Does the hint have locators.id? → Use `#id`
3. Is the element a form dropdown with fieldLabel?
→ Use label-based ancestor navigation (see pattern below)
4. Does the hint have locators.dataTest and ambiguity.sameDataTest === 1?
→ Use `[data-test="..."]`
5. Is the text unique (ambiguity.sameText === 1)?
→ Use `text=...` or `button:has-text("...")`
6. Text is NOT unique (ambiguity.sameText > 1)?
→ MUST use fieldLabel + ancestor navigation to disambiguate
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 7d ago First seen · 170 lines · 16 tokens per session scan A ae6bc5d7d994
script-to-bdd-converter is a cursor rule published in the GitHub repository azam-sdet/10xquality (2 stars, last pushed 6mo ago), licensed MIT. It adds 16 tokens to every session and 1,529 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other cursor rules, from other repositories
maestro-device-selection
Maestro tests can run on either iPhone or iPad simulators based on tags in the test YAML files. This allows you to test iPad-specific UI layouts and features while maintaining a single test suite.
puppeteer
This guide provides opinionated, actionable best practices for writing robust, performant, and maintainable Puppeteer scripts for web scraping, automation, and testing. It emphasizes modern patterns like page.locator() and efficient resource management.
web-pages-e2e-test-maintenance
Keep web pages end-to-end coverage current.
local-compose-db-lifecycle-for-web-tests
Keep local compose DB lifecycle ready for web tests.
xiigen-user-journey-testing
Validate work through a realistic user path. Use for UX, tool workflows, onboarding, and generated instructions.
cypress-e2e-testing-cursorrules-prompt-file
Cursor rules for Cypress development with E2E testing.