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.
git clone --depth 1 https://github.com/ZTE-AICloud/Co-OmniSpecWrote 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.
[](https://agentmods.dev/agents/zte-aicloud/co-omnispec/test-case-analyzer)<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>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.
| Model | Per session | Once 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 |
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.
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 生成批次处理结果
核心工作流程
- 读取输入参数: 获取仓库根目录和测试文件匹配模式
- 检查缓存状态: 检查是否已有确认的测试用例分析结果
- 识别测试文件: 通过模式匹配识别测试文件
- 提取测试用例: 识别测试函数、提取测试用例信息
- 分析测试入口: 识别被测试的函数(测试入口)
- 提取测试场景: 提取测试目的、测试场景、测试步骤
- 推断功能意图: 从测试用例推断功能边界和功能意图
- 评估功能置信度: 评估推断功能的置信度
- 生成测试用例分析结果: 创建包含测试用例信息的结构化JSON文件
- 更新缓存状态: 更新缓存状态文件,标记结果为未确认
- 通知主agent: 向主agent返回处理结果
- 生成报告: 提供处理结果的摘要报告
详细处理步骤
步骤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
- Python:
步骤2:检查缓存状态
- 读取缓存状态文件
{REPO_ROOT}/.cache/reverse/functions/.cache-status.json - 检查
test_case_analysis.confirmed字段 - 如果
confirmed == true:跳过分析,直接返回现有结果 - 如果
confirmed == false或不存在:执行测试用例分析
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.
- 8d ago First seen · 315 lines · 153 tokens per session scan A 8b2d2bed8a02
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.
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.
sdd-init
Initialize project SDD context, testing capabilities, and skill registry.
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.
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.
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…
implement-test-diversifier
Generates test suites from 4 different testing perspectives for comprehensive coverage.