CtrlK
BlogDocsLog inGet started
Tessl Logo
PluginPublic

testland/python-unit-tests

Use whenever the task is to write, add, fix or review Python tests, even quick pytest tests for a single function: edge cases, fixtures and conftest.py, parametrize tables, mocking, markers, coverage gates and CI. Has the pytest checklist for edge cases and weak assertions.

Quality

88%

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

Overview
Quality
Evals
Security
Files

Quality

Content

75%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.

A well-structured, highly actionable reference: executable code and commands at every step, current version-specific pytest 9 guidance, a valuable anti-patterns table, and clean one-level-deep bundle references. The main costs are token weight — a 340-line body where the basics-oriented sections (first test, skip/xfail, CLI flags) compete with the genuinely non-obvious material — and the absence of an explicit validate-the-new-test feedback loop.

Suggestions

Trim or collapse the sections teaching basics Claude already knows — Step 2's trivial sum example, Step 6's skip/skipif/xfail boilerplate, and Step 11's `-lf`/`-ff`/`-x`/`-k`/`-s` flag list — into a one-line mention or move them to a reference file, keeping the body focused on the non-obvious pytest 9 material (config precedence, strict mode, subtests, 9.2 parametrize change).

Add an explicit validation checkpoint to the authoring workflow: after writing a test, run it (`pytest tests/test_<module>.py`) and confirm it passes for the expected reason (and ideally fails when the assertion is inverted), before declaring the task done.

Move the fast-feedback flags and marker basics into references/ (e.g., alongside unittest.md/doctest.md) so SKILL.md acts as a lean overview with well-signaled one-level-deep references.

DimensionReasoningScore

Conciseness

The high-value non-obvious material (pytest 9 `[tool.pytest]` config and precedence rules, `strict = true`, subtests, 9.2 keyword-only parametrize, the anti-patterns table) is dense and earns its tokens, but several sections re-teach things Claude already knows: the trivial first-test example (`def sum(a, b): return a + b`), basic skip/skipif/xfail syntax, and the `-lf`/`-ff`/`-x`/`-k`/`-s` flag list. At ~340 lines it could be tightened toward the 'efficient, minor instances of over-explanation' anchor without losing value.

3 / 5

Actionability

Guidance is fully executable throughout: install commands, runnable test/fixture/parametrize/mocker code, copy-paste TOML and coverage config, a concrete CI YAML snippet, and exact CLI invocations (`pytest --cov=src ... --cov-fail-under=80`, `pytest -n auto`). Not 4 because the examples cover the common cases completely and are ready to run as written.

5 / 5

Workflow Clarity

Steps 1–11 give a clear install → write → configure → fixtures → parametrize → markers → mock → coverage → CI sequence, with checkpoints like "Check which file pytest picked from the `configfile:` line in the run header" and an 'Authoring conventions' workflow that includes detect-then-match rules and "Conflicting signals → stop and ask". Not 5 because there is no explicit validate-after-writing loop (e.g., run the new test and confirm it fails/pass as expected) and the sequence is a learning path more than a task workflow with error-recovery feedback.

4 / 5

Progressive Disclosure

The two bundle references (references/unittest.md, references/doctest.md) are real files, one level deep, and clearly signaled with purpose ("stdlib unittest + unittest.mock", "stdlib doctest"), and the body delegates async/conventions to named sibling skills. Not 5 because the main body is long (~340 lines) with several sections (basic markers, fast-feedback flags) that could live in a reference file, leaving minor organization gaps.

4 / 5

Total

16

/

20

Passed

Description

96%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: explicit 'use when' trigger guidance, comprehensive natural keyword coverage including tool-specific terms, and a clearly stated scope. The only weakness is slight over-breadth — the 'whenever the task is to write... Python tests' trigger could collide with narrower sibling testing skills (async, property-based, review-focused).

DimensionReasoningScore

Specificity

The description lists multiple concrete actions and scope items: "write, add, fix or review Python tests", "edge cases, fixtures and conftest.py, parametrize tables, mocking, markers, coverage gates and CI" — comprehensive coverage across the testing lifecycle, matching the anchor for multiple specific concrete actions. Not 4 because coverage spans authoring, fixing, reviewing, and the full pytest feature set with no significant gap.

5 / 5

Completeness

It explicitly answers 'when' with a concrete trigger clause ("Use whenever the task is to write, add, fix or review Python tests, even quick pytest tests for a single function") and 'what' by enumerating the skill's scope and contents ("edge cases, fixtures and conftest.py, parametrize tables, mocking, markers, coverage gates and CI. Has the pytest checklist for edge cases and weak assertions"). Not 4 because both halves are explicit rather than implied or generic.

5 / 5

Trigger Term Quality

Natural user phrasing is comprehensively covered with synonyms: "write, add, fix or review", "Python tests", "pytest tests", "edge cases", "fixtures", "conftest.py", "parametrize", "mocking", "coverage", "CI" — these are the exact words a user would say when needing this skill. Not 4 because both common variations (write/add/fix/review) and specific tool vocabulary (parametrize, conftest.py) are present.

5 / 5

Distinctiveness Conflict Risk

The pytest/Python-testing niche is clear and tool-specific ("conftest.py", "parametrize tables", "coverage gates"), giving mostly distinct triggers with minimal conflict risk. Not 5 because "review Python tests" and the broad "whenever the task is to write... Python tests" clause would also fire for closely related sibling skills (async test patterns, property-based testing, test-code review), a minor overlap risk.

4 / 5

Total

19

/

20

Passed

Validation

100%

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

Validation — 16 / 16 Passed

Validation for skill structure

No warnings or errors.

Reviewed

On this page