Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/benshapyro/cadre-devkit-claudenpx agentmods add skills/benshapyro/cadre-devkit-claude/test-generatorWrote 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/benshapyro/cadre-devkit-claude/test-generator)<a href="https://agentmods.dev/skills/benshapyro/cadre-devkit-claude/test-generator"><img src="https://agentmods.dev/badge/skills/benshapyro/cadre-devkit-claude/test-generator.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.00053 | $0.01660 |
| Opus 5 | $0.00026 | $0.00830 |
| Sonnet 5 | $0.00011 | $0.00332 |
| Haiku 4.5 | $0.00005 | $0.00166 |
Grade A, and why
test-generator 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 7d 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 — 299 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Test Generator Skill
Generate high-quality tests using Jest (JavaScript/TypeScript) or Pytest (Python) following established best practices.
Test Frameworks
- JavaScript/TypeScript: Jest
- Python: Pytest
Test Directory Structure
- Place tests in
__tests__/ortests/directories - Mirror source structure in test directories
- Use clear, descriptive test file names
JavaScript/TypeScript:
src/
utils/
validator.ts
__tests__/
utils/
validator.test.ts
Python:
src/
utils/
validator.py
tests/
utils/
test_validator.py
Test Writing Standards
Coverage Requirements
- Include at least one negative test per feature
- Test edge cases and boundary conditions
- Aim for high coverage but prioritize quality over quantity
Test Structure
Follow the Arrange-Act-Assert pattern:
// Jest example
describe('functionName', () => {
it('should handle valid input correctly', () => {
// Arrange
const input = 'valid';
// Act
const result = functionName(input);
// Assert
expect(result).toBe(expected);
});
it('should throw error for invalid input', () => {
// Negative test case
expect(() => functionName(null)).toThrow();
});
});
# Pytest example
class TestFunctionName:
def test_valid_input(self):
# Arrange
input_val = 'valid'
# Act
result = function_name(input_val)
# Assert
assert result == expected
def test_invalid_input_raises_error(self):
# Negative test case
with pytest.raises(ValueError):
function_name(None)
Test Naming
- Use descriptive names that explain what's being tested
- Format:
test_<what>_<condition>_<expected_result> - Examples:
test_user_login_with_valid_credentials_returns_tokentest_api_call_with_invalid_auth_raises_401
Test Quality Checklist
- Tests are independent and can run in any order
- Each test has a single, clear purpose
- Mock external dependencies (APIs, databases, file systems)
- Include both positive and negative test cases
- Test error handling and edge cases
- Use meaningful assertion messages
- Tests are fast and deterministic
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.
- 7d ago First seen · 299 lines · 53 tokens per session scan A 80895425e9f3
test-generator is a skill published in the GitHub repository benshapyro/cadre-devkit-claude (9 stars, last pushed 9mo ago), licensed MIT. It adds 53 tokens to every session and 1,660 once invoked, about $0.0003 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-31.
Other skills, from other repositories
migrate-xunit-to-xunit-v3
Migrate .NET test projects from xUnit.net v2 to xunit.v3 and fix v3 breaks. Use for package/CPM conversion, OutputType=Exe, preserving the VSTest or MTP runner (including projects currently using YTest.MTP.XUnit2), incompatible TFMs, async void tests, string-to-Type attributes, custom Fact/Theory/BeforeAfterTest…
go-testing
Trigger: Go tests, go test coverage, Bubbletea teatest, golden files. Apply focused Go testing patterns.
nw-fp-clojure
Clojure language-specific patterns, data-first modeling, REPL-driven development, and spec.
restore-internals-seams-in-finally-blocks-after-each-test
When delegating a task affected by this skill, include.
mobiai-ios-testing
Use when writing or running tests in an iOS project — unit tests, UI tests, snapshot tests, choosing the right framework.
testing-llm
LLM and AI testing patterns — mock responses, evaluation with DeepEval/RAGAS, structured output validation, and agentic test patterns (generator, healer, planner). Use when testing AI features, validating LLM outputs, or building evaluation pipelines.