CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

pytest-best-practices

Pytest conventions for Python test suites — fixtures and scopes, parametrization, mocking with pytest-mock, built-in fixtures (`tmp_path`, `monkeypatch`, `capsys`, `caplog`), markers, exception testing, and async tests. Use when writing, reviewing, or refactoring Python tests, `conftest.py` fixtures, or pytest configuration in `pytest.ini` / `pyproject.toml`. Does not cover general Python syntax or typing — see modern-python-development — nor FastAPI `TestClient` and app-level test setup — see fastapi-best-practices.

80

Quality

100%

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

SKILL.md
Quality
Evals
Security

Quality

Content

100%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 model progressive-disclosure skill: a lean, lookup-oriented body of conventions, tables, and copy-paste commands with no padding or redundant explanation, unambiguous routing to four real one-level-deep references that exist in the bundle. The only conceivable addition (an inline example test) is correctly deferred to the references, which is proper structure, not a gap.

DimensionReasoningScore

Conciseness

The body is lean and assumes Claude's competence — terse principle bullets ("Use fixtures for setup/teardown, never class-level mutable state"), lookup tables, copy-paste commands, and a routing table, with zero space spent explaining what pytest is or how it works. Every section earns its tokens; there is no padded explanation to trim, so it sits at anchor 5 rather than the 'minor over-explanation' of anchor 4.

5 / 5

Actionability

Guidance is fully executable: exact commands ("pytest -x", "pytest --lf", "pytest -k 'pattern'", "pytest -n auto"), a copy-paste "pip install pytest pytest-asyncio pytest-mock pytest-cov pytest-xdist" line, a concrete directory tree, exact naming patterns, and a pattern table mapping every common case (`@pytest.fixture`, `@pytest.mark.parametrize`, `pytest.raises`, `mocker.patch`, `pytest.approx`) with its use case. Not a 4: the specific examples cover the common cases, with deeper executable detail correctly delegated to the routed references.

5 / 5

Workflow Clarity

This is a single-purpose conventions skill with no multi-step process, so the simple-skill guidance applies: the single action (apply these conventions, then route to the matching reference by task) is unambiguous via the task-to-reference routing table. No destructive or batch operations exist that would require validation checkpoints or cap the score, and the routing table plus 'reach for these before writing your own' built-in fixtures note give a clear decision structure.

5 / 5

Progressive Disclosure

The body is an overview plus quick reference that appropriately splits detail into four one-level-deep reference files (fixtures.md, parametrization.md, mocking.md, patterns.md), each well-signaled in a routing table keyed by task. All four referenced paths exist in the bundle and the reference files contain no further nested references, matching the anchor-5 structure (clear overview, one-level-deep references, easy navigation) rather than anchor 4's organization gaps.

5 / 5

Total

20

/

20

Passed

Description

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

An exemplary description: concrete capability enumeration with named fixtures and config files, an explicit 'Use when' trigger clause with file-level specificity, and explicit exclusion boundaries that route adjacent topics to sibling skills. No vague language, over-claims, or padding is present.

DimensionReasoningScore

Specificity

The description lists multiple concrete capabilities — "fixtures and scopes, parametrization, mocking with pytest-mock, built-in fixtures (`tmp_path`, `monkeypatch`, `capsys`, `caplog`), markers, exception testing, and async tests" — naming specific fixtures, plugins, and config files, which comprehensively covers the pytest domain with no vague filler. It is not a 4 because coverage has no minor gaps: configuration (`pytest.ini` / `pyproject.toml`) is included alongside every core pytest feature area.

5 / 5

Completeness

Both questions are answered explicitly: the "what" is the enumerated pytest conventions and built-in fixtures, and the "when" is a concrete trigger clause — "Use when writing, reviewing, or refactoring Python tests, `conftest.py` fixtures, or pytest configuration in `pytest.ini` / `pyproject.toml`". This matches the anchor-5 pattern (explicit what AND when with concrete trigger phrases), not anchor 4 where the 'when' could be more specific.

5 / 5

Trigger Term Quality

Natural trigger terms include "Python test suites", "writing, reviewing, or refactoring Python tests", "`conftest.py` fixtures", "pytest configuration", and file extensions/names ("conftest.py", "pytest.ini", "pyproject.toml") — comprehensive coverage including synonyms and file names that users would actually say. Not a 4: the missing-term allowance of anchor 4 does not apply, since the phrases users naturally use when needing this skill (pytest, tests, conftest, fixtures, mocking) are all present.

5 / 5

Distinctiveness Conflict Risk

The niche is unambiguous (pytest-specific, with named pytest APIs), and it adds explicit negative boundaries — "Does not cover general Python syntax or typing — see modern-python-development — nor FastAPI `TestClient` and app-level test setup — see fastapi-best-practices" — which actively routes away overlapping use cases. Minimal conflict risk; clearly the anchor-5 case rather than the 'minor overlap risk' of anchor 4.

5 / 5

Total

20

/

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.

Repository

provectus/awos-recruitment

Path

registry/skills/pytest-best-practices/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.