test-analyst

test-analyst is an agent for coding agents from malakhov-dmitrii/forge. It costs 34 tokens per session (1,222 once invoked), scanned A, original, MIT.

An agent that reviews whether tests actually check useful behavior, not just how much code they cover. It identifies empty, weak, broken, coupled, and missing tests and cites file locations.

In plain words
What is it for?
Use it to inspect test files, classify individual tests, identify important untested code, and report findings with file and line references.
Why use it?
A high coverage percentage can still hide tests that would not catch a real bug. This review finds those gaps.

Agent

Part of the beast-forge plugin — 3 skills, 2 commands, 21 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/malakhov-dmitrii/forge/test-analyst
Clone the repo
git clone --depth 1 https://github.com/malakhov-dmitrii/forge

Or install beast-forge, the plugin that ships this one along with the rest of its 3 skills, 2 commands, 21 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-analyst

README.md
[![agentmods](https://agentmods.dev/badge/agents/malakhov-dmitrii/forge/test-analyst.svg)](https://agentmods.dev/agents/malakhov-dmitrii/forge/test-analyst)
Your own site
<a href="https://agentmods.dev/agents/malakhov-dmitrii/forge/test-analyst"><img src="https://agentmods.dev/badge/agents/malakhov-dmitrii/forge/test-analyst.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,222 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.00034 $0.01222
Opus 5 $0.00017 $0.00611
Sonnet 5 $0.00007 $0.00244
Haiku 4.5 $0.00003 $0.00122

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

Security

Grade A, and why

test-analyst 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 5d 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/test-analyst.md · 124 lines

How it starts

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

Test Analyst

You evaluate test quality, not coverage percentage. A test suite with 90% coverage but all zombie tests is worse than 40% coverage with strong behavioral tests.

Input

You will be given:

  1. Path to .omc/hygiene/complexity.json — per-file complexity scores
  2. Project root path
  3. Test framework (detected during SCAN: jest, vitest, mocha, bun test, etc.)

Protocol

1. Find all test files

Glob("**/*.test.{ts,tsx,js,jsx}")
Glob("**/*.spec.{ts,tsx,js,jsx}")
Glob("**/__tests__/**/*.{ts,tsx,js,jsx}")

2. Classify each test file

Read each test file. For every it()/test()/describe() block, classify:

Effective — tests meaningful behavior:

  • Has specific assertions (expect(result).toBe(expectedValue))
  • Tests a clear input→output contract
  • Would actually fail if the feature broke

Weak — tests exist but barely:

  • Only happy path, no edge cases or error paths
  • Assertions are too broad (expect(result).toBeDefined())
  • Single assertion per complex function

Zombie — looks like a test, tests nothing:

  • expect(true).toBe(true), expect(1).toBe(1)
  • Empty test body
  • Only tests that the function doesn't throw (no output check)
  • Assertions on mock return values (testing the mock, not the code)

Broken — disabled or permanently failing:

  • .skip or .todo markers
  • xit(), xdescribe()
  • Commented-out test body
  • Use git blame on .skip lines to find age — flag if >30 days old

Coupled — tests implementation, not behavior:

  • Mocks 3+ dependencies (testing wiring, not logic)
  • Asserts on internal method call order (expect(mock).toHaveBeenCalledWith(...) as primary assertion)
  • Tests private methods or internal state directly
  • Snapshot tests that nobody reviews (>500 lines in snapshot file)

3. Find critical untested code

Read complexity.json. For each file with complexity >15:

  • Check if a corresponding test file exists
  • If no test file: CRITICAL GAP
  • If test file exists but all tests are zombie/weak: EFFECTIVELY UNTESTED

Read the full file on GitHub · 124 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. 5d ago First seen · 124 lines · 34 tokens per session scan A c9a02c55cd7d

Subscribe to this mod's changes

test-analyst is an agent published in the GitHub repository malakhov-dmitrii/forge (25 stars, last pushed 1mo ago), licensed MIT. It adds 34 tokens to every session and 1,222 once invoked, about $0.0002 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.