verify-with-inline-tests

verify-with-inline-tests is a skill for Claude Code from jimmc414/claude-code-plugin-marketplace. It costs 27 tokens per session (674 once invoked), scanned A, original, MIT.

A testing pattern that keeps small tests in the same file as the code and runs them with the module.

In plain words
What is it for?
Use it for small modules, single-file programs, or quick verification during development.
Why use it?
It keeps quick checks close to the implementation and makes them serve as examples of expected behavior.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the norvig-patterns plugin — 54 skills shipped together

Good fit Use it for small modules, single-file programs, or quick verification during development.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jimmc414/claude-code-plugin-marketplace/verify-with-inline-tests
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.

Any agent
npx skills add jimmc414/claude-code-plugin-marketplace --skill verify-with-inline-tests
Clone the repo
git clone --depth 1 https://github.com/jimmc414/claude-code-plugin-marketplace

Made for: Claude Code.

Or install norvig-patterns, the plugin that ships this one along with the rest of its 54 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 verify-with-inline-tests

README.md
[![agentmods](https://agentmods.dev/badge/skills/jimmc414/claude-code-plugin-marketplace/verify-with-inline-tests.svg)](https://agentmods.dev/skills/jimmc414/claude-code-plugin-marketplace/verify-with-inline-tests)
Your own site
<a href="https://agentmods.dev/skills/jimmc414/claude-code-plugin-marketplace/verify-with-inline-tests"><img src="https://agentmods.dev/badge/skills/jimmc414/claude-code-plugin-marketplace/verify-with-inline-tests.svg" alt="Measured on agentmods" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 674 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00027 $0.00674
Opus 5 $0.00014 $0.00337
Sonnet 5 $0.00005 $0.00135
Haiku 4.5 $0.00003 $0.00067

Measured 3d ago against content hash 87d81cd3c121, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

verify-with-inline-tests 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 3d 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.

plugins/norvig-patterns/skills/verify-with-inline-tests/SKILL.md · 83 lines

How it starts

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

verify-with-inline-tests

When to Use

  • Tests should be near the code
  • Tests serve as documentation
  • Single-file modules
  • Quick verification during development

When NOT to Use

  • Large test suites
  • Need test isolation
  • CI/CD expects tests in specific location

The Pattern

Include tests in the module, run them when module is executed directly.

def my_function(x):
    """Do something useful."""
    return x * 2

def test():
    """Run all tests."""
    assert my_function(2) == 4
    assert my_function(0) == 0
    assert my_function(-1) == -2
    print("All tests pass.")

if __name__ == '__main__':
    test()

Example (from pytudes)

# sudoku.py - structural invariant tests
def test():
    """A set of tests that must pass."""
    assert len(squares) == 81
    assert len(unitlist) == 27
    assert all(len(units[s]) == 3 for s in squares)
    assert all(len(peers[s]) == 20 for s in squares)
    assert units['C2'] == [
        ['A2', 'B2', 'C2', 'D2', 'E2', 'F2', 'G2', 'H2', 'I2'],
        ['C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'C7', 'C8', 'C9'],
        ['A1', 'A2', 'A3', 'B1', 'B2', 'B3', 'C1', 'C2', 'C3']
    ]
    print('All tests pass.')

if __name__ == '__main__':
    test()
    solve_all(open("sudoku-easy50.txt"), "easy")
    solve_all(open("sudoku-top95.txt"), "hard")

# spell.py - comprehensive unit tests
def unit_tests():
    assert correction('speling') == 'spelling'
    assert correction('korrectud') == 'corrected'
    assert correction('bycycle') == 'bicycle'
    assert words('This is a TEST.') == ['this', 'is', 'a', 'test']
    assert len(WORDS) == 32198
    assert sum(WORDS.values()) == 1115585
    assert 0.07 < P('the') < 0.08
    return 'unit_tests pass'

if __name__ == '__main__':
    print(unit_tests())
    spelltest(Testset(open('spell-testset1.txt')))

Key Principles

  1. if __name__ == '__main__': Only run tests when executed directly
  2. Assert for tests: Simple, clear assertions
  3. Print success: Confirm tests ran
  4. Test structure first: Validate data structures built correctly
  5. Tests as examples: Show how functions are used

Read the full file on GitHub · 83 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. 3d ago First seen · 83 lines · 27 tokens per session scan A 87d81cd3c121

Subscribe to this mod's changes

verify-with-inline-tests is a skill published in the GitHub repository jimmc414/claude-code-plugin-marketplace (4 stars, last pushed yesterday), licensed MIT. It adds 27 tokens to every session and 674 once invoked, about $0.0001 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-09-04.

Related

Other skills, from other repositories

phpunit-unit-test-reviewing

Internal sub-skill. Do not auto-activate. Use only when explicitly invoked by name by another skill or agent.

shopwareLabs/ai-coding-tools · 31 tokens

phpunit-migration-test-reviewing

Internal sub-skill. Do not auto-activate. Use only when explicitly invoked by name by another skill or agent.

shopwareLabs/ai-coding-tools · 32 tokens

phpunit-test-adversarial-reviewing

Internal sub-skill. Do not auto-activate. Use only when explicitly invoked by name by another skill or agent.

shopwareLabs/ai-coding-tools · 33 tokens

phpunit-test-team-reviewing

Use this skill when the user asks for a team-based, consensus, multi-reviewer, or red-team review of Shopware PHPUnit tests — trigger phrases like "team review these tests", "consensus review the tests in PR.

shopwareLabs/ai-coding-tools · 52 tokens

phpunit-integration-to-unit-migrating

Use this skill ONLY when the user explicitly requests an audit, migration, or evaluation of whether a Shopware integration test belongs in the unit suite — trigger phrases like "audit integration tests", "migrate integration tests to unit", "is this an integration test or a unit test", "evaluate integration tests for…

shopwareLabs/ai-coding-tools · 152 tokens

phpunit-unit-test-writing

Use this skill when the user asks to write, generate, create, or add PHPUnit unit tests for a Shopware 6 source class — phrases like "write unit tests for X", "generate tests for ClassName", "create PHPUnit tests", "add test coverage", "test this class", "cover this with tests", "I need tests for", "unit test this"…

shopwareLabs/ai-coding-tools · 187 tokens