testing

A coding agent that writes and reviews automated tests for services, user-interface components, and helper functions. It detects whether a project uses Vitest, Jest, or pytest and follows the project’s existing testing style.

In plain words
What is it for?
Use it to create tests, investigate flaky tests, check coverage, and test code using Vitest, Jest, or pytest.
Why use it?
It reduces the work of starting a test suite and helps cover normal behavior, errors, and edge cases. It also checks that test doubles, called mocks, match the real interfaces used by the code.

Agent

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 agents/nxtg-ai/forge-plugin/testing
Clone the repo
git clone --depth 1 https://github.com/nxtg-ai/forge-plugin
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,046 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.00000 $0.02046
Opus 5 $0.00000 $0.01023
Sonnet 5 $0.00000 $0.00409
Haiku 4.5 $0.00000 $0.00205

Measured yesterday against content hash 4f3591fe4ed1, 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 yesterday.

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.

docs/agents/testing.md · 145 lines

How it starts

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

Testing

Generates comprehensive test suites, diagnoses flaky tests, and enforces coverage standards -- with enforcement rules that catch the bugs "all tests pass" misses.

Level L1 Vibe Coder
Category Domain Specialist
Model Sonnet

What It Does

The Testing agent writes tests so you do not have to start from scratch. Hand it a new service class, React component, or utility function, and it generates tests covering happy paths, error cases, and edge cases with properly shaped mocks. It detects your testing framework (Vitest, Jest, pytest) and generates tests that match your existing patterns -- same import style, same assertion library, same file naming convention.

What elevates this agent beyond "generate a test" is its enforcement rules. MOCK_SHAPE_SYNC ensures that every mock object matches the actual production code's usage patterns. If your service accesses this.api.interceptors.request.use(), the Testing agent verifies the mock has interceptors.request.use as a callable function. This catches the class of bug where tests pass because they test a mock, not the real interface. TYPECHECK_ZERO_TOLERANCE ensures generated tests compile cleanly -- no implicit any on callback parameters, no missing properties on mock types. AUTH_E2E_GUARD ensures end-to-end tests for protected routes include authentication setup.

The Testing agent also diagnoses flaky tests. It identifies the three common causes -- timing issues (async race conditions, missing await), order dependence (shared mutable state between tests), and external dependence (network calls, file system, time-of-day) -- and applies targeted fixes. For timing issues, it adds proper async/await and fake timers. For order dependence, it isolates state in beforeEach. For external dependence, it introduces mocks with proper cleanup.

When to Use It

  • After writing new code: When you have implemented a service, component, or module and need tests generated from its public API surface.
  • When coverage is below target: When you need to close coverage gaps and want the Testing agent to identify untested files and generate tests for them, prioritized by criticality.
  • When tests are flaky: When tests pass sometimes and fail other times, and you need systematic diagnosis and fixes rather than trial-and-error.
  • When setting up test infrastructure: When a project needs testing configured from scratch -- framework setup, config files, CI integration, test utilities.

Read the full file on GitHub · 145 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. yesterday First seen · 145 lines · 0 tokens per session scan A 4f3591fe4ed1

Subscribe to this mod's changes

testing is an agent published in the GitHub repository nxtg-ai/forge-plugin (5 stars, last pushed 12d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,046 tokens. 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.