test-code

test-code is a skill for Claude Code from urmzd/dotfiles. It costs 101 tokens per session (2,625 once invoked), scanned A, original, Apache-2.0.

A testing guide covering common ways to check software, such as testing one function, testing connected parts, checking complete user flows, and trying many generated inputs. It also gives language-specific advice for Rust, Go, Python, and TypeScript.

In plain words
What is it for?
Use it when writing tests, reviewing what is missing, arranging test files and sample data, creating test infrastructure, or choosing between unit, integration, property-based, benchmark, smoke, and end-to-end tests.
Why use it?
It helps teams test meaningful behaviour instead of tying tests to internal code details or chasing a misleading percentage of covered lines. It also helps decide which tests belong in automated checks.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it when writing tests, reviewing what is missing, arranging test files and sample data, creating test infrastructure, or choosing between unit, integration, property-based, benchmark, smoke, and end-to-end tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/urmzd/dotfiles/test-code
Install

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.

Any agent
npx skills add urmzd/dotfiles --skill test-code
Clone the repo
git clone --depth 1 https://github.com/urmzd/dotfiles

Made for: Claude Code.

Wrote 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.

agentmods badge for test-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/urmzd/dotfiles/test-code/github.svg)](https://agentmods.dev/skills/urmzd/dotfiles/test-code)
Your own site
<a href="https://agentmods.dev/skills/urmzd/dotfiles/test-code"><img src="https://agentmods.dev/badge/skills/urmzd/dotfiles/test-code/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.

agentmods 80×15 button for test-code

Your own site · 80×15
<a href="https://agentmods.dev/skills/urmzd/dotfiles/test-code"><img src="https://agentmods.dev/badge/skills/urmzd/dotfiles/test-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,625 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00101 $0.02625
Opus 5.5 $0.00040 $0.01050
Sonnet 5.5 $0.00020 $0.00525
Haiku 4.5 $0.00010 $0.00263

Measured 1mo ago against content hash ce3c259ac0c8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

test-code 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 1mo 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.

dot_agents/skills/test-code/SKILL.md · 230 lines

How it starts

The opening of the file, as written. The whole thing — 230 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Testing Practices

Philosophy

Test your software, or your users will.

  • Test against contracts, not implementations assert what it should do, not how it does it. Tests that break on every refactor are coupling to internals.
  • State coverage > line coverage exercise meaningful paths and edge cases, not just lines. We intentionally use no coverage tools; percentage targets create false confidence.
  • Tests are the first users of your API if tests are hard to write, the design is wrong. Refactor the interface, not the test.
  • Property-based testing finds edges you didn't think of complement example-based tests with fuzz and property tests where the input space is large.
  • Tests should be boring a test that's hard to read is a test nobody trusts. Inline data, obvious assertions, no clever abstractions.

See review-design for the underlying Pragmatic Programmer principles (design by contract, pragmatic paranoia).

Test Types

Type What It Verifies When to Use Codebase Example
Unit Single function/module in isolation Always. Every public function. sr/crates/sr-core/src/version.rs. #[cfg(test)] mod tests
Integration Multiple modules working together Cross-layer interactions, real I/O sr/crates/sr-git/tests/integration.rs. TempDir + real git CLI
Snapshot/Golden Output hasn't changed unexpectedly Templates, code generation, formatters incipit/generators/golden_test.go. -update flag to regenerate
Fuzz No panics/crashes on arbitrary input Parsers, deserializers, sanitizers incipit/resume/adapter_fuzz_test.go. Go native testing.F
Property-based Invariants hold for generated inputs Mathematical properties, roundtrip encode/decode Use proptest (Rust), testing/quick (Go), hypothesis (Python)
Benchmark Performance characteristics Hot paths, algorithms, throughput linear-gp/crates/lgp/benches/. criterion framework
Smoke Basic environment sanity CI gate, post-deploy check linear-gp/crates/lgp/tests/smoke_tests.rs. 2 generations, no crash
E2E Full system from user perspective Critical user flows teasr CI. real Chrome + xvfb-run dogfood

Read the full file on GitHub · 230 lines

Changes

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.

  1. 1mo ago First seen · 230 lines · 101 tokens per session scan A ce3c259ac0c8

Subscribe to this mod's changes

test-code is a skill published in the GitHub repository urmzd/dotfiles (5 stars, last pushed 6d ago), licensed Apache-2.0. It adds 101 tokens to every session and 2,625 once invoked, about $0.0004 per session on Opus 5.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.