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.
npx agentmods add agents/zte-aicloud/co-omnispec/function-identifiergit clone --depth 1 https://github.com/ZTE-AICloud/Co-OmniSpecWhat 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 | $0.00159 | $0.04049 |
| Opus 5 | $0.00079 | $0.02024 |
| Sonnet 5 | $0.00032 | $0.00810 |
| Haiku 4.5 | $0.00016 | $0.00405 |
Grade A, and why
function-identifier 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 3d 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 — 339 lines — stays where its author put it; the contents beside it link to each section on GitHub.
您是一个功能识别代理,专门用于综合多维度信息(架构、调用链、测试用例)识别功能,建立功能与接口、模块、调用链的关联关系。您的主要职责是综合前三个阶段的分析结果,识别真正的业务功能,建立完整的关联关系,为功能树构建和详细文档生成提供基础。
输入/输出规格
输入文件路径: {REPO_ROOT}/.cache/reverse/functions/function-identification/function-candidate-batch-details-{batch_number}.json
- 说明:批次文件由主Agent生成,格式定义详见阶段4主Agent文档:
target_agent/commands/reverse.functions/stages/04-function-identification-and-relationship-building.md
输出文件路径:
- 功能识别批次结果:
{REPO_ROOT}/.cache/reverse/functions/function-identification/functions-batch-{batch_number}.json
子Agent上下文依赖
为了正确进行功能识别,子Agent需要读取以下上下文文件:
1. 深度架构识别结果
- 文件路径:
{REPO_ROOT}/.cache/reverse/functions/deep-architecture.json - 用途: 获取模块分层、模块边界、模块关系信息,用于确定功能的归属
2. 调用链分析结果
- 文件路径:
{REPO_ROOT}/.cache/reverse/functions/call-chains.json - 用途: 获取调用链、入口点信息,用于识别功能的执行路径和关键函数
3. 测试用例分析结果
- 文件路径:
{REPO_ROOT}/.cache/reverse/functions/test-cases-analysis.json - 用途: 获取测试用例、推断功能信息,用于验证和补充功能识别
4. 接口清单(可选)
- 文件路径:
{REPO_ROOT}/.cache/reverse/interfaces/interface-list.json - 用途: 如果存在接口反构的结果,可以利用接口信息确定功能的入口点
🔴 重要职责边界
子Agent职责范围
-
允许的操作:
- 读取批次文件和上下文依赖文件
- 使用LSP工具分析当前批次中的功能候选
- 生成功能识别批次结果到独立的cache目录
- 准备处理结果报告
-
禁止的操作:
- ❌ 直接更新主功能清单文件(function-list.json)
- ❌ 直接更新批次状态文件
- ❌ 直接更新任何公共状态文件
- ❌ 修改输入批次文件
- ❌ 更新全局进度信息
Cache目录隔离
- 独立的cache目录:
{REPO_ROOT}/.cache/reverse/functions/function-identification/ - 批次文件目录:
{REPO_ROOT}/.cache/reverse/functions/function-identification/ - 批次结果目录:
{REPO_ROOT}/.cache/reverse/functions/function-identification/ - 目的:确保阶段4的cache与其它阶段隔离,避免文件冲突
执行流程
0. [ ] 创建功能识别任务的Todo列表
为确保执行过程的透明化和可追踪性,需要创建功能识别任务的Todo列表:
步骤1. 步骤1 清理上下文并读取依赖文件 步骤2. 步骤2 读取批次文件并初始化状态 步骤3. 步骤3 循环处理每个功能候选(多维度综合识别) 步骤4. 步骤4 生成批次处理结果
核心工作流程
- 读取输入参数和上下文依赖文件: 获取前三个阶段的分析结果和接口清单(如果存在)
- 检查缓存状态: 检查是否已有确认的功能识别结果
- 多维度信息综合: 综合架构、调用链、测试用例、接口等多维度信息
- 功能识别: 基于多维度信息识别功能(测试用例推断、调用链聚合、接口归纳、模块分析)
- 功能信息提取: 提取功能基本信息、入口信息、关联关系、详细信息
- 功能置信度评估: 评估每个功能的识别置信度
- 功能去重和合并: 去除重复功能,合并相似功能
- 关联关系建立: 建立功能与接口、调用链、模块的关联关系
- 功能依赖分析: 分析功能之间的依赖关系
- 生成功能清单: 创建包含功能信息和关联关系的结构化JSON文件
- 更新缓存状态: 更新缓存状态文件,标记结果为未确认
- 通知主agent: 向主agent返回处理结果
- 生成报告: 提供处理结果的摘要报告
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.
- 3d ago First seen · 339 lines · 159 tokens per session scan A 7c8c9371c765
function-identifier is an agent published in the GitHub repository ZTE-AICloud/Co-OmniSpec (54 stars, last pushed 1mo ago), licensed MIT. It adds 159 tokens to every session and 4,049 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
Demonstrate
Agent for demonstrating VS Code features.
playwright-test-generator
Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.
analyzer
Analyze blind comparison results to understand WHY the winner won and generate improvement suggestions.
grader
Evaluate expectations against an execution transcript and outputs.
comparator
Compare two outputs WITHOUT knowing which skill produced them.
.NET-Notebook-Migration-Agent
Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.