CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

writing-tests

Gates whether a new test should exist and forces it to be efficient, protecting CI from low-value test bloat. Use before any change to what a pytest, Jest, or Playwright test asserts or sets up, down to one fixture or one assertion added to an existing block. Front-loads the value bar (every test must catch a realistic regression no existing test already catches; extend the nearest existing test before writing a new standalone one; test behavior through the public interface, not implementation details; collapse near-duplicates into parameterized cases) and the efficiency bar (deterministic, isolated, fast; pick the cheapest test level; Django TestCase over TransactionTestCase; no sleeps, no real network; no time bombs from absolute dates left to age against the real clock; no database a test never uses). Includes a "don't write it" decision tree. For fixing an existing flaky test use `/fixing-flaky-tests`; after this gate says a Playwright test is warranted, use `/playwright-test` for mechanics.

Quality

93%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

The canonical home for this skill is writing-tests in PostHog/posthog

SKILL.md
Quality
Evals
Security

Quality

Content

92%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

An unusually actionable, well-sequenced skill: the two-question gate with model answers, the five no's, the cost ladder, and the per-language rules are all concrete and executable, and the bundle correctly offloads the bug catalog and ratchet remediation to two clearly signaled reference files. The only weakness is localized verbosity — the DRF-validation bullet and the time-bomb/frozen-clock passages explain mechanics or narrative that could be trimmed.

Suggestions

Trim the DRF-validation bullet to the repo-specific rules (use SimpleTestCase for serializer validation, keep one DB-backed endpoint test as a wiring guard, let exceptions-hog render the envelope once) and drop the explanation of standard DRF validator mechanics and to_internal_value ordering that Claude already knows.

Tighten the time-bomb and frozen-clock bullets: keep the rules and the pin-the-date-is-not-pin-the-clock distinction, but cut narrative asides like "that misattribution, not the fix, is where the time goes" and the incident-style framing of why TTL drift reads as a PR-caused failure.

DimensionReasoningScore

Conciseness

The body is mostly dense, imperative, repo-specific rules with just enough rationale to apply them to novel cases ("Never commit `.only`", "A test class only takes a database it uses"), but the DRF bullet explains mechanics Claude already knows ("DRF field validators (`required`, type coercion, `choices`, `min/max`, regex) and `validate_<field>` methods run inside `Serializer(data=...).is_valid()`") and the time-bomb section carries trimmable narrative ("that misattribution, not the fix, is where the time goes"). It is not 3 because the over-explanation is localized to a couple of passages rather than pervasive padding.

4 / 5

Actionability

Fully executable guidance throughout: a complete `SimpleTestCase` code example, runnable commands ("grep -rlE '^\s*TTL ' posthog/models/ posthog/clickhouse/ --include=*.py"), named tools and helpers ("self.captureOnCommitCallbacks(execute=True)", "create_person", "freeze_time", "jest.setSystemTime()"), and model answers for the gate questions ("if someone makes `parse_filters` drop the `team_id` clause, this fails"). It is not 4 because the common Python and Jest cases are covered with copy-paste-ready specifics rather than having minor gaps.

5 / 5

Workflow Clarity

The decision procedure is clearly sequenced — two-question gate, then the five no's, then pyramid and per-language rules, then the PR justification line — with explicit validation checkpoints and failure paths ("If you can't answer it concretely — **do not write the test**"; "If you can't write that line, you've found a test that shouldn't be in the PR"). It is not 4 because every stage has an explicit pass/fail check rather than most; this is a decision gate, not a destructive or batch operation, so no validation cap applies.

5 / 5

Progressive Disclosure

The operational gate stays inline while deep material is split into well-signaled, one-level-deep references — "[references/mistakes-we-make.md](references/mistakes-we-make.md)" ("a catalog of the bug shapes we actually ship") and "[references/database-free-test-classes.md](references/database-free-test-classes.md)" — both real bundle files whose contents match the body's descriptions, with no nested references. It is not 4 because the split is clean and every reference is announced with what it contains.

5 / 5

Total

19

/

20

Passed

Description

92%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A strong description: it states a concrete gating action, enumerates the value and efficiency bars the gate applies, gives an explicit and finely scoped "Use before..." trigger, and routes the two adjacent skills by name. The only gap is synonym-level trigger coverage (unit/integration/e2e phrasings), which keeps trigger term quality at 4.

DimensionReasoningScore

Specificity

"Gates whether a new test should exist and forces it to be efficient" plus enumerated concrete rules ("extend the nearest existing test before writing a new standalone one", "Django TestCase over TransactionTestCase", "no sleeps, no real network", "collapse near-duplicates into parameterized cases") lists multiple specific actions with comprehensive coverage of the skill's scope. It is not 4 because no meaningful capability of the skill is left undescribed.

5 / 5

Completeness

The "what" is clear ("Gates whether a new test should exist and forces it to be efficient, protecting CI from low-value test bloat") and the "when" is explicit with concrete triggers ("Use before any change to what a pytest, Jest, or Playwright test asserts or sets up, down to one fixture or one assertion added to an existing block"). This matches the anchor-5 example pattern; it is not 4 because the when-clause is fully explicit rather than merely present.

5 / 5

Trigger Term Quality

Good natural keyword coverage — "pytest, Jest, or Playwright test", "one fixture or one assertion", "flaky test", "CI" — but common variations users would say ("unit test", "integration test", "e2e", "test suite") are missing. It is not 5 because the anchor-5 example requires synonym- and extension-level coverage such as "PDF files, PDFs, forms, .pdf".

4 / 5

Distinctiveness Conflict Risk

It carves a clear niche (test-worthiness gate) and actively disambiguates the two nearest sibling skills ("For fixing an existing flaky test use `/fixing-flaky-tests`; after this gate says a Playwright test is warranted, use `/playwright-test` for mechanics"). Clear distinct triggers with minimal conflict risk, matching anchor 5; it is not 4 because overlap risk with related skills is explicitly resolved rather than just small.

5 / 5

Total

19

/

20

Passed

Validation

93%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 15 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

relative_links

Relative link issues: 2 suspicious

Warning

Total

15

/

16

Passed

Repository

amplifthq/opentag

Path

.agents/skills/writing-tests/SKILL.md

Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.