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 matteocervelli/llms --skill unit-test-writergit clone --depth 1 https://github.com/matteocervelli/llmsWrote 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/matteocervelli/llms/unit-test-writer)<a href="https://agentmods.dev/skills/matteocervelli/llms/unit-test-writer"><img src="https://agentmods.dev/badge/skills/matteocervelli/llms/unit-test-writer/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/matteocervelli/llms/unit-test-writer"><img src="https://agentmods.dev/badge/skills/matteocervelli/llms/unit-test-writer.svg" alt="Reviewed on agentmods" width="80" 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.00027 | $0.03935 |
| Opus 5 | $0.00014 | $0.01968 |
| Sonnet 5 | $0.00005 | $0.00787 |
| Haiku 4.5 | $0.00003 | $0.00394 |
Grade A, and why
unit-test-writer 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.
How it starts
The opening of the file, as written. The whole thing — 747 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Unit Test Writer Skill
Purpose
This skill provides systematic guidance for writing comprehensive, maintainable unit tests that achieve high coverage and follow best practices across multiple programming languages.
When to Use
- Need to create unit tests for new code
- Want to improve existing test coverage
- Need guidance on test structure and organization
- Writing tests following TDD methodology
- Ensuring proper mocking and fixtures
Unit Testing Principles
Test Structure: Arrange-Act-Assert (AAA)
Every test should follow this clear pattern:
def test_feature_condition_expected():
"""Clear test description."""
# Arrange: Setup test data and dependencies
input_data = create_test_data()
mock_dependency = setup_mock()
# Act: Execute the code under test
result = function_under_test(input_data, mock_dependency)
# Assert: Verify expected outcomes
assert result.status == "success"
mock_dependency.method.assert_called_once()
Test Naming Conventions
Python (pytest):
- Pattern:
test_<function>_<condition>_<expected_result> - File:
test_<source_file_name>.py - Examples:
test_create_user_valid_data_returns_usertest_validate_email_invalid_format_raises_errortest_process_data_empty_input_returns_empty_list
JavaScript/TypeScript (Jest):
- Pattern:
should <expected behavior> when <condition> - File:
<source_file_name>.test.tsor<source_file_name>.test.js - Examples:
should return user when valid data providedshould throw error when email format is invalidshould return empty list when input is empty
Coverage Goals
- Overall coverage: ≥ 80%
- Critical business logic: ≥ 90%
- Error handling paths: 100%
- Utility functions: ≥ 85%
Unit Testing Workflow
1. Analyze Code to Test
Read and understand the source:
# Read the source file
cat src/module/feature.py
# Identify:
# - Functions and classes to test
# - Dependencies and external calls
# - Error conditions and edge cases
# - Input validation requirements
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.
- 5d ago First seen · 747 lines · 27 tokens per session scan A 27d2c87ff54a
unit-test-writer is a skill published in the GitHub repository matteocervelli/llms (25 stars, last pushed 3mo ago), licensed MIT. It adds 27 tokens to every session and 3,935 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-03.
Other skills, from other repositories
write-vibe-tests
Write or refactor Mistral Vibe tests with proper decoupling. Use when adding behavior coverage, testing ports/adapters, replacing brittle mocks, creating fakes, adding characterization tests before refactors, or changing tests under tests/ for vibe/core, vibe/cli, vibe/acp, tools, config, sessions, skills, hooks, MCP…
composing-matchers
Build compound Gomega assertions by combining matchers — And/SatisfyAll (all pass), Or/SatisfyAny (any pass), Not (negate), WithTransform to map the actual before matching, Satisfy for an ad-hoc predicate, HaveValue to dereference pointers/interfaces, HaveField for struct fields and method results, HaveEach for every…
nw-fp-clojure
Clojure language-specific patterns, data-first modeling, REPL-driven development, and spec.
nw-fp-fsharp
F# language-specific patterns, Railway-Oriented Programming, and Computation Expressions.
nw-fp-kotlin
Kotlin language-specific patterns with Arrow, Raise DSL, and coroutine-based effects.
nw-mutation-test
Runs feature-scoped mutation testing to validate test suite quality. Use after implementation to verify tests catch real bugs (kill rate >= 80%).