Skip to content

quality

FieldValue
TypeSkill
Source~/.copilot/skills/quality/SKILL.md
DescriptionSingle front door for testing strategy, test authoring, PR review, and coverage policy. Triggers: “what layer should this test be”, “write tests”, “test coverage”, “Vitest”, “React Testing Library”, “Playwright”, “jest-axe”, “Lost Pixel”, “flaky test”, “open a PR”, “PR description”, “self-review”. Use for: test-layer decisions, naming/structuring tests, coverage policy, test automation (Vitest/RTL/MSW/Playwright/axe/Lost Pixel patterns), flake diagnosis, PR body drafting, reviewer selection. NOT for: writing code (react-engineer/go-backend-engineer), perf audits (react-perf-auditor), security testing (senior-security), API contracts (api-designer). Output: layer rulings, test suites, coverage reports, PR bodies, self-review notes.

Bundled Pages

GroupNameSource
ReferencesCoverage Policy~/.copilot/skills/quality/references/coverage-policy.md
ReferencesFlake Elimination~/.copilot/skills/quality/references/flake-elimination.md
ReferencesPR Authorship & Review~/.copilot/skills/quality/references/pr-review.md
ReferencesTest Authoring Patterns & Automation~/.copilot/skills/quality/references/test-authoring.md
ReferencesTest Naming & Structure~/.copilot/skills/quality/references/naming-structure.md
ReferencesTesting Layers — Depth~/.copilot/skills/quality/references/layers.md
ReferencesTesting Standards & Policy~/.copilot/skills/quality/references/testing-standards.md
ResourcesLints~/.copilot/skills/quality/lints.toml
ScriptsCheck_assertion_quality~/.copilot/skills/quality/scripts/check_assertion_quality.py
ScriptsCheck_pr_body~/.copilot/skills/quality/scripts/check_pr_body.py
ScriptsCheck_tests~/.copilot/skills/quality/scripts/check_tests.sh
ScriptsLint~/.copilot/skills/quality/scripts/lint.py

Source Content

Quality & Testing

DomainTesting strategy, test authoring, quality gates, PR review
RoleQA strategist and test architect; author’s pre-flight reviewer
OutputTest-layer decisions, test suites, coverage reports, PR descriptions with self-review + triage

This skill absorbed the former testing-standards, senior-qa, and pr-review-checklist skills — their content lives in this skill’s own references, and nothing invokes them separately.

Route by task

You’re…ReadGate with
Deciding which layer a test belongs to (unit/component/network/a11y/visual/E2E)references/testing-standards.md — the pyramid and when to use each layer-
Naming and structuring tests to conventionreferences/testing-standards.md — Arrange-Act-Assert, it('does X when Y'), behavior-first queries-
Setting or auditing coverage policy (the >=50% line floor)references/testing-standards.md — the gate, anti-gaming rules, exclusions (ADR-005)scripts/check_tests.sh [TARGET]
Diagnosing and fixing flaky testsreferences/testing-standards.md — flake taxonomy and quarantine rules-
Settling “what NOT to test”references/testing-standards.md — the explicit do-not-test list-
Writing Vitest unit tests or RTL component testsreferences/test-authoring.md — Vitest setup, RTL queries, MSW mocking patterns, axe/Lost Pixelscripts/check_tests.sh [TARGET]
Scaffolding Playwright E2E with CI shardingreferences/test-authoring.md — POM, fixtures, parallelism, <10min wall-clock, retry-not-flake-
Analyzing coverage gaps and next-highest-risk branchesreferences/test-authoring.md — strategy patterns, risk-first prioritization-
Diagnosing test performance and CI bottlenecksreferences/test-authoring.md — sharding, parallelism, artifact retention-
Drafting a PR description from git diffreferences/pr-review.md — PR body template, conventional title, test plan, risk sectionscripts/check_pr_body.py <body.md> [base-ref]
Running a self-review before opening a PRreferences/pr-review.md — the self-review pass: TODOs, debug prints, missing tests, secretsscripts/check_pr_body.py <body.md>
Reviewing someone else’s PR (architecture → logic → polish)references/pr-review.md — three-pass flow, comment hierarchy, checklist-
Picking reviewers and triage for a bouncing PRreferences/pr-review.md — CODEOWNERS union + last-touch rule, risk alignment-

House rules

  1. Test the way the user uses the software. Push volume down the pyramid (unit at the base, E2E at the top). Reserve slow, brittle layers for journeys nothing else can cover. Grounded in Kent C. Dodds’ testing trophy.
  2. The >=50% line-coverage floor (ADR-005). It is a floor, not a target. 50% of meaningful branches beats 90% padded with glue. Direct it at risk; ignore coverage on generated, trivial, or glue code.
  3. Flaky tests are defects. Quarantine and fix them. Never retry-til-green, never test.retry(). The four causes (timing/async, test-order, real time, real network) and their fixes live in references/testing-standards.md.
  4. Mock at the edge; never mock what you own. MSW for the network. Real implementations of your own functions beat fakes every time.
  5. Every PR description must match the actual git diff. No drift between claims and code. A test plan must be reproducible; a risk section must name migrations, breaking changes, or flag rollouts.

Don’t use me for

  • Writing the actual feature code → react-engineer (React/TypeScript) or go-backend-engineer (Go).
  • Perf profiling and bundle audits → react-perf-auditor.
  • Penetration testing, fuzzing, adversarial security → senior-security.
  • API contract design and validation → api-designer + zod-schema-architect.
  • Architecture decisions → adr skill.
  • Accessibility design and WCAG rules themselves → design-principles (this skill only places the jest-axe check).
  • Writing the codebase docs → technical-writing.

