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 AsyrafHussin/agent-skills --skill testing-best-practicesgit clone --depth 1 https://github.com/AsyrafHussin/agent-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/asyrafhussin/agent-skills/testing-best-practices)<a href="https://agentmods.dev/skills/asyrafhussin/agent-skills/testing-best-practices"><img src="https://agentmods.dev/badge/skills/asyrafhussin/agent-skills/testing-best-practices/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/asyrafhussin/agent-skills/testing-best-practices"><img src="https://agentmods.dev/badge/skills/asyrafhussin/agent-skills/testing-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk pass
- NVIDIA SkillSpector pass
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.00058 | $0.01187 |
| Opus 5 | $0.00029 | $0.00593 |
| Sonnet 5 | $0.00012 | $0.00237 |
| Haiku 4.5 | $0.00006 | $0.00119 |
Grade A, and why
testing-best-practices 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 10d 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 — 159 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Testing Best Practices
Unit testing, integration testing, and TDD principles for reliable, maintainable test suites. Contains 34 rules across 7 categories using TypeScript with Jest/Vitest.
Metadata
- Version: 2.0.0
- Rule Count: 34 rules across 7 categories
- License: MIT
When to Apply
Reference these guidelines when:
- Writing unit or integration tests
- Reviewing test code quality
- Improving test coverage strategy
- Setting up testing infrastructure
- Debugging flaky or slow tests
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Test Structure | CRITICAL | struct- |
| 2 | Test Isolation | CRITICAL | iso- |
| 3 | Assertions | HIGH | assert- |
| 4 | Test Data | HIGH | data- |
| 5 | Mocking | MEDIUM | mock- |
| 6 | Coverage | MEDIUM | cov- |
| 7 | Performance | LOW | perf- |
Quick Reference
1. Test Structure (CRITICAL)
struct-aaa-pattern- Arrange, Act, Assert patternstruct-descriptive-names- Descriptive test namesstruct-one-assertion- One logical assertion per teststruct-describe-it- Organized test suites with describe/itstruct-given-when-then- BDD style when appropriatestruct-setup-teardown- Proper setup and teardown
2. Test Isolation (CRITICAL)
iso-independent-tests- Tests run independentlyiso-no-shared-state- No shared mutable stateiso-deterministic- Same result every runiso-no-order-dependency- Run in any orderiso-cleanup- Clean up after testsiso-test-doubles- Strategic use of test doubles
3. Assertions (HIGH)
assert-specific- Use specific assertionsassert-meaningful-messages- Helpful failure messagesassert-expected-actual- Expected value firstassert-no-magic-numbers- Use named constantsassert-custom-matchers- Custom matchers for domain logic
4. Test Data (HIGH)
data-factories- Use factories for test datadata-builders- Builder pattern for complex objectsdata-faker- Generate realistic fake datadata-minimal- Minimal test datadata-realistic- Realistic edge casesdata-fixtures- Manage test fixtures
What ships with it
39 files 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.
- AGENTS.md 140 KB
- metadata.json 1.5 KB
- README.md 1.6 KB
- rules/_sections.md 2.3 KB
- rules/_template.md 1.3 KB
- rules/assert-custom-matchers.md 5.4 KB
- rules/assert-expected-actual.md 3.3 KB
- rules/assert-meaningful-messages.md 4.7 KB
- rules/assert-no-magic-numbers.md 4.7 KB
- rules/assert-specific.md 4.2 KB
- rules/cov-edge-cases.md 4.1 KB
- rules/cov-meaningful.md 4.1 KB
- rules/cov-not-100-percent.md 4.1 KB
- rules/cov-unhappy-paths.md 4.5 KB
- rules/data-builders.md 5.0 KB
- rules/data-factories.md 5.7 KB
- rules/data-faker.md 5.2 KB
- rules/data-fixtures.md 5.4 KB
- rules/data-minimal.md 5.0 KB
- rules/data-realistic.md 5.5 KB
- rules/iso-cleanup.md 4.7 KB
- rules/iso-deterministic.md 4.5 KB
- rules/iso-independent-tests.md 3.1 KB
- rules/iso-no-order-dependency.md 4.2 KB
- rules/iso-no-shared-state.md 3.6 KB
- rules/iso-test-doubles.md 6.2 KB
- rules/mock-boundaries.md 3.3 KB
- rules/mock-minimal.md 3.8 KB
- rules/mock-realistic.md 4.4 KB
- rules/mock-verify-interactions.md 3.7 KB
- rules/perf-fast-unit.md 4.1 KB
- rules/perf-parallel.md 4.8 KB
- rules/perf-test-organization.md 4.0 KB
- rules/struct-aaa-pattern.md 2.2 KB
- rules/struct-describe-it.md 3.1 KB
- rules/struct-descriptive-names.md 2.3 KB
- rules/struct-given-when-then.md 3.2 KB
- rules/struct-one-assertion.md 3.1 KB
- rules/struct-setup-teardown.md 3.8 KB
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.
- 10d ago First seen · 159 lines · 58 tokens per session scan A db03e7c0afa7
testing-best-practices is a skill published in the GitHub repository AsyrafHussin/agent-skills (74 stars, last pushed 13d ago), licensed MIT. It adds 58 tokens to every session and 1,187 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-30.
Other skills, from other repositories
python-testing
Python testing strategies using pytest, TDD methodology, fixtures, mocking, parametrization, and coverage requirements.
tdd-workflow
Use this skill when writing new features, fixing bugs, or refactoring code. Enforces test-driven development with 70%+ coverage including unit, integration, and E2E tests.
testing
A guide to software testing, including unit tests for small pieces of code, integration tests for connected parts, and functional tests for complete behaviours. It also explains TDD, a method where tests are written before the code.
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.