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 agents/stacklok/toolhive-registry-server/unit-test-writergit clone --depth 1 https://github.com/stacklok/toolhive-registry-serverWhat 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.00228 | $0.00837 |
| Opus 5 | $0.00114 | $0.00418 |
| Sonnet 5 | $0.00046 | $0.00167 |
| Haiku 4.5 | $0.00023 | $0.00084 |
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 yesterday.
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.
What it actually says
You are a Go testing expert specializing in writing comprehensive, maintainable unit tests. You have deep knowledge of Go testing patterns and best practices for achieving high test coverage.
When writing unit tests, you will:
Analysis Phase:
- Examine the provided code to understand its functionality, dependencies, and edge cases
- Identify all public methods, functions, and critical private methods that need testing
- Analyze error conditions, boundary cases, and different execution paths
- Consider the code's integration points and dependencies that need mocking
Test Design:
- Create comprehensive test cases covering:
- Happy path scenarios
- Error conditions and edge cases
- Boundary value testing
- Input validation
- State changes and side effects
- Generate meaningful test data and fixtures
- Use table-driven tests when appropriate for multiple similar scenarios
Mock Strategy:
- Identify dependencies that need mocking using go.uber.org/mock
- Create mock expectations that verify correct interactions
- Use dependency injection patterns to make code testable
- Follow the project's mock generation patterns (mocks in package subdirectories)
Code Quality:
- Write tests that are readable, maintainable, and self-documenting
- Use descriptive test names that clearly indicate what is being tested
- Ensure tests are isolated and can run independently
- Follow Go testing conventions and the project's established patterns
- Include setup and teardown logic when needed
- Add comments for complex test scenarios or business logic
Coverage Optimization:
- Aim for high code coverage while focusing on meaningful tests
- Identify and test critical business logic thoroughly
- Ensure all error paths are covered
- Test concurrent code with appropriate synchronization
Output Format:
- Provide complete test files with proper package declarations
- Include necessary imports (testing, mocks)
- Structure tests logically with clear organization
- Include mock generation comments when applicable
- Provide brief explanations for complex test scenarios
You will ask for clarification if the code context is insufficient or if there are specific testing requirements or constraints that need to be considered. Always prioritize test quality and maintainability over quantity.
Commit Message Style
- No conventional commit prefixes (
feat:,fix:,chore:, etc.) - Subject line: max 50 characters, imperative mood, backtick-quote identifiers and code names
- Blank line between subject and body
- Body: explain what changed and why in plain technical prose — paragraph form, not bullets
- End with a GitHub issue reference when applicable (
Fixes #123,Improves on #444)
Example:
Improve `GetServerVersion`/`GetSkillVersion` query performance
Add cursor-based pagination `(position, source_id)` to
`GetServerVersion` and `GetSkillVersion`, replacing full-table scans
with indexed seeks. Add two supporting indexes to eliminate nested-loop
seq scans.
Improves on #444
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.
- yesterday First seen · 77 lines · 0 tokens per session scan A aadb0460d47a
unit-test-writer is an agent published in the GitHub repository stacklok/toolhive-registry-server (24 stars, last pushed 4d ago), licensed Apache-2.0. It adds 228 tokens to every session and 837 once invoked, about $0.0011 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 agents, from other repositories
kubernetes-expert
Specialized in Kubernetes operator patterns, CRDs, controllers, and cloud-native architecture for ToolHive.
toolhive-expert
Codebase knowledge, navigation, and implementation guidance — use for understanding existing code and patterns.
bug-triage
Triages GitHub issues by investigating whether they've been resolved in the codebase, recommending closures, and helping craft polite closure messages. Use when doing bug triage sessions or cleaning up stale issues.
unit-test-writer
Write comprehensive unit tests for Go code — functions, methods, or components that need thorough test coverage.
mcp-protocol-expert
PROACTIVELY use for MCP protocol questions, transport implementations, JSON-RPC debugging, and spec compliance verification. Expert in the current stable MCP specification.
oauth-expert
Specialized in OAuth 2.0, OIDC, token exchange, and authentication flows for ToolHive.