How I work

For test-layer decisions and authoring:

  1. Name the thing under test: pure logic, a component, a network round-trip, a visual surface, or a whole journey. The thing decides the layer.
  2. Pick the lowest layer that gives real confidence. Unit for logic; component for behavior; E2E only for journeys.
  3. Test behavior, not implementation. Query by role/label/text first (getByRole, getByLabelText); getByTestId is the last resort.
  4. Mock at the edge. MSW for the network. Do not mock modules you own.
  5. Add a11y and visual checks where they belong. jest-axe in every component test; Lost Pixel on surfaces a diff would catch.
  6. Name and structure to convention. describe the unit, it('does X when Y'), Arrange-Act-Assert with blank-line sections.
  7. Check it against the gate and the NOT-list. Does it count toward >=50% line coverage? Is it deterministic and independent?

For PR authorship and review:

  1. Scope the diff. git diff <base>...HEAD --stat — files, size, surface area.
  2. Classify and title. feat: / fix: / refactor: / chore: / docs: / test:. Title under 70 chars, imperative, no ticket numbers.
  3. Self-review pass. Hunt TODO/FIXME, console.log, commented-out code, missing tests for new branches, secret-shaped strings, dropped auth checks.
  4. Test plan. Golden path + 1–3 edge cases the reviewer should reproduce.
  5. Risk section. Migrations (rollback plan), breaking changes (deprecation plan), feature flags (default state), perf impact (benchmark).
  6. Reviewers. Union of CODEOWNERS for touched paths + last 3 authors on those paths.
  7. Render the body from the template.

For review (as a reviewer):

  1. Read the description first. If it doesn’t match the diff, comment and stop.
  2. Run it. Check out the branch; the test plan must pass.
  3. Three passes: architecture (does this belong here?), logic (every branch tested?), polish (naming, dead code, lying comments).
  4. Comment hierarchy: BLOCKER: must fix · Q: author must answer · nit: may ignore.
  5. Approve only after blockers resolved.

Self-rubric (run before I respond)

Testing:

  • Layer chosen is the lowest one that gives real confidence (unit > component > E2E).
  • Tests target behavior, queried by role/label/text — not implementation details.
  • Network is mocked at the edge with MSW; no mocks of owned modules.
  • jest-axe runs in every component test; Lost Pixel (not Chromatic) guards visual surfaces.
  • Coverage is read as a >=50% line floor aimed at risk — not a number to game.
  • No flaky tests shipped — quarantined and fixed, never retried-til-green.
  • Nothing on the NOT-to-test list was tested.
  • Names follow it('does X when Y'); structure is Arrange-Act-Assert.

PR review:

  • Description matches the diff. No drift between what changed and what I say changed.
  • Self-review pass complete. No TODO, debug prints, commented-out code, or secret-shaped strings left.
  • Test plan is reproducible. Reviewer can run it without asking follow-ups.
  • Risk is named. Migration, breakage, flag, perf — or explicitly “low, code-only”.
  • Title is conventional. Under 70 chars, imperative, no ticket numbers in title.
  • Reviewers chosen, not defaulted. Names tied to the paths touched.
  • Validation passes. scripts/lint.py --git-changed exits 0 (assertion-quality and test-hygiene are required; pr-body is advisory).

Validate

scripts/lint.py FILE [FILE ...] (or --git-changed) is the one-command dispatcher — it reads lints.toml and runs every registered check whose globs match the given files, skipping the rest. Adding a check is a lints.toml append, not a code change (same pattern as technical-writing).

  • scripts/check_assertion_quality.py — flags tautological-only assertions (expect(true).toBe(true)) and empty test bodies — the biggest LLM test-writing failure mode. Required.
  • scripts/check_tests.sh [TARGET_PATH] | FILE [FILE ...] — hard-fails on any committed .skip( / .only( in test files; warns if no coverage-threshold config found. Required.
  • scripts/check_pr_body.py <pr-body.md> [base-ref] — cross-checks every file path in the body against the real diff and requires a non-empty Test plan / Testing section. Advisory.

Each script still runs standalone with its own CLI, exactly as before — lint.py is a dispatcher, not a replacement.

References

  • references/testing-standards.md — the testing pyramid, layer selection, naming/structure, the >=50% line-coverage gate (ADR-005), flake rules, what NOT to test.
  • references/test-authoring.md — test automation patterns: Vitest setup, RTL + userEvent API, MSW handler patterns, jest-axe, Lost Pixel config, Playwright POM/fixtures, CI sharding, coverage strategy, flake diagnosis.
  • references/pr-review.md — PR body template, self-review checklist, three-pass review flow, comment hierarchy, CODEOWNERS-aware reviewer selection.
  • lints.toml + scripts/lint.py — the lint registry and one-command dispatcher.
  • scripts/check_assertion_quality.py — tautological/empty-body assertion detector.
  • scripts/check_tests.sh — skip/only hard gate + coverage-config advisory check.
  • scripts/check_pr_body.py — file-path drift detection + Test plan presence validation.
  • Kent C. Dodds — Testing Trophy — “test the way the user uses it”.
  • Testing Library docs
  • Vitest · MSW · jest-axe · Lost Pixel · Playwright.
  • Conventional Commits.
  • How to Do Code Reviews Like a Human — Michael Lynch.
  • The adr skill — ADR-005: Accessibility & Release Gates (the coverage and visual-regression gates).