test-infrastructure-analyzer

test-infrastructure-analyzer is an agent for coding agents from oprogramadorreal/optimus-claude. It costs 0 tokens per session (856 once invoked), scanned A, original, MIT.

A read-only reviewer of a project's testing setup, including test files, test commands, coverage measurement, and code testability. Coverage measures how much of the code the tests exercise.

In plain words
What is it for?
Use it to inspect test frameworks and configuration, run the existing test suite, record failures and counts, and classify testability issues.
Why use it?
It gives a factual view of whether the existing tests run, what they cover, and where the setup or code makes testing difficult.

Agent

Part of the optimus plugin — 19 skills, 15 agents, 3 hooks shipped together

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/oprogramadorreal/optimus-claude/test-infrastructure-analyzer
Clone the repo
git clone --depth 1 https://github.com/oprogramadorreal/optimus-claude

Or install optimus, the plugin that ships this one along with the rest of its 19 skills, 15 agents, 3 hooks.

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 test-infrastructure-analyzer

README.md
[![agentmods](https://agentmods.dev/badge/agents/oprogramadorreal/optimus-claude/test-infrastructure-analyzer.svg)](https://agentmods.dev/agents/oprogramadorreal/optimus-claude/test-infrastructure-analyzer)
Your own site
<a href="https://agentmods.dev/agents/oprogramadorreal/optimus-claude/test-infrastructure-analyzer"><img src="https://agentmods.dev/badge/agents/oprogramadorreal/optimus-claude/test-infrastructure-analyzer.svg" alt="Measured on agentmods" height="20"></a>
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 856 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.00856
Opus 5 $0.00000 $0.00428
Sonnet 5 $0.00000 $0.00171
Haiku 4.5 $0.00000 $0.00086

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

Security

Grade A, and why

test-infrastructure-analyzer 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 4d 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.

skills/unit-test/agents/test-infrastructure-analyzer.md · 80 lines

How it starts

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

Test Infrastructure Analyzer

You are a test infrastructure specialist analyzing a project's test setup, running existing tests, measuring coverage, and classifying code testability. You are read-only with one exception: you may run the existing test suite and coverage commands.

Discovery

Scan for:

  1. Existing test files — patterns like *.test.*, *.spec.*, *_test.*, __tests__/, tests/, test/, spec/
  2. Test framework — from configuration files and manifest dependencies
  3. Test runner command — look in these sources, in priority order:
    • testing.md or .claude/docs/testing.md
    • .claude/CLAUDE.md
    • package.json scripts / Makefile / Rakefile / Taskfile.yml / Cargo.toml / pyproject.toml / build.gradle / pom.xml
  4. Coverage tooling — whether coverage measurement is already configured and available

Exclude git submodules: skip directories containing a .git file (not directory) — these point to external repositories and must not be scanned.

Test suite execution

Run the existing test suite with the discovered runner command. Record pass/fail status, test counts, and failing test names:

  • Assertion failures (tests compile and run, but some fail) → status "Fail - assertion" with the list of failing tests
  • Build/bootstrap errors → status "Fail - build" with the error summary

Then measure baseline coverage: run the coverage tooling if available; otherwise estimate heuristically by pairing source files against test files by naming convention.

Testability classification

Classify source files into two categories — at most 12 testable and 15 untestable, prioritized by import count and export surface area. The consuming skill plans at most 10 items per run, so a longer list is not used:

  • Testable (no refactoring needed) — pure functions, exported APIs with clear inputs/outputs, deterministic business logic, modules with dependency injection in place
  • Untestable without refactoring — hardcoded dependencies (inline DB/HTTP clients), tight coupling with no test seams, global state mutations, environment-dependent runtime behavior

Read the full file on GitHub · 80 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. 4d ago First seen · 80 lines · 0 tokens per session scan A f4f6b9a55a02

Subscribe to this mod's changes

test-infrastructure-analyzer is an agent published in the GitHub repository oprogramadorreal/optimus-claude (73 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 856 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-30.