test-code-conventions
Pure-reference catalog of test-code conventions: AAA structure (Arrange / Act / Assert), per-test single-responsibility, descriptive naming (`{sut}_{scenario}_{expected}`), assertion specificity, mocking rationale (state vs behavior, fake vs mock), fixture-coupling rules, the magic-number / hard-coded-string anti-patterns, and step design (§11: FIRST principles, step granularity, the mechanical → page → business abstraction layers, the rule-of-three extraction heuristic, declarative phrasing); the E2E selector-priority, web-first-assertion, and step-grouping conventions live in references/. Use as the shared rule book a test-code review cites back to, or as onboarding for what makes a test code-reviewable; to score a test's quality on weighted axes use test-design-scorecard, and for setup/teardown isolation specifically use test-isolation-patterns.
Install test-code-conventions
npx skills add testland/qa --skill test-code-conventions -a claude-codeInstalls into .claude/skills/ in your project. Add -g to install it for all your projects, in ~/.claude/skills/.
SKILL.md
Shown as published, under the repository's MIT license.
---
name: test-code-conventions
description: "Pure-reference catalog of test-code conventions: AAA structure (Arrange / Act / Assert), per-test single-responsibility, descriptive naming (`{sut}_{scenario}_{expected}`), assertion specificity, mocking rationale (state vs behavior, fake vs mock), fixture-coupling rules, the magic-number / hard-coded-string anti-patterns, and step design (§11: FIRST principles, step granularity, the mechanical → page → business abstraction layers, the rule-of-three extraction heuristic, declarative phrasing); the E2E selector-priority, web-first-assertion, and step-grouping conventions live in references/. Use as the shared rule book a test-code review cites back to, or as onboarding for what makes a test code-reviewable; to score a test's quality on weighted axes use test-design-scorecard, and for setup/teardown isolation specifically use test-isolation-patterns."
---# test-code-conventions
## Overview
This skill is a **pure reference** - no actions, no workflows. It
catalogs the test-code conventions a test-code review enforces.
When a review flags an issue, this reference gives the reviewer
the underlying rule.
## When to use
- A new team member is onboarding to the codebase and needs to
understand "what we mean by a good test."
- A review flagged an issue and the reviewer
needs the underlying rule's rationale.
- The team is authoring its own per-team test conventions document
and wants a starting point.
## How to use
1. **Scope to test files.** Apply these conventions to `*.spec.*` /
`*.test.*` / `tests/**` only; production code is out of scope.
2. **Read the Act lines first** (§1). One scan of the single Act per test
tells you what each test exercises before you read the body.
3. **Check one logical assertion target** (§2) and a self-documenting
name (§3) - hide the body and see whether the name still explains it.
4. **Judge the assertions and doubles** (§4 assertion specificity,
§5 mocking) - loose matchers and behaviour-verification are the common misses.
5. **Trace fixture scope and magic literals** (§6, §7): the smallest scope
that holds, and named values across the cause-effect chain.
6. **Flag slow setup** (§10); for E2E tests, apply the selector-priority
and web-first rules in §8 / §9.
7. **Cite the section when flagging.** Name the rule (`§4`) and spend the
words on the specific edit, not on restating the rule.
## §1 - AAA structure
The canonical test shape - **Arrange, Act, Assert** - splits each
test into three phases:
```typescript
test('addItem increases cart count', () => {
// Arrange
const cart = new Cart();
// Act
cart.addItem({ sku: 'BOOK-001', qty: 1 });
// Assert
expect(cart.itemCount).toBe(1);
});
```
The phases are visually separated (blank line; comment; or
`// arrange / act / assert` headers). The benefits:
- Reviewer can scan a 50-test file by reading only the Act lines -
knows what each test actually exercises.
- Failure debugging is faster: the failed assertion points to the
specific Assert; the Arrange and Act are isolated.
**Each test has exactly one Act**. Two Acts = two tests. Splitting
on multiple Acts is the canonical refactor when a single test grows
too long.
## §2 - Single-responsibility per test
A test that asserts `cart.count === 1 AND cart.totalPrice === 10
AND cart.lastUpdated > now()` is three tests in disguise. When one
assertion fails, the test stops; the other two failures are
masked.
The rule: **one logical assertion per test**. "Logical" means
related to the same observable property - multiple `expect` calls
that all verify "the cart has one item" (count = 1, items.length = 1,
contents[0].sku = '...') are one logical assertion.
Splitting:
```typescript
// Bad - three logical assertions
test('addItem updates cart', () => {
cart.addItem(...);
expect(cart.itemCount).toBe(1); // assertion 1
expect(cart.totalPrice).toBe(10); // assertion 2 (different property)
expect(cart.lastUpdated).toBeGreaterThan(t0); // assertion 3 (different property)
});
// Good - three tests, each assertion isolated
test('addItem increments count', () => { /* ... */ });
test('addItem updates totalPrice', () => { /* ... */ });
test('addItem updates lastUpdated', () => { /* ... */ });
```
## §3 - Naming patterns
Two well-established conventions:
### A - `<system_under_test>_<scenario>_<expected>` (Roy Osherove)
```typescript
test('addItem_validQty_incrementsCount', () => { /* ... */ });
test('addItem_zeroQty_throwsValidationError', () => { /* ... */ });
test('addItem_negativeQty_throwsValidationError', () => { /* ... */ });
```
The triple makes the test self-documenting; no need to read the body
to understand what's verified.
### B - Nested describe + it
```typescript
describe('Cart', () => {
describe('addItem', () => {
describe('with valid qty', () => {
it('increments count', () => { /* ... */ });
});
describe('with zero qty', () => {
it('throws ValidationError', () => { /* ... */ });
});
});
});
```
Both are valid; the team picks one and stays consistent. Mixing the
two in one suite is the smell.
**Avoid**: `test('it works')`, `test('test 1')`,
`test('addItem 1')`, `test('addItem 2')`. Generic names are zero
debugging help when the failure surfaces.
## §4 - Assertion specificity
Assertions should narrow the verification window to exactly what's
being asserted. Vague matchers hide regressions:
| Vague | Specific | Why specific is better |
|------------------------------------------|---------------------------------------------|------------------------|
| `expect(x).toBeTruthy()` | `expect(x).toEqual({ id: 1, name: 'foo' })` | "truthy" passes for `1`, `'a'`, `{}`, `[]` - many bug shapes pass. |
| `expect(arr).toBeDefined()` | `expect(arr).toEqual(['BOOK-001'])` | "defined" passes for `[]`, `null`-prototype, … |
| `expect(err).toBeInstanceOf(Error)` | `expect(err.code).toBe('VALIDATION_ERROR')` | Catches "right type, wrong reason" regressions. |
| `expect(response.status).toBeGreaterThan(199)` | `expect(response.status).toBe(201)` | 200, 204, 299 also pass - masks status-code regressions. |
| `expect(html).toContain('error')` | `expect(html).toMatch(/<div class="error">.*Invalid/)` | "error" matches "no errors" too. |
The general principle: the assertion should fail on **any change to
the SUT's behavior** that isn't intentional. If the assertion
passes for behaviors that shouldn't, it's too loose.
## §5 - Mocking
The full taxonomy per [mocks-stubs][ms]:
[ms]: https://martinfowler.com/articles/mocksArentStubs.html
> "Dummy objects: passed around but never actually used. Usually
> they are just used to fill parameter lists." ([mocks-stubs][ms])
>
> "Fake objects: actually have working implementations, but usually
> take some shortcut which makes them not suitable for production."
> ([mocks-stubs][ms])
>
> "Stubs: provide canned answers to calls made during the test,
> usually not responding at all to anything outside what's
> programmed in." ([mocks-stubs][ms])
>
> "Spies: stubs that also record some information based on how they
> were called." ([mocks-stubs][ms])
>
> "Mocks: objects pre-programmed with expectations which form a
> specification of the calls they are expected to receive."
> ([mocks-stubs][ms])
Per [mocks-stubs][ms]: "Only mocks insist upon behavior
verification. The other doubles can, and usually do, use state
verification."
Convention rules:
1. **Prefer state verification over behavior verification.** Assert
on the SUT's resulting state, not on which methods were called
on a collaborator. Behavior verification couples the test to the
implementation; refactors break tests that should pass.
2. **Don't mock what you don't own.** Mocking third-party libraries
makes tests pass against a fictional API; when the library
updates, the mock drifts undetected. Prefer adapter patterns +
contract tests against the real boundary.
3. **Prefer fakes over mocks for state-bearing collaborators.** A
fake DB / fake clock / fake feature-flag service is reusable
across tests; mocks are bespoke per test.
## §6 - Fixture coupling
Tests that share fixtures (parameters, builders, factory functions)
should be coupled at the smallest scope:
| Scope | When to use |
|------------------------|--------------------------------------------------------------------|
| Inline (per test) | Default. The test owns the data; reviewer sees what's being tested. |
| `describe`-block | Multiple tests verify the same scenario differently. |
| File-level (`beforeEach`) | Shared setup with no per-test variation. |
| Cross-file factory | Shared *shapes*, not shared *instances*. Use builders / factories. |
Anti-pattern: a giant `globalFixtures.ts` that every test imports.
Tests now break in unrelated ways when the global is touched; the
test no longer "owns" what it verifies.
## §7 - Magic numbers and strings
Test code is more tolerant of magic numbers than production code -
the test's job is often to assert against specific values. But
**meaningful magic** matters:
```typescript
// Bad - unexplained value
expect(cart.totalPrice).toBe(43.21); // why 43.21?
// Also bad - expectation recomputes the formula under test, so it agrees
// with the implementation even when the implementation is wrong
const EXPECTED_TOTAL = PRICE_PER_BOOK * QTY * (1 + EXPECTED_TAX_RATE);
expect(cart.totalPrice).toBeCloseTo(EXPECTED_TOTAL, 2);
// Better - inputs named, expected value stated independently
const PRICE_PER_BOOK = 10.99;
const QTY = 4;
const TAX_RATE = 0.0825;
expect(cart.totalPrice).toBeCloseTo(47.59, 2); // 4 x 10.99, +8.25% tax
```
Name the **inputs**; never derive the **expected value** from the
expression under test. The named inputs document where the number came
from, and the literal expectation is what makes the assertion
independent of the code it is checking.
## §8 - E2E selectors
Prefer user-facing, accessibility-first locators over DOM-structure
selectors. Per [tl-queries][tl] the query priority is `getByRole` →
`getByLabelText` → text / placeholder → `getByTestId` (last resort), and
per [pw-best-practices][pwb] CSS-class and XPath selectors are brittle
because the DOM changes freely. The full priority table, the per-framework
mappings (Playwright / Cypress / Selenium), and the CSS/XPath rationale are
in [references/e2e-selector-and-assertion-conventions.md](references/e2e-selector-and-assertion-conventions.md).
## §9 - Web-first assertions (E2E)
Prefer auto-waiting web-first assertions
(`await expect(locator).toBeVisible()`) over synchronous `.isVisible()`
checks that race the render, per [pw-best-practices][pwb]. The before /
after example is in [references/e2e-selector-and-assertion-conventions.md](references/e2e-selector-and-assertion-conventions.md).
## §10 - Slow setup is a smell
A test that takes >1s in setup (creating fixtures, seeding DB,
warming caches) has a coupling problem. The remedies:
- Move fixture creation to a per-suite `beforeAll` if shared.
- Use a template-DB snapshot/restore pattern for DB tests instead of
`db:reset`.
- Move the unit test to an integration layer if it really needs the
full stack - don't run integration tests under the unit-test
budget.
The whole-suite cost of slow setup compounds: 10 tests × 2s =
+20s per CI run × 50 PRs/day = 1000s/day burned.
## §11 - Step design (architecture tier)
Within an "Act" phase, *what is one step?* The architecture-tier
rules for step granularity, layering, and phrasing:
### FIRST principles
Per [Robert C. Martin - *Clean Code* (2008), ch. 9 "Unit Tests"](https://www.oreilly.com/library/view/clean-code-a/9780136083238/):
**F**ast (slow tests don't get run), **I**ndependent (each test sets
up its own world - per [Fowler on non-determinism](https://martinfowler.com/articles/nonDeterminism.html),
the prerequisite to parallel execution), **R**epeatable (any
environment), **S**elf-validating (no human reads logs to determine
the outcome), **T**imely (written close to the production code).
A step that violates FIRST is the smell; the rules below are the fix.
### Step granularity
A "step" is the minimal unit a reader can name in business terms -
one *meaningful operation*, not one click. Each step does exactly
one of Arrange / Act / Assert / Annotate; steps that mix two are
split (`await page.click('#submit'); expect(toast).toBeVisible();`
is an Act and an Assert). Aim for **3-8 steps per test body**; >15
signals the test does too much or sits at the wrong abstraction.
### Abstraction layers
Three layers, named consistently: **business** (`customer.signsIn()`,
`checkout.placesOrder()`) → **page / component** (Page Objects,
Tasks: `LoginPage.submit({...})`) → **mechanical** (`page.click()`,
`page.fill()`). **The test body lives at the business layer** - a
body full of mechanical clicks reads as a script, not a
specification. Exceptions that legitimately stay mechanical: a11y
keyboard-order tests, visual regression, selector-resilience tests -
tag them (`@a11y`, `@visual`) so reviewers don't refactor them.
### Extraction: the rule of three
Per [Fowler - *Refactoring* (2nd ed. 2018)](https://martinfowler.com/books/refactoring.html):
inline at first occurrence, note at the second, extract at the
third. Always extract a step that is 5+ mechanical lines, appears in
3+ tests, or needs an explanatory comment (the comment is the smell
that the abstraction is missing). Don't pre-extract on the first
test (YAGNI), and never hide Act + Arrange in one helper
(`setupAndDoThing()`).
### Phrasing and naming
Prefer declarative ("the customer signs in") over imperative
("enters email, clicks submit") - the test: *would the wording
change if the implementation changed?* If yes, rewrite (per
[Cucumber - Better Gherkin](https://cucumber.io/docs/bdd/better-gherkin/),
which applies beyond Gherkin). Step naming follows the same
discipline as §3 test naming (per
[Osherove - *The Art of Unit Testing*](https://www.artofunittesting.com/)):
read the body aloud - it should sound like a specification, not
"click, type, click, expect-truthy".
The AAA / Given-When-Then vocabulary mapping, the phase-separation
rule, and the full declarative-vs-imperative tables with
when-imperative-is-correct cases are in
[references/step-grouping-and-phrasing.md](references/step-grouping-and-phrasing.md).
Where extracted steps live (Page Object / Screenplay / App Actions)
is `object-model-patterns`; fixture lifecycle is
`test-isolation-patterns`.
## Worked example - reviewing one test file
**The file under review (`checkout.spec.ts`):**
```typescript
let cart; // file-level, reused across tests
beforeAll(() => { cart = buildCart(); });
test('checkout 1', async () => {
cart.addItem({ sku: 'BOOK-001', qty: 2 });
const res = await checkout(cart);
expect(res).toBeTruthy();
expect(cart.total).toBe(43.21);
});
```
**Walking the conventions:**
| Convention | Finding | Fix |
|---|---|---|
| §1 AAA | Phases not separated; two logical Acts (`addItem`, `checkout`). | Blank-line the phases; split the two Acts into two tests. |
| §2 Single-responsibility | Asserts the checkout result *and* the cart total - two targets. | One assertion target per test. |
| §3 Naming | `checkout 1` names nothing. | `checkout_validCart_confirmsOrder`. |
| §4 Assertion specificity | `expect(res).toBeTruthy()` passes for `1`, `{}`, `[]`. | `expect(res.status).toBe('confirmed')`. |
| §6 Fixture coupling | `cart` is a file-level `beforeAll` fixture the test mutates. | Rebuild per test in `beforeEach` (inline ownership). |
| §7 Magic literals | `43.21` has no visible derivation. | Derive from named `PRICE`, `QTY`, `TAX_RATE`. |
**After the fixes:**
```typescript
const PRICE = 19.99, QTY = 2, TAX_RATE = 0.0825;
let cart;
beforeEach(() => { cart = buildCart(); });
test('checkout_validCart_confirmsOrder', async () => {
// Arrange
cart.addItem({ sku: 'BOOK-001', qty: QTY });
// Act
const res = await checkout(cart);
// Assert
expect(res.status).toBe('confirmed');
});
test('addItem_appliesTaxedTotal', () => {
// Arrange
cart.addItem({ sku: 'BOOK-001', qty: QTY });
// Assert
expect(cart.total).toBeCloseTo(PRICE * QTY * (1 + TAX_RATE), 2);
});
```
Each test now has one Act, one assertion target, a self-documenting name,
a specific matcher, an inline-owned fixture, and a derived expected value.
For the E2E selector and web-first conventions applied to a `*.e2e.ts`
file, see [references/e2e-selector-and-assertion-conventions.md](references/e2e-selector-and-assertion-conventions.md).
## References
- [mocks-stubs][ms] - Martin Fowler on the test-double taxonomy:
dummies, fakes, stubs, spies, mocks; state vs behavior
verification; classical (Detroit) vs mockist (London) styles.
- [tl-queries][tl] - Testing Library query priority: role-based
→ label → placeholder/text → testId. The "as users find them"
principle; testid is the last resort.
- [pw-best-practices][pwb] - Playwright best practices: user-facing
locators, web-first assertions, "automated tests should verify
that the application code works for the end users."
- E2E selector priority + web-first assertions (§8 / §9), with these
citations, in
[references/e2e-selector-and-assertion-conventions.md](references/e2e-selector-and-assertion-conventions.md).
- Step grouping (AAA / Given-When-Then mapping) + declarative
phrasing (§11) in
[references/step-grouping-and-phrasing.md](references/step-grouping-and-phrasing.md).
- §11 canonical sources: Martin - *Clean Code* ch. 9 (FIRST,
ISBN 978-0132350884); Fowler - *Refactoring* 2nd ed. (rule of
three); Osherove - *The Art of Unit Testing* (naming); Meszaros -
*xUnit Test Patterns* (ISBN 978-0131495050); Cucumber - *Better
Gherkin* (declarative phrasing); ISTQB glossary - [test step](https://glossary.istqb.org/en_US/term/test-step) /
[test procedure](https://glossary.istqb.org/en_US/term/test-procedure).
[tl]: https://testing-library.com/docs/queries/about/
[pwb]: https://playwright.dev/docs/best-practices0 errors · 1 warning · 0 tips · 57 checks passed
SKILL.md body: 416 lines, about 4,374 tokens · description: 860 characters · 24 files in the folder
- SpecificationA
Fields and format the Agent Skills specification requires
15 of 15 passed - DescriptionA
Whether an agent can tell when to use the skill
5 of 6 passed - Structure and contentA
How the body and the bundled files are laid out
16 of 16 passed - SecurityA
Secrets, hidden instructions, shell commands and side effects
21 of 21 passed
All checks
No "Use when" in the descriptionwarning
Agents match requests against this one line.
Fix: End with Use when and the words people type. Name the requests or situations that should load the skill.
SKILL.md line 3
Rule: Description says when to use the skill →Starts with a frontmatter blockspecification
SKILL.md has to open with a
Rule: Starts with a frontmatter block →---block that holds at leastnameanddescription.Frontmatter is valid YAMLspecification
The text between the
Rule: Frontmatter is valid YAML →---lines has to parse as a YAML map.No byte order mark before the frontmatterspecification
Finds the invisible UTF-8 byte order mark (U+FEFF) that some Windows editors put at the start of a file.
Rule: No byte order mark before the frontmatter →Has a namespecification
The spec requires a
Rule: Has a name →namefield.Name uses lowercase letters, digits and hyphensspecification
1 to 64 characters of
Rule: Name uses lowercase letters, digits and hyphens →a-z,0-9and-, not starting or ending with a hyphen, with no double hyphens.Name avoids the words anthropic and claudespecification
The name must not contain
Rule: Name avoids the words anthropic and claude →anthropicorclaude.Name matches its folderspecification
The
Rule: Name matches its folder →namemust equal the name of the folder that holds SKILL.md.Has a descriptionspecification
The spec requires a non-empty
Rule: Has a description →description.Description fits in 1,024 charactersspecification
The spec caps
Rule: Description fits in 1,024 characters →descriptionat 1,024 characters.No angle brackets in name or descriptionspecification
Rule: No angle brackets in name or description →nameanddescriptionmust not contain<or>, so no XML-style tags such as<example>either.Compatibility note fits in 500 charactersspecification
When
Rule: Compatibility note fits in 500 characters →compatibilityis set it must be 1 to 500 characters.Frontmatter sticks to the spec's fieldsspecification
Fields other than
Rule: Frontmatter sticks to the spec's fields →name,description,license,compatibility,metadataandallowed-tools.metadata maps keys to plain valuesspecification
Rule: metadata maps keys to plain values →metadatamust be a map whose values are strings, not lists or nested maps.Frontmatter keys are plain textspecification
Finds unquoted keys such as
Rule: Frontmatter keys are plain text →true:,no:,123:or2026-01-01:in the frontmatter, including keys undermetadata.Uses paths, not the legacy globs fieldspecification
The frontmatter sets
Rule: Uses paths, not the legacy globs field →globs, which Cursor keeps only for older skills.Description is written in the third persondescription
Avoid openers like
Rule: Description is written in the third person →You are,I help,I canorYou can.Description names the tool and the resultdescription
Flags short descriptions with no trigger that lean on vague verbs (
Rule: Description names the tool and the result →helps with,handles,manages), and descriptions that repeat the name.Description is long enough to matchdescription
Descriptions under 60 characters rarely carry both the job and the trigger.
Rule: Description is long enough to match →Description and when_to_use fit in 1,536 charactersdescription
Claude Code cuts the combined
Rule: Description and when_to_use fit in 1,536 characters →descriptionandwhen_to_usetext at 1,536 characters.Description says when to use it earlydescription
The first trigger phrase, such as
Rule: Description says when to use it early →Use when, starts after character 400.Body has instructionsstructure and content
The Markdown after the frontmatter should hold the instructions the agent follows, not be empty or a stray word.
Rule: Body has instructions →SKILL.md stays under 500 linesstructure and content
The spec and Anthropic both recommend keeping SKILL.md under 500 lines.
Rule: SKILL.md stays under 500 lines →Body stays under about 5,000 tokensstructure and content
The spec recommends keeping the loaded instructions under 5,000 tokens.
Rule: Body stays under about 5,000 tokens →Long skills keep detail in reference filesstructure and content
A body over 250 lines that never points to a bundled file, by link or by path.
Rule: Long skills keep detail in reference files →Body gives numbered stepsstructure and content
No numbered list and no
Rule: Body gives numbered steps →Stepheadings.Body shows an examplestructure and content
No code block and no heading named Example.
Rule: Body shows an example →Paths use forward slashesstructure and content
Finds backslash paths such as
Rule: Paths use forward slashes →scripts\helper.py.No wording that goes out of datestructure and content
Finds dated phrases like
Rule: No wording that goes out of date →as of 2025,before March 2026orcoming soon.Every linked file existsstructure and content
A relative link in SKILL.md points to a file that is not in the skill's folder.
Rule: Every linked file exists →Reference files are linked from SKILL.mdstructure and content
A file linked from SKILL.md links on to further bundled files that SKILL.md does not link.
Rule: Reference files are linked from SKILL.md →Long reference files start with a contents liststructure and content
A bundled Markdown reference file over 100 lines with no contents list near the top. Files under
Rule: Long reference files start with a contents list →assets/ortemplates/, templates and test data are skipped.Explains rules instead of shouting themstructure and content
Five or more all-caps
Rule: Explains rules instead of shouting them →MUST,NEVERorALWAYSin the body.Bundled files have descriptive namesstructure and content
Files named like
Rule: Bundled files have descriptive names →doc2.md,file1.mdornotes3.txt.No READMEs or changelogs inside the skillstructure and content
A
Rule: No READMEs or changelogs inside the skill →README.md,CHANGELOG.md,INSTALLATION_GUIDE.mdorQUICK_REFERENCE.mdat the root of the skill folder.Scripts never wait for typed inputstructure and content
A bundled script calls
Rule: Scripts never wait for typed input →input(),getpass(),read -p,Read-Hostor a prompt library such as inquirer. Files named as templates are skipped, since a person runs the copy.Placeholders work in every agentstructure and content
Finds
Rule: Placeholders work in every agent →$ARGUMENTS,${CLAUDE_SKILL_DIR}and${CLAUDE_PROJECT_DIR}in SKILL.md.No real secretssecurity
Finds API keys, tokens, private keys and literal passwords in SKILL.md and its bundled files. Files under
Rule: No real secrets →evals/,fixtures/,__fixtures__/or test data folders are checked by the test data rule instead.Test data uses obvious placeholderssecurity
Finds secret-looking values in
Rule: Test data uses obvious placeholders →evals/,fixtures/,__fixtures__/and test data folders. These are usually fakes, so they cost a warning; the same value anywhere else fails the secrets rule.No piping downloads into a shellsecurity
Finds
Rule: No piping downloads into a shell →curl ... | sh,wget ... | bash,curl ... | python,bash <(curl ...),curl ... | source,source <(curl ...)andiwr ... | iex.Commands that run before loading are reviewedsecurity
Finds
Rule: Commands that run before loading are reviewed →!command blocks that Claude Code runs before the skill reaches the model.allowed-tools stays narrowsecurity
Rule: allowed-tools stays narrow →allowed-toolspre-approves unrestrictedBash(orShell) or every tool.Skills with side effects wait to be askedsecurity
The name or description is about deploying, publishing, sending or deleting, and automatic invocation is not turned off.
Rule: Skills with side effects wait to be asked →No hidden characterssecurity
Finds Unicode tag characters and bidirectional controls in SKILL.md and the bundled files, and runs of two or more zero-width characters on one line of a Markdown, text or YAML file.
Rule: No hidden characters →Frontmatter has no code-running YAML tagssecurity
Finds language tags such as
Rule: Frontmatter has no code-running YAML tags →!!python/object,!!python/apply,!!js/functionor!!ruby/objectin the frontmatter.No instructions to hide actions or override safeguardssecurity
Finds wording such as "ignore previous instructions", "override all system prompts", "don't tell the user." or "without telling the user." Quoted examples, lines that tell the agent to resist such text, tests and test data are skipped.
Rule: No instructions to hide actions or override safeguards →Doesn't turn off permission promptssecurity
Finds
Rule: Doesn't turn off permission prompts →--dangerously-skip-permissions,--dangerously-bypass-approvals-and-sandbox,danger-full-access,--yoloandbypassPermissionson a line that runs an agent CLI or sets a permission mode, unless the same file says it runs in a container or VM.Doesn't read credentials and call the networksecurity
One file names a file that holds secrets, such as an SSH private key,
Rule: Doesn't read credentials and call the network →~/.aws/credentials,.netrcor browserLogin Data, and also makes network calls withcurl,fetch,requestsor similar.No encoded or obfuscated codesecurity
Finds decode-then-run code (
Rule: No encoded or obfuscated code →base64 -d | sh,eval(atob(...)),exec(base64...)), long chains of hex escapes orString.fromCharCode, base64 strings over 200 characters outsideassets/and data files, and password-protected archives (unzip -P,7z x -p).Downloads use HTTPSsecurity
Finds
Rule: Downloads use HTTPS →curl,wgetand PowerShell downloads fromhttp://URLs. Local and private addresses such aslocalhost,127.0.0.1,10.x,192.168.xand169.254.169.254are skipped.Hooks in the frontmatter are reviewedsecurity
The frontmatter has a
Rule: Hooks in the frontmatter are reviewed →hooksfield, which Claude Code turns into commands that run on later tool calls.Credential files are reviewedsecurity
Names files that hold credentials:
Rule: Credential files are reviewed →~/.sshand SSH private keys,~/.aws/credentials,.netrc,.pypirc,~/.kube/config,~/.docker/config.json,~/.config/gh,/etc/shadow, browserLogin Dataand cookies, wallet files and macOS keychain lookups.Changes outside the project are reviewedsecurity
Finds recursive deletes of
Rule: Changes outside the project are reviewed →/,~or$HOME,chmod 777and setuid, writes to shell startup files and agent settings, scheduled jobs and services (crontab,launchctl load,systemctl enable,schtasks),mkfsanddd if=.Downloads are pinned to a versionsecurity
Finds downloads from
Rule: Downloads are pinned to a version →releases/latestand from a branch such asmainormasteron raw.githubusercontent.com, of scripts and binaries that the skill then runs.Instructions ship with the skillsecurity
Finds a skill that tells the agent to fetch an instruction file from a URL (
Rule: Instructions ship with the skill →SKILL.md,AGENTS.md,CLAUDE.md,instructions.md,prompt.md,.cursorrules) or to follow the steps or commands on a web page.Links show where they gosecurity
Finds links through URL shorteners such as bit.ly or tinyurl.com, links to public IP addresses instead of domain names, and downloads from paste sites or anonymous file hosts such as pastebin.com or transfer.sh.
Rule: Links show where they go →Network callssecurity
Lists the first network call:
Rule: Network calls →curl,wget,fetch(,requests,urllib,axios,Invoke-WebRequestand similar. A note, not a fault: it costs no points.Binary filessecurity
Lists compiled or packaged files in the skill folder, such as
Rule: Binary files →.exe,.dll,.so,.jar,.pycor.wasm. A note, not a fault: it costs no points.
To fix these in your copy of the skill, let your agent do it: the skillland-fix skill for Claude Code, Codex and Cursor edits the SKILL.md and runs these checks again until it scores A. Get the skills
The validator checks how the SKILL.md is written. It doesn't run the skill, so a high score doesn't mean the skill is useful, correct or safe. What the score covers
Compared with the index
Score
92 scores higher than 46% of 4,462 skills.
Body size
About 4,374 tokens, loaded each time the skill runs. The median is 1,651.
Files (24)
A tick marks the 24 of 24 files the validator read. It reads text files under 200 KB.
- SKILL.md (opens in new window)
- .tessl-plugin/plugin.json (opens in new window)
- evals/assertion-specificity/criteria.json (opens in new window)
- evals/assertion-specificity/task.md (opens in new window)
- evals/helper-extraction-threshold/criteria.json (opens in new window)
- evals/helper-extraction-threshold/task.md (opens in new window)
- evals/implementation-coupled-phrasing/criteria.json (opens in new window)
- evals/implementation-coupled-phrasing/task.md (opens in new window)
- evals/mechanical-step-abstraction/criteria.json (opens in new window)
- evals/mechanical-step-abstraction/task.md (opens in new window)
Show all 24 files
- evals/mocking-rationale/criteria.json (opens in new window)
- evals/mocking-rationale/task.md (opens in new window)
- evals/over-split-assertions/criteria.json (opens in new window)
- evals/over-split-assertions/task.md (opens in new window)
- evals/recomputed-expectations/criteria.json (opens in new window)
- evals/recomputed-expectations/task.md (opens in new window)
- evals/shared-fixture-ownership/criteria.json (opens in new window)
- evals/shared-fixture-ownership/task.md (opens in new window)
- evals/single-act-per-test/criteria.json (opens in new window)
- evals/single-act-per-test/task.md (opens in new window)
- evals/structure-and-naming/criteria.json (opens in new window)
- evals/structure-and-naming/task.md (opens in new window)
- references/e2e-selector-and-assertion-conventions.md (opens in new window)
- references/step-grouping-and-phrasing.md (opens in new window)
More testing & qa skills
dotnet/skills · official
Detects duplicate boilerplate, copy-paste tests, and structural maintainability issues across .NET test suites. Use when the user asks to reduce repetition, consolidate similar test methods, convert copy-paste tests to data-driven parameterized tests, suggest a better test structure, or identify refactoring opportunities. Identifies repeated construction, assertion patterns, copy-paste methods convertible to DataRow/Theory/TestCase, redundant setup/teardown, and shared infrastructure. Produces an analysis report with concrete before/after suggestions. Works with MSTest, xUnit, NUnit, and TUnit. DO NOT USE FOR: writing new tests (use writing-mstest-tests), reviewing test quality or anti-patterns (use test-anti-patterns), or deep mock auditing (use exp-mock-usage-analysis).
npx skills add dotnet/skills --skill exp-test-maintainability6.4k
elementalsouls/claude-bughunter
Drive a single exploit attempt all the way to proof instead of giving up one step early — for the failure where you found the bug and wrote the right payload but never confirmed it landed. Three mechanics: (1) inspect and FOLLOW every redirect (a 3xx is a step in the flow, not the end — the reflection or state change often fires only after the Location hop); (2) diff each response against an explicit expected outcome (a named marker, a status, a body delta) — never assume a 2xx or a delivered POST means success; (3) stop and CHANGE APPROACH after N identical failures instead of re-sending the same request. Use when a payload won't land, when the exploit seems delivered but is unconfirmed, when you are following (or skipping) redirects, or when you catch yourself looping the same request. This is per-attempt proof mechanics; for 'is this signal a finding' see triage-validation, for 'don't abandon surface coverage' see redteam-mindset.
npx skills add elementalsouls/claude-bughunter --skill exploit-completion24.1k
qa
B·84browser-use/browser-use · official
QA-test a website or web app and return a 1-5 quality score (5 = flawless, 1 = broken) with evidence. Use when the user wants to test, QA, evaluate, score, or "check how good" a site, page, flow, or app — including a local dev server (e.g. "qa test localhost:5173", "does the checkout work?", "rate this landing page"). Drives a real Browser Use cloud browser, tunneling localhost automatically.
npx skills add browser-use/browser-use --skill qa122.1k
More from testland/qa
- a11y-violation-gate
- ab-test-validity-checklist
- add-to-homescreen-flow-tests
- ai-spec-coverage-mapper
- ai-test-generator
- allure-reports
- api-chaos-runner
- apollo-server-tests
- appium-testing
- aria-authoring-patterns
- async-ordering-tests
- atlas-migrations
- attack-surface-test-checklist
- audit-trail-test-author
- auth0-tests
- aws-sam-local-testing
- axe-a11y
- azure-functions-tests
- bats-testing
- bdd-step-library-curator
- behave-testing
- boundary-value-generator
- browser-matrix-strategy-reference
- buf-cli-lint-breaking-build
- bug-bash-facilitator
- bug-report-template
- bug-tracker-workflow
- bullmq-tests
- cache-key-discriminator-audit
- cdn-cache-purge-tests
- ceedling-build-runner
- celery-tests
- chaos-drill-protocol
- chaos-experiment-author
- chaos-mesh
- chart-render-tests
- checkov-policy
- chromatic-visual-regression-testing
- chrome-extension-messaging-tests
- ci-failure-triage
- ci-test-job-conventions
- cli-output-conventions
- cloud-grid-e2e
- cloudflare-workers-miniflare
- codeql-queries
- compliance-coverage-scoring
- confirmation-testing-workflow
- contract-compatibility-gate
- coverage-diff-reporter
- coverage-guided-fuzzing
- coverage-py-analysis
- cron-job-test-author
- cross-tenant-data-leak-tests
- cucumber-testing
- currents-integration
- cve-exploitability-triage
- cypress-testing
- data-contract-extractor
- data-quality-conventions
- data-quality-gate
- db-query-plan-analyzer
- dbt-testing
- deadlock-detection-harness
- decision-table-test-design
- deepchecks-tests
- deepeval-evaluation
- defect-escape-taxonomy
- definition-of-done
- dependabot-config
- dependency-vulnerability-scanning
- desktop-test-strategy-reference
- detox-testing
- docker-compose-tests
- dotnet-unit-tests
- dr-drill-runner
- dst-transition-reference
- e2e-suite-budget
- elasticsearch-relevance-tests
- electron-playwright
- embedded-coverage-strategy-reference
- error-budget-tests
- espresso-suite
- event-sourcing-tests
- evidently-monitoring
- exec-quality-narrative
- experiment-results-interpreter
- experiment-sdk-testing
- exploratory-charter-author
- exploratory-testing
- failure-injection-test-author
- fairlearn-fairness
- fake-clock-testing
- faker-data
- fast-check-testing
- feature-flag-test-harness
- flake-axis-bisection
- flake-dashboard-author
- flake-pattern-reference
- flaky-test-quarantine
- flame-graph-analyzer
- flaui-tests
- flutter-testing
- flyway-migrations
- framework-choice-advisor
- game-perf-profiling
- gameplay-recording-replay
- gdpr-test-patterns
- gherkin-from-stories
- ghz-load
- giskard-llm
- giskard-tests
- github-actions-test-jobs
- gitlab-ci-test-jobs
- gitleaks-scanning
- go-unit-tests
- godot-gut-tests
- golden-file-conventions
- googletest-embedded-arm
- graphql-complexity-limit-tester
- graphql-n-plus-one-remediation
- graphql-schema-regression
- graphql-subscription-test-author
- graphql-yoga-tests
- great-expectations
- grpc-mock
- grpc-streaming-test-author
- grpcurl-cli
- hardware-in-loop-reference
- hasura-tests
- helm-chart-tester
- hipaa-test-patterns
- hybrid-search-eval-author
- hypothesis-testing
- i18n-string-coverage
- idempotency-test-author
- jacoco-analysis
- jaeger-trace-tests
- jenkinsfile-test-stages
- jmeter-load-testing
- jqwik-testing
- js-unit-tests
- judgment-list-author
- junit-xml-analysis
- jvm-unit-tests
- k-anonymity-verifier
- k6-load-testing
- kafka-consumer-tests
- karate-testing
- keycloak-tests
- knip-dead-code
- langfuse-tracing
- language-native-sast
- launchdarkly-testing
- lcov-analysis
- lighthouse-perf
- liquibase-migrations
- living-documentation-publisher
- lizard-complexity
- llm-eval-anti-patterns
- llm-regression-suite-author
- load-testing-overview
- locale-format-validator
- madge-deps
- maestro-flows
- mailpit-testing
- malicious-payload-bank
- manual-test-script-author
- mfa-flow-test-author
- migration-operation-taxonomy
- mobile-a11y-test-author
- mobile-device-matrix-toolkit
- model-based-test-graph-author
- model-performance-regression-gate
- model-risk-evidence-matrix
- mqtt-tests
- msw-handlers
- mull-mutation
- multi-tool-finding-triage
- multiplayer-state-machine-coverage
- mutant-survival-triage
- mutmut-mutation
- mvcc-isolation-tests
- negative-test-generator
- non-functional-requirement-extractor
- notebook-ci-pipeline-author
- nuclei-dast
- oauth-flow-test-author
- object-model-patterns
- offline-fallback-tests
- okta-tests
- openapi-contract-diff
- openfeature-sdk-testing
- opentelemetry-trace-assertions
- otel-collector-config-tester
- outbox-pattern-test-author
- pact-contract-testing
- pairwise-test-case-generator
- payment-flow-test-author
- payment-gateway-sandboxes
- pci-dss-control-test-author
- pdf-accessibility-checker
- pdf-snapshot-tester
- percy-visual-regression-testing
- perf-budget-gate
- pester-cli-testing
- pii-masking-pipeline-builder
- pitest-mutation
- platform-cert-overview-reference
- playwright-agents
- playwright-extension-fixtures
- playwright-fixture-builder
- playwright-snapshots
- playwright-testing
- policy-as-code-runner
- post-mortem-author
- postman-collections
- presidio-pii-detection
- print-stylesheet-tests
- prod-canary-validator
- promptfoo-evaluation
- proptest-testing
- protobuf-compat-checking
- pseudo-localization-runner
- push-notification-test-author
- pytest-asyncio-patterns
- python-unit-tests
- qa-hiring-kit
- qemu-system-test-runner
- qt-test-framework
- quality-status-digest
- rabbitmq-tests
- race-condition-test-author
- ragas-evaluation
- reachability-analyzer
- red-green-refactor
- redis-cache-tests
- regression-suite-selector
- release-runbook-author
- renovate-config
- reqnroll-testing
- restassured-testing
- restler-fuzzing
- risk-matrix
- rtl-rendering-tester
- rust-unit-tests
- saga-transaction-tests
- schemathesis-fuzzing
- screen-reader-test-author
- secrets-rotation-runner
- seed-data-curator
- selenium-grid-4-runner
- selenium-testing
- semgrep-rules
- server-sent-events-tests
- serverless-integration-test-builder
- service-worker-lifecycle-tests
- session-management-test-author
- sidekiq-tests
- skill-matrix-author
- slo-load-test-plan
- smoke-suite-gate
- sms-test-author
- soc2-evidence-collector
- soda-checks
- sonarqube-maintainability-gate
- sonarqube-rules
- spec-testability-heuristics
- sqs-tests
- state-transition-test-design
- storybook-visual-regression-testing
- stride-threat-modeling
- stripe-subscription-billing-test-author
- stripe-test-cards-and-webhooks
- stryker-mutation
- stryker-net-mutation
- syft-generation
- synthea-healthcare-data
- synthetic-data-toolkit
- synthetic-monitor-author
- synthetic-pii-generator
- tcm-case-management
- tenant-onboarding-test-author
- test-case-anatomy-reference
- test-case-from-live-feature
- test-case-ideation-from-story
- test-coverage-targeter
- test-data-patterns
- test-design-scorecard
- test-effort-estimation
- test-framework-architecture-audit
- test-framework-blueprint
- test-isolation-patterns
- test-management-sync
- test-pyramid-balancer
- test-removal-criteria
- test-run-summary-author
- test-strategy-author
- test-suite-health-audit
- testcontainers
- timezone-test-matrix-builder
- toxiproxy-chaos
- trace-spec-author
- traceability-matrix-builder
- trivy-config
- trivy-image
- tui-snapshot-tester
- unity-test-framework
- unity-test-framework-c
- unreal-automation-system
- varnish-test-vtc-syntax
- vector-search-recall-tests
- vex-author
- visual-baseline-conventions
- visual-baseline-gate
- wcag-color-contrast
- wcag-compliance-reporter
- wcag-keyboard-navigation
- web-e2e-overview
- web-push-tests
- web-vitals-inp-deep
- webdriverio-testing
- webhook-delivery-tester
- websocket-tests
- winappdriver
- wiremock-stubs
- workbox-tests
- xcuitest-suite
- zap-baseline