Testing

Testing is a skill for Claude Code from nxtg-ai/forge-plugin. It costs 161 tokens per session (2,877 once invoked), scanned A, original, MIT.

A general guide to writing maintainable tests with assertions that fail when the code is wrong. It covers the test pyramid, arrange-act-assert structure, test doubles, fixtures, and coverage.

In plain words
What is it for?
Use it to write unit and other automated tests, check that they detect real regressions, and set practical quality gates.
Why use it?
It reduces false confidence from tests that always pass, test excessive implementation details, or merely increase reported coverage.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is vi.mock('../discount.js', () => ({ computeDiscount: () => ({ total: 87.5 }) }));.

Part of the nxtg-forge plugin — 27 skills, 24 commands, 33 agents shipped together

Good fit Use it to write unit and other automated tests, check that they detect real regressions, and set practical quality gates.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/nxtg-ai/forge-plugin
agentmods
npx agentmods add skills/nxtg-ai/forge-plugin/testing

Made for: Claude Code.

Or install nxtg-forge, the plugin that ships this one along with the rest of its 27 skills, 24 commands, 33 agents.

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/nxtg-ai/forge-plugin/testing/github.svg)](https://agentmods.dev/skills/nxtg-ai/forge-plugin/testing)
Your own site
<a href="https://agentmods.dev/skills/nxtg-ai/forge-plugin/testing"><img src="https://agentmods.dev/badge/skills/nxtg-ai/forge-plugin/testing/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 Testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/nxtg-ai/forge-plugin/testing"><img src="https://agentmods.dev/badge/skills/nxtg-ai/forge-plugin/testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 161 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,877 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00161 $0.02877
Opus 5.5 $0.00064 $0.01151
Sonnet 5.5 $0.00032 $0.00575
Haiku 4.5 $0.00016 $0.00288

Measured 1mo ago against content hash ca362aaad089, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 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.

plugins/nxtg-forge/skills/testing/SKILL.md · 234 lines

How it starts

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

Testing — Writing Tests That Catch Real Bugs

A test that stays green while the code is broken is worse than no test — it manufactures false confidence. This skill is the construction companion to the crucible-detective agent:

  • crucible-audit skill — detection: the 8 fraud patterns (hollow assertions, mock proliferation, dead tests, coverage-config lies) + the language matrix.
  • testing (this skill) — construction: principles + how to write a test that actually fails on a real bug, in whatever stack the project uses.

Guidance is language-generic; examples cover the stacks Forge users build in — TypeScript/JavaScript, Python, Rust, Go. Match the project before you copy a snippet.

The one rule that makes a test real

Every test must fail when you break the thing it names. Before you trust a new test, prove it: change the production code to be wrong, re-run, confirm RED, then revert. An assertion that survives a deliberately broken implementation is theater.

// THEATER — passes even if computeDiscount() returns garbage
expect(result).toBeDefined();
expect(result.total).toBeTruthy();

// REAL — pins the actual contract; breaks the instant the math changes
expect(result.total).toBe(87.5);
expect(result.appliedRule).toBe('bulk-10pct');
expect(result.lineItems).toHaveLength(3);

Hollow tells to avoid, by stack

crucible-audit hunts these — don't write them. An assertion that cannot fail on a wrong value is not a test.

Stack Never assert only Assert instead
vitest / jest (TS/JS) toBeDefined, toBeTruthy, not.toBeNull exact value, shape (objectContaining), length
node:test (JS) assert.ok(x), assert(x !== null) assert.strictEqual, assert.deepStrictEqual
pytest (Python) assert x is not None, assert x, assert result assert x == expected, assert x.status == "active"
Rust assert!(x.is_some()), assert!(x.is_ok()) assert_eq!(x.unwrap(), expected)
Go if got == nil { t.Fatal(...) } alone if got != want { t.Errorf("got %v, want %v", got, want) }

Read the full file on GitHub · 234 lines

Files

What ships with it

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

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 · 234 lines · 161 tokens per session scan A ca362aaad089

Subscribe to this mod's changes

Testing is a skill published in the GitHub repository nxtg-ai/forge-plugin (6 stars, last pushed 4d ago), licensed MIT. It adds 161 tokens to every session and 2,877 once invoked, about $0.0006 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-09-03.

Related

Other skills, from other repositories

writing-tests

Write unit tests, component tests, and integration tests for AiderDesk using Vitest and React Testing Library. Use when creating new tests, adding test coverage, configuring mocks, setting up test files, or debugging failing tests.

hotovo/aider-desk · 48 tokens

architecture-patterns

Architecture validation and patterns for clean architecture, backend structure enforcement, project structure validation, test standards, and context-aware sizing. Use when designing system boundaries, enforcing layered architecture, validating project structure, defining test standards, or choosing the right…

yonatangross/orchestkit · 56 tokens

testing-llm

LLM and AI testing patterns — mock responses, evaluation with DeepEval/RAGAS, structured output validation, and agentic test patterns (generator, healer, planner). Use when testing AI features, validating LLM outputs, or building evaluation pipelines.

yonatangross/orchestkit · 55 tokens

testing-unit

Unit testing patterns for isolated business logic tests — AAA pattern, parametrized tests (test.each, @pytest.mark.parametrize), fixture scoping (function/module/session), mocking with MSW/VCR at network level, and test data management with factories (FactoryBoy, faker-js). Use when writing unit tests, setting up…

yonatangross/orchestkit · 95 tokens

testing-patterns

Redirect — testing-patterns was split into 5 focused sub-skills. Use when looking for testing-patterns, writing tests, or test automation. Redirects to testing-unit, testing-e2e, testing-integration, testing-llm, or testing-perf.

yonatangross/orchestkit · 59 tokens

coder-self-review

Deterministic self-evaluation rubric for Coder — scored every run using the GRASP framework.

ntorga/agent-starter-kit · 24 tokens