testing

A guide to testing software by checking its behavior, including normal cases, errors, boundary conditions, and connections to other systems.

In plain words
What is it for?
Use it to plan test coverage, apply test-first patterns, and identify edge cases such as empty input, large values, timeouts, and concurrent access.
Why use it?
It helps focus tests on meaningful paths instead of chasing a high line-coverage percentage or testing implementation details.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/sefaertunc/worclaude/testing
Any agent
npx skills add sefaertunc/Worclaude --skill testing
Clone the repo
git clone --depth 1 https://github.com/sefaertunc/Worclaude

Made for: Claude Code, Codex.

Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 935 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00017 $0.00935
Opus 5 $0.00009 $0.00467
Sonnet 5 $0.00003 $0.00187
Haiku 4.5 $0.00002 $0.00093

Measured 2d ago against content hash a36636b4f3e0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

testing 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 2d 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.

.claude/skills/testing/SKILL.md · 125 lines

How it starts

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

Testing

What to Test

Test behavior, not implementation. A test should verify what a function does, not how it does it. If you refactor the internals and the test breaks, the test was testing the wrong thing.

Good test: "given a valid email, returns true" Bad test: "calls regex.match with pattern /^[a-z].../"

Meaningful Coverage vs Line Coverage

100% line coverage is a vanity metric. You can have 100% coverage and still ship bugs if your tests don't exercise meaningful paths.

Focus coverage on:

  • Business logic (the rules that make your app unique)
  • Error handling paths (what happens when things go wrong)
  • Boundary conditions (empty, null, max values, off-by-one)
  • Integration points (where your code meets external systems)

Skip coverage on:

  • Simple getters/setters
  • Framework boilerplate
  • Generated code
  • Pure delegation (functions that just call another function)

Edge Cases Worth Testing

Every function has these potential edge cases. Consider which apply:

  • Null / undefined / empty string
  • Empty array / empty object
  • Single element
  • Very large input
  • Negative numbers / zero
  • Unicode and special characters
  • Concurrent access
  • Network timeout / failure

You don't need to test ALL of these for every function. Think about which ones are realistic for your specific case.

Test-First Workflow

Writing tests first helps when:

  • The behavior is well-defined but the implementation isn't clear
  • You're fixing a bug (write the failing test first, then fix)
  • You're implementing a spec (tests become the spec's executable form)

Test-first hurts when:

  • You're exploring and don't know what the API should look like
  • You're prototyping and will throw the code away
  • The test would be trivial (testing that a constant equals itself)

When doing test-first: write the test, watch it fail, implement the minimum to pass, then refactor. Don't write all the tests up front — go one at a time.

Test Structure

Follow Arrange-Act-Assert (AAA):

// Arrange: set up the test conditions
const input = createValidInput();

// Act: call the thing being tested
const result = processInput(input);

// Assert: verify the outcome
expect(result.status).toBe('success');

Read the full file on GitHub · 125 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. 2d ago First seen · 125 lines · 17 tokens per session scan A a36636b4f3e0

Subscribe to this mod's changes

testing is a skill published in the GitHub repository sefaertunc/Worclaude (4 stars, last pushed 23d ago), licensed MIT. It adds 17 tokens to every session and 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-08-31.