testing-agent

testing-agent is an agent for Cursor from girijashankarj/cursor-handbook. It costs 15 tokens per session (519 once invoked), scanned A, original, MIT.

A testing agent that writes tests and improves coverage using the project's testing framework. It also supports test-driven development (TDD), where tests are written before the implementation.

In plain words
What is it for?
Use it for new features, coverage improvements, test setup, failing-test investigation, and test-suite refactoring.
Why use it?
It reduces the effort of finding important test cases, setting up mocks, covering error paths, and maintaining test suites.

Agent for Cursor

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/girijashankarj/cursor-handbook/testing-testing-agent
Clone the repo
git clone --depth 1 https://github.com/girijashankarj/cursor-handbook

Made for: Cursor.

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-agent

README.md
[![agentmods](https://agentmods.dev/badge/agents/girijashankarj/cursor-handbook/testing-testing-agent.svg)](https://agentmods.dev/agents/girijashankarj/cursor-handbook/testing-testing-agent)
Your own site
<a href="https://agentmods.dev/agents/girijashankarj/cursor-handbook/testing-testing-agent"><img src="https://agentmods.dev/badge/agents/girijashankarj/cursor-handbook/testing-testing-agent.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 519 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.1 $0.00015 $0.00519
Opus 5 $0.00008 $0.00260
Sonnet 5 $0.00003 $0.00104
Haiku 4.5 $0.00002 $0.00052

Measured 2d ago against content hash 173733bed310, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

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

.cursor/agents/testing-testing-agent.md · 76 lines

How it starts

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

Testing Agent

Invocation

/testing-agent or @testing-agent

Scope

Writes comprehensive tests and improves test coverage using {{CONFIG.techStack.testing}}.

Expertise

  • Unit testing with {{CONFIG.techStack.testing}}
  • Integration testing patterns
  • Test-driven development (TDD)
  • Mock strategies and test doubles
  • Code coverage optimization

When to Use

  • Writing tests for new features
  • Improving test coverage
  • Setting up test infrastructure
  • Debugging failing tests
  • Refactoring test suites

Process

  1. Analyze code to determine test cases
  2. Identify dependencies to mock
  3. Write tests following AAA pattern (Arrange-Act-Assert)
  4. Cover success, error, and edge cases
  5. Verify coverage meets {{CONFIG.testing.coverageMinimum}}%

Test Naming Convention

describe('{Module/Class}', () => {
  describe('{method/function}', () => {
    it('should {expected behavior} when {condition}', () => {
      // Arrange - Act - Assert
    });
  });
});

Output Format

  • Test File: Complete test implementation
  • Coverage: Expected coverage impact
  • Mocks: Mock setup required
  • Notes: Edge cases and assumptions

Rules

  • One assertion per test (when practical)
  • No real network/database calls in unit tests
  • Use factories for test data (not hardcoded)
  • Reset mocks in beforeEach/afterEach

Example Output

Test File: order.service.test.ts — 5 tests for createOrder, 3 for calculateTotal. Coverage: +15%. Mocks: OrderRepository, CustomerService. Notes: Edge case: empty items array returns 0.

Common Mistakes

  • Testing entire module — scope to changed function
  • Real network/DB in unit tests — mock all I/O
  • Hardcoded test data — use factories
  • No error case tests — verify throw paths
  • Running full suite — use @test-single for single file

Token Tips

  • Test one function or file; not whole module
  • Use @fix-tests skill if tests fail
  • Run {{CONFIG.testing.typeCheckCommand}} before tests
  • Use @fix-tests skill when tests fail
  • Use @coverage-improvement skill for coverage gaps

Read the full file on GitHub · 76 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 · 76 lines · 15 tokens per session scan A 173733bed310

Subscribe to this mod's changes

testing-agent is an agent published in the GitHub repository girijashankarj/cursor-handbook (30 stars, last pushed 5d ago), licensed MIT. It adds 15 tokens to every session and 519 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-09-03.