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.
npx agentmods add skills/vladkesler/initrunner/pytest-patternsnpx skills add vladkesler/initrunner --skill pytest-patternsgit clone --depth 1 https://github.com/vladkesler/initrunnerWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00024 | $0.00807 |
| Opus 5 | $0.00012 | $0.00404 |
| Sonnet 5 | $0.00005 | $0.00161 |
| Haiku 4.5 | $0.00002 | $0.00081 |
Grade A, and why
pytest-patterns 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Pytest patterns and best practices for Python test suites.
When to activate
Use this skill when the project has pyproject.toml, setup.cfg, pytest.ini,
conftest.py, or a tests/ directory containing *_test.py or test_*.py
files.
Test file structure
- Name test files
test_<module>.pyto mirror the source module they cover. - Group related tests inside a class (
class TestParseConfig:) when they share setup or conceptually belong together. - Name test functions
test_<behavior_under_test>-- the name should read like a specification (e.g.test_parse_config_raises_on_missing_key).
Fixtures
- Place shared fixtures in
conftest.pyso they are automatically discovered by pytest. - Scope controls lifetime:
function(default, one per test),class,module,session. - Use
yieldfixtures for setup/teardown -- code after yield runs as cleanup even if the test fails. - Fixture factories (a fixture that returns a callable) let tests customize object creation per-call.
- Parametrized fixtures (
@pytest.fixture(params=[...])) run every dependent test once per parameter value.
Parametrize
@pytest.mark.parametrize("x,expected", [(1, 2), (3, 6)])runs the test once per tuple.- Multiple
@pytest.mark.parametrizedecorators stack -- pytest generates the cartesian product. - Use
indirect=Trueto route parameter values through a fixture before they reach the test.
Markers
@pytest.mark.slow-- tag long-running tests so they can be skipped withpytest -m "not slow".@pytest.mark.skip(reason="...")-- unconditionally skip.@pytest.mark.xfail(reason="...")-- expect failure; test still runs but does not fail the suite.- Register custom markers in
pyproject.tomlunder[tool.pytest.ini_options]to avoid warnings. - Filter with
pytest -m "marker_name".
Assertions
- Use plain
assert-- pytest rewrites it to show detailed diffs on failure. with pytest.raises(ValueError, match=r"expected .* pattern"):for exception type and message verification.pytest.approx(0.1 + 0.2, abs=1e-9)for floating-point comparisons.- Use
match=onpytest.raisesto verify the error message, not just the exception type.
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.
- 2d ago First seen · 90 lines · 24 tokens per session scan A aca9c14195dc
pytest-patterns is a skill published in the GitHub repository vladkesler/initrunner (41 stars, last pushed 4d ago), licensed Apache-2.0. It adds 24 tokens to every session and 807 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-08-30.
Other skills, from other repositories
Vizra ADK Evaluation Framework
Test and evaluate AI agents with automated evaluations, assertions, and LLM-as-a-Judge patterns.
Vizra ADK Memory System
Implement persistent memory, session context, and vector memory (RAG) for AI agents.
Vizra ADK Tool Creation
Build custom tools for Vizra ADK agents - includes patterns for database, API, file, and email tools.
Vizra ADK Agent Creation
Create AI agents with Vizra ADK - includes patterns for customer service, data analysis, and content generation agents.
Vizra ADK Workflows
Orchestrate complex multi-agent workflows - sequential, parallel, conditional, and loop patterns.
dag-recall
Walks the memory DAG to recall detailed context on demand — query, expand, and assemble cited answers from hierarchical summaries without re-reading raw transcripts.