test-case-analyzer

test-case-analyzer is an agent for Claude Code from ZTE-AICloud/Co-OmniSpec. It costs 153 tokens per session (3,643 once invoked), scanned A, original, MIT.

An agent that examines a codebase's tests to identify how they start, what they check, which situations they cover, and where the feature boundaries appear.

In plain words
What is it for?
Use it to analyze batches of test files, summarize test purposes and scenarios, infer functional intent, and produce batch analysis results.
Why use it?
It helps infer intended behaviour from existing tests when documentation or code structure alone is unclear.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the omni-dsdd plugin — 40 skills, 16 agents, 1 hook shipped together

Good fit Use it to analyze batches of test files, summarize test purposes and scenarios, infer functional intent, and produce batch analysis results.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/zte-aicloud/co-omnispec/test-case-analyzer
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.

Clone the repo
git clone --depth 1 https://github.com/ZTE-AICloud/Co-OmniSpec

Made for: Claude Code.

Or install omni-dsdd, the plugin that ships this one along with the rest of its 40 skills, 16 agents, 1 hook.

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-case-analyzer

README.md
[![agentmods](https://agentmods.dev/badge/agents/zte-aicloud/co-omnispec/test-case-analyzer.svg)](https://agentmods.dev/agents/zte-aicloud/co-omnispec/test-case-analyzer)
Your own site
<a href="https://agentmods.dev/agents/zte-aicloud/co-omnispec/test-case-analyzer"><img src="https://agentmods.dev/badge/agents/zte-aicloud/co-omnispec/test-case-analyzer.svg" alt="Measured on agentmods" height="20"></a>
Per session 153 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,643 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00153 $0.03643
Opus 5 $0.00077 $0.01821
Sonnet 5 $0.00031 $0.00729
Haiku 4.5 $0.00015 $0.00364

Measured 8d ago against content hash 8b2d2bed8a02, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

test-case-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 8d 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.

omni-dsdd/agents/test-case-analyzer.md · 315 lines

How it starts

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

您是一个测试用例分析代理,专门用于分析代码库中的测试用例,提取测试入口、测试目的、测试场景,推断功能边界和功能意图。您的主要职责是扫描测试文件、提取测试用例信息、推断功能意图、评估功能置信度,为功能识别提供测试维度的信息。

输入/输出规格

输入文件路径: {REPO_ROOT}/.cache/reverse/functions/test-case-analysis/test-file-batch-details-{batch_number}.json

  • 说明:批次文件由主Agent生成,格式定义详见阶段3主Agent文档:target_agent/commands/reverse.functions/stages/03-test-case-analysis-and-function-inference.md

输出文件路径:

  • 测试用例分析批次结果:{REPO_ROOT}/.cache/reverse/functions/test-case-analysis/test-cases-analysis-batch-{batch_number}.json

子Agent上下文依赖

为了正确进行测试用例分析,子Agent需要访问代码库中的测试文件:

  • 测试文件(通过批次文件提供)

🔴 重要职责边界

子Agent职责范围

  • 允许的操作

    • 读取批次文件和测试文件
    • 使用LSP工具分析当前批次中的测试用例
    • 生成测试用例分析批次结果到独立的cache目录
    • 准备处理结果报告
  • 禁止的操作

    • ❌ 直接更新主测试用例分析结果文件(test-cases-analysis.json)
    • ❌ 直接更新批次状态文件
    • ❌ 直接更新任何公共状态文件
    • ❌ 修改输入批次文件
    • ❌ 更新全局进度信息

Cache目录隔离

  • 独立的cache目录{REPO_ROOT}/.cache/reverse/functions/test-case-analysis/
  • 批次文件目录{REPO_ROOT}/.cache/reverse/functions/test-case-analysis/
  • 批次结果目录{REPO_ROOT}/.cache/reverse/functions/test-case-analysis/
  • 目的:确保阶段3的cache与其它阶段隔离,避免文件冲突

执行流程

0. [ ] 创建测试用例分析任务的Todo列表

为确保执行过程的透明化和可追踪性,需要创建测试用例分析任务的Todo列表:

步骤1. 步骤1 清理上下文并读取依赖文件 步骤2. 步骤2 读取批次文件并初始化状态 步骤3. 步骤3 循环处理每个测试文件(使用LSP分析) 步骤4. 步骤4 生成批次处理结果

核心工作流程

  1. 读取输入参数: 获取仓库根目录和测试文件匹配模式
  2. 检查缓存状态: 检查是否已有确认的测试用例分析结果
  3. 识别测试文件: 通过模式匹配识别测试文件
  4. 提取测试用例: 识别测试函数、提取测试用例信息
  5. 分析测试入口: 识别被测试的函数(测试入口)
  6. 提取测试场景: 提取测试目的、测试场景、测试步骤
  7. 推断功能意图: 从测试用例推断功能边界和功能意图
  8. 评估功能置信度: 评估推断功能的置信度
  9. 生成测试用例分析结果: 创建包含测试用例信息的结构化JSON文件
  10. 更新缓存状态: 更新缓存状态文件,标记结果为未确认
  11. 通知主agent: 向主agent返回处理结果
  12. 生成报告: 提供处理结果的摘要报告

详细处理步骤

步骤1:读取输入参数

  • 获取仓库根目录路径
  • 获取测试文件匹配模式(如果提供)
  • 如果没有提供匹配模式,使用默认模式:
    • Python: **/*test*.py, **/*_test.py, tests/**/*.py
    • JavaScript: **/*test*.js, **/*spec*.js, __tests__/**/*.js
    • Java: **/*Test.java, **/*Tests.java, src/test/**/*.java
    • Go: **/*_test.go

步骤2:检查缓存状态

  • 读取缓存状态文件 {REPO_ROOT}/.cache/reverse/functions/.cache-status.json
  • 检查 test_case_analysis.confirmed 字段
  • 如果 confirmed == true:跳过分析,直接返回现有结果
  • 如果 confirmed == false 或不存在:执行测试用例分析

Read the full file on GitHub · 315 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. 8d ago First seen · 315 lines · 153 tokens per session scan A 8b2d2bed8a02

Subscribe to this mod's changes

test-case-analyzer is an agent published in the GitHub repository ZTE-AICloud/Co-OmniSpec (54 stars, last pushed 1mo ago), licensed MIT. It adds 153 tokens to every session and 3,643 once invoked, about $0.0008 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.

Related

Other agents, from other repositories

project-implementer

Implementation specialist - executes tasks from plans with TDD methodology, writes tests, and validates acceptance criteria. Use for executing phased implementation plans generated by attune:plan.

athola/claude-night-market · 38 tokens

sdd-init

Initialize project SDD context, testing capabilities, and skill registry.

Gentleman-Programming/gentle-pi · 17 tokens

python-pro

Write idiomatic Python code with advanced features like decorators, generators, and async/await. Optimizes performance, implements design patterns, and ensures comprehensive testing. Use PROACTIVELY for Python refactoring, optimization, or complex Python features.

echoVic/blade-code · 51 tokens

test-engineer

QA engineer operating on the "Prove-It" principle — if it works, prove it with a test. Use when writing tests for a new feature, filling coverage gaps, or validating that a bug fix won't regress. Can read, write and edit test files. Dispatch with Task tool for isolated test work.

felvieira/claude-skills-fv · 66 tokens

test-writer

Use this agent when the guild needs unit or integration tests written for implemented code. The test-writer implements the test-planner's test plan — reading the plan's Changed Files Inventory instead of re-analyzing the codebase — then writes and runs the tests. Spawned by the check-in skill when a test-writing task…

HirogaKatageri/hirokata · 77 tokens

implement-test-diversifier

Generates test suites from 4 different testing perspectives for comprehensive coverage.

eai-support/eai-gofer · 19 tokens