Testing

Testing guidance for checking software at several levels, from individual functions to complete user workflows, while using TDD, or test-driven development.

In plain words
What is it for?
Use it to plan unit, integration, and end-to-end tests, improve coverage, and build tests before or alongside the code they verify.
Why use it?
It helps catch defects early and keeps tests organized by speed, scope, and cost instead of relying only on slow full-system checks.

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/saolalab/clawforce/testing
Any agent
npx skills add saolalab/clawforce --skill testing
Clone the repo
git clone --depth 1 https://github.com/saolalab/clawforce

Made for: Claude Code, Codex.

Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,783 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.00018 $0.01783
Opus 5 $0.00009 $0.00892
Sonnet 5 $0.00004 $0.00357
Haiku 4.5 $0.00002 $0.00178

Measured 2d ago against content hash 78d455fa0aaf, 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.

marketplace/roles/software-engineer/workspace/skills/testing/SKILL.md · 277 lines

How it starts

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

Testing Skill

Testing Pyramid

The testing pyramid represents the ideal distribution of tests:

        /\
       /  \      E2E Tests (few, slow, expensive)
      /____\
     /      \    Integration Tests (some, medium speed)
    /________\
   /          \  Unit Tests (many, fast, cheap)
  /____________\

Unit Tests

  • What: Test individual functions/methods in isolation
  • Speed: Fast (milliseconds)
  • Quantity: Many (80%+ of tests)
  • Scope: Single function/class
  • Dependencies: Mocked/stubbed
  • Example: Test calculateTotal() with various inputs

Integration Tests

  • What: Test interactions between components/modules
  • Speed: Medium (seconds)
  • Quantity: Some (15% of tests)
  • Scope: Multiple components working together
  • Dependencies: Real databases, APIs, or services (may use test doubles)
  • Example: Test API endpoint with database, test service layer with repository

End-to-End (E2E) Tests

  • What: Test complete user workflows
  • Speed: Slow (minutes)
  • Quantity: Few (5% of tests)
  • Scope: Entire system
  • Dependencies: Real infrastructure (or close to it)
  • Example: Test user registration → login → purchase flow

Test Naming Conventions

Structure: should [expected behavior] when [condition]

Good Examples:

  • should return 0 when given empty array
  • should throw error when user is not authenticated
  • should calculate tax correctly when order total exceeds 100
  • should send email when user signs up

Bad Examples:

  • test1, testCalculate, testUser (too vague)
  • should work (doesn't describe behavior)
  • test_calculate_total_with_items (missing "should" structure)

Language-Specific Patterns

JavaScript/TypeScript (Jest):

describe('calculateTotal', () => {
  it('should return 0 when given empty array', () => {
    // ...
  });
  
  it('should sum all item prices correctly', () => {
    // ...
  });
});

Python (pytest):

def test_should_return_zero_when_given_empty_array():
    # ...

def test_should_sum_all_item_prices_correctly():
    # ...

Read the full file on GitHub · 277 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 · 277 lines · 18 tokens per session scan A 78d455fa0aaf

Subscribe to this mod's changes

Testing is a skill published in the GitHub repository saolalab/clawforce (38 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 18 tokens to every session and 1,783 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-30.

Related

Other skills, from other repositories

software-test-creation

Write failing tests for a TDD slice based on acceptance criteria and codebase conventions. Use when the "red" phase of red-green-refactor requires tests that define expected behavior before implementation exists. Discovers codebase test conventions first, writes test files that compile or parse but fail because the…

stencila/stencila · 82 tokens

Test Driven Development

Strict Red-Green-Refactor implementation methodology for high quality, regression-free software.

ankur-gaurav161418/omniforge · 21 tokens

test-generator

Generate comprehensive unit, integration, and end-to-end tests. Use when adding test coverage, writing tests for new features, or improving existing test suites.

asgarovf/locusai · 33 tokens

test-driven-development

Use this skill when developing new features using TDD. It guides through writing failing tests first, then implementing code to pass them.

ApexIQ/skillsmith · 30 tokens

tdd

Use this skill to practice test-driven development — writing tests before implementation, using tests to drive design, and validating implementation against pre-written tests. Activates when implementing new functionality, refactoring code, or fixing bugs where regression coverage is needed.

karthikrshet/aiskills · 53 tokens

nw-at-completeness-check

Canonical AT completeness gate — research-anchored 7-category taxonomy (C1-C7) + 15-item mechanical checklist. Paradigm-neutral. Drives acceptance-designer reviewer verdict deterministically.

nWave-ai/nWave · 46 tokens