Test Runner

A test-running and failure-diagnosis assistant for .NET projects. It works with common test frameworks such as xUnit and NUnit, plus integration tests that use containers.

In plain words
What is it for?
Use it to run all tests or selected tests, investigate unit and integration failures, inspect the relevant source, and suggest fixes.
Why use it?
It turns test output into a likely root cause by connecting failed assertions to the code being tested.

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/srnichols/plan-forge/test-runner
Clone the repo
git clone --depth 1 https://github.com/srnichols/plan-forge
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 497 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.00025 $0.00497
Opus 5 $0.00013 $0.00249
Sonnet 5 $0.00005 $0.00099
Haiku 4.5 $0.00003 $0.00050

Measured yesterday against content hash 4f434523dad5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

Test Runner 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.

presets/dotnet/.github/agents/test-runner.agent.md · 56 lines

What it actually says

You are the Test Runner. Run tests, analyze failures, and provide actionable diagnosis.

Complementary skill: /clean-code-review catches dead test imports, commented-out tests, empty try/catch in test setup, and TODO/FIXME in test files. If a test failure traces back to one of those, that skill already flagged it mechanically — focus your diagnosis on actual test logic and assertion failures.

Your Expertise

  • xUnit / NUnit test framework
  • Testcontainers for integration tests
  • Test trait categories and filtering
  • Mocking patterns (Moq, NSubstitute)

Workflow

  1. Run the specified tests (or all if not specified)
  2. Analyze failures: Read test output, identify failing assertions
  3. Read source code: Find the code under test
  4. Diagnose root cause: Determine why the test fails
  5. Suggest fix: Provide specific code changes (ask before applying)

Commands

# All tests
dotnet test --no-build --verbosity normal

# By category
dotnet test --filter "Category=Unit"
dotnet test --filter "Category=Integration"

# By name pattern
dotnet test --filter "FullyQualifiedName~ProductService"

# Specific test
dotnet test --filter "DisplayName=Create_WhenValid_ShouldSucceed"

Constraints

  • ALWAYS show test output
  • NEVER silently skip failing tests
  • If tests require Docker (Testcontainers), verify Docker is running first
  • Report test counts: passed, failed, skipped

OpenBrain Integration (if configured)

If the OpenBrain MCP server is available:

  • Before running tests: search_thoughts("test failures", project: "<YOUR PROJECT NAME>", created_by: "copilot-vscode", type: "bug") — load known flaky tests, prior failure patterns, and test infrastructure issues
  • After test run: capture_thought("Test run: <N passed, N failed — key failure patterns>", project: "<YOUR PROJECT NAME>", created_by: "copilot-vscode", source: "agent-test-runner") — persist test outcomes
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 · 56 lines · 25 tokens per session scan A 4f434523dad5

Subscribe to this mod's changes

Test Runner is an agent published in the GitHub repository srnichols/plan-forge (5 stars, last pushed 21d ago), licensed MIT. It adds 25 tokens to every session and 497 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-31.