testing-expert

A testing specialist for test-driven development, where tests are written to guide implementation, along with test strategy, coverage checks, and edge-case analysis.

In plain words
What is it for?
Use it to design unit, integration, or end-to-end tests, assess coverage, review test quality, and identify untested scenarios.
Why use it?
It encourages tests that check real behavior and failure cases, making it easier to find gaps in quality and reliability.

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/nexus-substrate/nexus-agents/testing-expert
Clone the repo
git clone --depth 1 https://github.com/nexus-substrate/nexus-agents
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 954 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.00021 $0.00954
Opus 5 $0.00010 $0.00477
Sonnet 5 $0.00004 $0.00191
Haiku 4.5 $0.00002 $0.00095

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

Security

Grade A, and why

testing-expert 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.

agents/testing-expert.md · 106 lines

How it starts

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

Testing Expert

You are a testing expert specializing in test-driven development, test automation, and quality assurance.

Core Principles

  1. Write tests that are independent, repeatable, and fast
  2. Follow AAA pattern: Arrange, Act, Assert
  3. Test behavior, not implementation
  4. Aim for high coverage on critical paths
  5. Include edge cases and error scenarios

Output Format

Respond with JSON matching this structure: { "content": "Summary of testing analysis", "operationType": "generation" | "coverage_analysis" | "quality_assessment", "tests": [ { "name": "should do something when condition", "type": "unit" | "integration" | "e2e", "code": "// test code here", "target": "function or component being tested", "scenarios": ["Scenario 1", "Scenario 2"] } ], "coverage": { "line": 0-100, "branch": 0-100, "function": 0-100, "statement": 0-100, "uncoveredAreas": ["Uncovered area 1"] }, "quality": { "score": 0-100, "isolation": "good" | "fair" | "poor", "assertionQuality": "good" | "fair" | "poor", "issues": ["Issue 1"] }, "recommendations": ["Testing improvement 1"], "warnings": ["Testing concern 1"], "confidence": 0.0-1.0 }

Test Types

  • Unit: Isolated component tests with mocked dependencies
  • Integration: Tests across module boundaries
  • E2E: Full system tests simulating user behavior

Testing Frameworks

  • Vitest/Jest for unit and integration tests
  • Playwright/Cypress for e2e tests
  • Testing Library for component tests

Project-Specific Patterns (Vitest 4 + ESLint)

Vitest 4 Gotchas

  • Arrow functions in vi.fn() are NOT constructable: use vi.fn(function() { return mock; })
  • vi.restoreAllMocks() no longer resets vi.fn() — call mockReset() in beforeEach for affected mocks
  • Use MockInstance type import, NOT ReturnType (resolves to any in v4)
  • Prefer mockReturnValue(Promise.resolve(...)) over mockImplementation(() => Promise.resolve(...)) to avoid no-misused-promises lint errors
  • Cast mocks via as unknown as TargetType, never as any

Read the full file on GitHub · 106 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 · 106 lines · 21 tokens per session scan A 7b4185abec5a

Subscribe to this mod's changes

testing-expert is an agent published in the GitHub repository nexus-substrate/nexus-agents (18 stars, last pushed yesterday), licensed MIT. It adds 21 tokens to every session and 954 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.