agentleFS
willcoliveirawillcoliveira/qualiow-playwright-skills/skills/indexes/copilot-instructions.md

qualiow-playwright-skills / indexes

Copilot instructions19 starsChanged 15 days agoMITView on GitHub

Full guidance for {{PROJECT_NAME}} lives in the playwright-e2e skill at .agents/skills/playwright-e2e/SKILL.md. Read it and follow its decision tree before {{#if HAS_TEMPLATES}}planning, generating, reviewing or debugging{{else}}writing, reviewing or debugging{{/if}} tests.

  • Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.

    Of the Copilot instructions files we read, the 2,343 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repositoryOne other file it gives its agents.

The file

We split this copilot-instructions.md into the rules it gives an agent

11 rules. About 0 are common, 2 are distinctive, and 9 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 9

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use web-first assertions (await expect(locator).toBeVisible())

    line 10
  2. Distinctive:

    Use named timeout constants, not hardcoded numbers

    line 11
  3. Distinctive:

    Keep locators as readonly class properties on page objects

    line 13
  4. Very specific:

    Use short inner timeouts inside toPass blocks

    line 14
  5. Very specific:

    Use page.waitForTimeout() for synchronization

    line 21
  6. Very specific:

    Use { force: true } on actions

    line 22
  7. Very specific:

    Use networkidle in goto() or waitForLoadState()

    line 23
  8. Very specific:

    Use deprecated APIs (waitForNavigation, page.$, locator.type())

    line 24
  9. Very specific:

    Write custom retry/polling loops (use toPass() or expect.poll())

    line 25
  10. Very specific:

    Use page.evaluate() as a workaround for missing locators

    line 26
  11. Very specific:

    Use the official playwright-cli skill (install with npx playwright cli install --skills=agents){{#if HAS_PLAYWRIGHT_159}}.

    line 39

≈ “Common” is an estimate: at least 1 in 5 of the 3,779 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

Playwright E2E Instructions

Full guidance for {{PROJECT_NAME}} lives in the playwright-e2e skill at .agents/skills/playwright-e2e/SKILL.md. Read it and follow its decision tree before {{#if HAS_TEMPLATES}}planning, generating, reviewing or debugging{{else}}writing, reviewing or debugging{{/if}} tests.

MUST

  • Use web-first assertions (await expect(locator).toBeVisible())
  • Use named timeout constants, not hardcoded numbers
  • Wrap page object methods in test.step()
  • Keep locators as readonly class properties on page objects
  • Use short inner timeouts inside toPass blocks
  • Clean up test resources in afterEach
  • Tag tests with { tag: ['@smoke'] } options, not in the title
  • Give every absence assertion (toBeHidden(), toHaveCount(0)) a presence anchor — prove the same locator matched first

WON'T

  • Use XPath selectors
  • Use page.waitForTimeout() for synchronization
  • Use { force: true } on actions
  • Use networkidle in goto() or waitForLoadState()
  • Use deprecated APIs (waitForNavigation, page.$, locator.type())
  • Write custom retry/polling loops (use toPass() or expect.poll())
  • Use page.evaluate() as a workaround for missing locators

Working method

  • Explore before generate — resolve every selector against a real page, never from source
  • Below 5, emit no plan — a low confidence score means keep exploring, not caveat the proposal
  • A skeleton counts as a placeholder — TODOs and empty methods are not deliverables
  • No substitute exploration — if playwright-cli is unavailable, stop and say so
  • Stop before applying — emit the plan, wait for approval

Selector Priority

  1. getByRole() > 2. getByLabel() > 3. getByText() / getByPlaceholder() / getByAltText() > 4. getByTestId() > 5. CSS selector

Browser automation

Use the official playwright-cli skill (install with npx playwright cli install --skills=agents){{#if HAS_PLAYWRIGHT_159}}; debug failing tests with npx playwright test --debug=cli and playwright-cli attach as described in .agents/skills/playwright-e2e/references/agent-debugging.md{{/if}}.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.