testing

testing is a skill for Claude Code, Codex from PedroMosquera/squadai. It costs 9 tokens per session (476 once invoked), scanned A, original, MIT.

A structured guide for writing software tests, which are checks that confirm code behaves as expected. It covers test organisation, naming, setup, edge cases, errors, and state changes.

In plain words
What is it for?
Use it when adding tests for functions, methods, public interfaces, filesystem behaviour, invalid input, missing dependencies, timeouts, or side effects.
Why use it?
It helps avoid tests that cover only the happy path or are difficult to understand when they fail. The process makes important behaviour easier to check and maintain.

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

Made for: Claude Code, Codex.

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 testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/pedromosquera/squadai/testing.svg)](https://agentmods.dev/skills/pedromosquera/squadai/testing)
Your own site
<a href="https://agentmods.dev/skills/pedromosquera/squadai/testing"><img src="https://agentmods.dev/badge/skills/pedromosquera/squadai/testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 9 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 476 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.00009 $0.00476
Opus 5 $0.00005 $0.00238
Sonnet 5 $0.00002 $0.00095
Haiku 4.5 $0.00001 $0.00048

Measured 4d ago against content hash 164604472177, 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 4d 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/shared/testing/SKILL.md · 55 lines

What it actually says

Testing Skill

Write tests for the specified code following a structured protocol. Produce thorough, maintainable tests that cover the important behavior.

Steps

  1. Identify what to test: Analyze the code to determine test targets.

    • Public API functions and methods
    • Edge cases: empty inputs, nil/null values, boundary conditions
    • Error paths: invalid input, missing dependencies, timeout conditions
    • State transitions: before/after side effects
  2. Choose test structure: Select the appropriate pattern.

    • Table-driven tests: When testing the same function with multiple inputs.
    • Arrange-Act-Assert (AAA): For single-scenario tests.
    • Given-When-Then: For behavior-focused tests.
  3. Name tests descriptively: Test names should explain the scenario.

    • Format: TestFunctionName_Scenario_ExpectedResult
    • Example: TestValidate_EmptyInput_ReturnsError
    • Failed test names should make the failure obvious without reading the test body.
  4. Set up test fixtures: Prepare the test environment.

    • Use temp directories for filesystem tests.
    • Create minimal fixtures — only what the test needs.
    • Clean up after tests (use deferred cleanup or framework helpers).
  5. Write assertions: Verify behavior clearly.

    • Assert on specific values, not just "no error."
    • Check both positive cases (correct output) and negative cases (expected errors).
    • Verify side effects (file created, state changed) when relevant.
  6. Mock boundaries, not internals: Keep tests focused.

    • Mock external dependencies: HTTP, databases, filesystems, clocks.
    • Do not mock internal functions or private methods.
    • Use interfaces at boundaries to enable test substitution.
  7. Check coverage gaps: Review what is not yet tested.

    • Concurrent access (if applicable).
    • Large inputs or performance-sensitive paths.
    • Integration between components (consider integration tests).

Output Format

Produce test code that:

  • Follows the project's existing test conventions.
  • Includes a brief comment explaining each test's purpose.
  • Groups related tests together.
  • Is runnable without modification.
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. 4d ago First seen · 55 lines · 9 tokens per session scan A 164604472177

Subscribe to this mod's changes

testing is a skill published in the GitHub repository PedroMosquera/squadai (8 stars, last pushed 1mo ago), licensed MIT. It adds 9 tokens to every session and 476 once invoked, about $0.0000 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.

Related

Other skills, from other repositories

browse-and-evaluate

Use when exploring the ai-agent-skills catalog to find, compare, and evaluate skills before installing. Always use --fields to limit output size and --dry-run before committing to an install.

MoizIbnYousaf/Ai-Agent-Skills · 43 tokens

loop-engineering

Shared loop-engineering reference for COG skills - the agent loop, deterministic verifiers, termination conditions, in-loop context management, and named patterns. Invoke when designing or debugging a skill that iterates (search-verify-retry, scan-until-dry, fetch-retry-gate).

huytieu/COG-second-brain · 63 tokens

render-airdrop-carousel

Assemble a viral iOS "AirDrop" notification-carousel video ad (≈6–8s, 9:16) from a brand line plus 6–16 real product photos — a native AirDrop share-sheet card ("Brand would like to share a · Decline / Accept") springs up and its preview window CYCLES through the products, landing on a range/lineup payoff with an…

gooseworks-ai/goose-skills · 207 tokens

render-3d-product-showcase

Assemble a premium 3D product-showcase ad from a config — four beat clips (an orbiting hero rotation, a macro push-in, a physics reveal, a typographic close) normalized to the brand-color canvas, hard-concatenated in order, closed on a deterministic Playwright brand end card, and mixed under one instrumental bed at…

gooseworks-ai/goose-skills · 159 tokens

vfx-text-cursor

Cursor light trail, chromatic rays, and directional flares for word-by-word quote reveals in video intros.

nexu-io/html-video · 28 tokens

pm-all

Skill "pm-all" from wei63w/pm-manager, covering user input, outline and shared workflow (all /pm- commands).

wei63w/pm-manager · 8 tokens