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 skills add vosslab/vosslab-skills --skill unit-test-startergit clone --depth 1 https://github.com/vosslab/vosslab-skillsWrote 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.
[](https://agentmods.dev/skills/vosslab/vosslab-skills/unit-test-starter)<a href="https://agentmods.dev/skills/vosslab/vosslab-skills/unit-test-starter"><img src="https://agentmods.dev/badge/skills/vosslab/vosslab-skills/unit-test-starter.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00050 | $0.01796 |
| Opus 5 | $0.00025 | $0.00898 |
| Sonnet 5 | $0.00010 | $0.00359 |
| Haiku 4.5 | $0.00005 | $0.00180 |
Grade A, and why
unit-test-starter scanned grade A with 2 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 8d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- call network/internet (`requests`, `urllib`, `http.client`, `socket`, etc.) Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
- spawn processes (`subprocess`, `os.system`) How it starts
The opening of the file, as written. The whole thing — 167 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Unit test starter (Python3 + pytest)
Overview
Generate Python 3 pytest unit tests across a repo, but prefer fewer, durable
tests over breadth. Per
docs/PYTEST_STYLE.md, delete fragile tests
rather than rewriting them, keep individual asserts short, and avoid
asserts on dates, collection sizes, required key lists, hardcoded defaults,
or function names. Route elaborate end-to-end scenarios to tests/e2e/
instead of packing them into pytest. This skill applies the
docs/REPO_STYLE.md "Long-term
over short-term" and "Fix the design, not the symptom" philosophies: a
fragile test that needs constant rewriting is a design smell, not a
maintenance task.
This skill can be slow and may take hours on large repos.
Hard constraints
- Use
tmp_pathfor filesystem behavior that is part of the function contract. Keep filesystem tests isolated to pytest-managed temporary paths. - No network access in tests (no HTTP, sockets, internet APIs).
- Deterministic tests only (no time/randomness unless fully mocked).
- Avoid brittle tests that assert unstable logging/printing unless clearly part of the function contract.
- Avoid fragile assertions on dates, collection sizes, required key lists, hardcoded defaults, function names, or tunable constants.
- Test files and pytest support files are imported, so they do not get shebangs.
Inputs to request
- Whether to scan the entire repo or exclude known folders (for example generated code,
vendored code, or
old/archives). - Whether there are modules that must never be imported during tests (side effects).
- Any existing pytest config (
pytest.ini,pyproject.toml) and whether tests already exist undertests/.
Workflow
- Confirm pytest baseline
- Prefer pytest for Python 3 repos unless the repo clearly uses something else.
- Check for an existing
tests/folder and any pytest config. - If
tests/does not exist, create it.
- Determine repo root and discovery command
- Determine
REPO_ROOTwithgit rev-parse --show-toplevel. - Discover Python files with
rg --filesand iterate in a stable order:rg --files -g "*.py" | sort - Apply reasonable exclusions when needed, for example:
.git/,__pycache__/,.venv/,venv/,build/,dist/,node_modules/.
- Determine
- Choose a one-to-one test file mapping
- Create one pytest file per source file to keep mapping straightforward.
- Naming rule (repo-relative path to ASCII-safe filename):
- Source:
pkg/sub/mod.py - Test:
tests/test_pkg__sub__mod.py
- Source:
- If a source file is untestable under constraints, still create the test module
with a single
pytest.skip(..., allow_module_level=True)explaining why.
- Make imports work (create
tests/conftest.pywhen needed)- Prefer importing modules the same way the repo imports them.
- If tests cannot import local modules (no installed package, no package layout),
create
tests/conftest.pyto addREPO_ROOT(and optionallytests/) tosys.path:""" Pytest config to ensure local imports work without installation. """ from __future__ import annotations # Standard Library import os import sys #============================================ REPO_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) if REPO_ROOT not in sys.path: sys.path.insert(0, REPO_ROOT) TESTS_DIR = os.path.abspath(os.path.dirname(__file__)) if TESTS_DIR not in sys.path: sys.path.insert(0, TESTS_DIR) - Keep
conftest.pyminimal and repo-wide; do not add per-test hacks. - If imports trigger libraries that write caches/config under the user's home
directory (for example matplotlib), set environment variables early in
conftest.pyto redirect them to a temp location (avoid asserting on these side effects in tests; this is only to keep the test environment clean).
- For each Python file: decide whether it is safe to import
- Prefer importable modules over scripts with side effects.
- If import triggers work (CLI execution, network, file reads, subprocess), avoid importing at module import-time and mark the test module skipped with a reason.
- When possible, test by importing specific functions/classes from the module rather than executing the script entrypoint.
- For each function/method: triage testability
- Enumerate functions and methods (top-level
def, and simple class methods). - Skip and document functions that:
- read/write files through uncontrolled paths or depend on existing machine-specific files
- call network/internet (
requests,urllib,http.client,socket, etc.) - spawn processes (
subprocess,os.system) - depend on real time or randomness and cannot be safely mocked
- require complex external services or heavyweight frameworks
- Filesystem functions can be tested when the behavior is clear and all paths are under
tmp_path.
- Enumerate functions and methods (top-level
- Write tests for testable functions (table-driven first)
- Prefer
@pytest.mark.parametrizefor input/output grids. - Cover, at minimum:
- 1 to 3 "core" cases (typical inputs)
- 1 edge case (empty, None, boundary, unusual whitespace, extremes)
- 1 negative case when the function explicitly rejects inputs or raises
- Assertions:
- Use plain
assertfor values/invariants. - Use
pytest.raises(ExpectedError)for exceptions. - Use
match=only when the message is stable and part of the contract. - Prefer one or two meaningful assertions per test.
- Use plain
- Avoid duplicating the full function logic in the test; assert observable results and key branches.
- Prefer
- Keep tests deterministic
- Do not let tests depend on the local machine environment.
- If the module reads environment variables, use
monkeypatchto set them. - If a function depends on
time.time()orrandom.*, monkeypatch those calls so results are stable.
- Run tests incrementally (long-running allowed)
- Prefer targeted runs while generating tests:
source source_me.sh && python -m pytest tests/test_pkg__sub__mod.py - Expect this process to be long on large repos; keep a simple progress log of: file -> functions tested -> functions skipped (with reasons).
- Prefer targeted runs while generating tests:
- Record changes
- If files were created or changed, record the change in
docs/CHANGELOG.mdwhen the file exists.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 8d ago First seen · 167 lines · 50 tokens per session scan A 6cd341e99198
unit-test-starter is a skill published in the GitHub repository vosslab/vosslab-skills (2 stars, last pushed 12d ago), licensed MIT. It adds 50 tokens to every session and 1,796 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
temporal-python-testing
Test Temporal workflows with pytest, time-skipping, and mocking strategies. Covers unit testing, integration testing, replay testing, and local development setup. Use when implementing Temporal workflow tests or debugging test failures.
python-testing
Guidelines for writing and running tests in the Agent Framework Python codebase. Use this when creating, modifying, or running tests.
adk-verify-snippets
Checks that every Python code block in a Markdown file actually compiles and runs, by extracting each block to a temporary file, executing it in an isolated subprocess, and writing a pass/fail report with per-snippet coverage. Use when the user asks to verify, test, or validate the code samples in a README, a guide…
adk-setup
Sets up a local ADK Python development environment in a git clone of the open-source adk-python repository: a uv virtual environment, all dependency extras, pre-commit hooks, and a first unit-test run. Runs only when explicitly requested, never on its own. Use when asked to set up, bootstrap, or repair a development…
test-generator
Generate pytest test cases for Python functions and classes.
test-harness
Generates pytest test suites with happy path, edge cases, error conditions, fixture scaffolding, mocks, async patterns. Triggers on: "generate tests", "write tests for", "test this function", "create test suite", "pytest for", "unit tests for", "mock strategy for".