test-validity-checker

test-validity-checker is a skill for Claude Code, Codex from smicolon/ai-kit. It costs 49 tokens per session (1,047 once invoked), scanned A, original, MIT.

A guide for checking whether software tests meaningfully verify the code they cover. Test coverage measures which parts of code are exercised by tests.

In plain words
What is it for?
Use it when reviewing or writing tests, checking test quality, validating coverage, or running pytest.
Why use it?
It helps detect tests that pass without checking the intended behaviour and supports better coverage review.

Skill for Claude CodeCodex

Part of the django plugin — 8 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/smicolon/ai-kit/test-validity-checker
Any agent
npx skills add smicolon/ai-kit --skill test-validity-checker
Clone the repo
git clone --depth 1 https://github.com/smicolon/ai-kit

Made for: Claude Code, Codex.

Or install django, the plugin that ships this one along with the rest of its 8 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for test-validity-checker

README.md
[![agentmods](https://agentmods.dev/badge/skills/smicolon/ai-kit/test-validity-checker.svg)](https://agentmods.dev/skills/smicolon/ai-kit/test-validity-checker)
Your own site
<a href="https://agentmods.dev/skills/smicolon/ai-kit/test-validity-checker"><img src="https://agentmods.dev/badge/skills/smicolon/ai-kit/test-validity-checker.svg" alt="Measured on agentmods" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,047 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00049 $0.01047
Opus 5 $0.00024 $0.00524
Sonnet 5 $0.00010 $0.00209
Haiku 4.5 $0.00005 $0.00105

Measured 5d ago against content hash f8498a23b906, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

test-validity-checker scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packs/django/skills/test-validity-checker/SKILL.md · 195 lines

How it starts

The opening of the file, as written. The whole thing — 195 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Test Validity Checker

Auto-validates that tests are meaningful and catch real bugs.

Activation Triggers

This skill activates when:

  • Writing test files
  • Before pytest execution
  • When test coverage is checked
  • When dev loop is running

Validity Checks

Check 1: Empty Test Detection

# INVALID - Empty body
def test_user():
    pass

# INVALID - Only setup, no assertions
def test_create():
    user = create_user()
    # No assertions!

# VALID
def test_user_creation():
    user = create_user()
    assert user.id is not None
    assert user.is_active

Action: Flag empty tests, require assertions

Check 2: Trivial Assertion Detection

# INVALID - Always passes
def test_always_passes():
    assert True

def test_truthy():
    user = create_user()
    assert user  # Just checks existence

# INVALID - Testing constants
def test_constant():
    assert 1 + 1 == 2

# VALID - Tests actual behavior
def test_user_email_lowercase():
    user = create_user(email='[email protected]')
    assert user.email == '[email protected]'

Action: Require value comparisons, not just truthiness

Check 3: Assertion Count

# WEAK - Only 1 assertion
def test_single_assertion():
    response = client.get('/api/users/')
    assert response.status_code == 200

# STRONG - Multiple assertions
def test_list_users():
    response = client.get('/api/users/')
    assert response.status_code == 200
    assert 'results' in response.data
    assert len(response.data['results']) > 0
    assert 'email' in response.data['results'][0]

Minimum: 2 meaningful assertions per test

Check 4: Edge Case Coverage

For each function under test, require:

  • Happy path (valid input -> expected output)
  • Invalid input (validation error)
  • Boundary conditions (min, max, empty)
  • Error handling (exceptions caught)
# Complete test suite example
class TestUserService:
    # Happy path
    def test_create_user_success(self):
        ...

    # Invalid input
    def test_create_user_invalid_email(self):
        with pytest.raises(ValidationError):
            ...

    # Boundary
    def test_create_user_max_length_name(self):
        user = create_user(name='x' * 255)  # Max length
        ...

    # Error handling
    def test_create_user_database_error(self, mocker):
        mocker.patch('app.models.User.save', side_effect=DatabaseError)
        with pytest.raises(ServiceError):
            ...

Read the full file on GitHub · 195 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 195 lines · 49 tokens per session scan A f8498a23b906

Subscribe to this mod's changes

test-validity-checker is a skill published in the GitHub repository smicolon/ai-kit (6 stars, last pushed yesterday), licensed MIT. It adds 49 tokens to every session and 1,047 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.