simple-on-demand-reverse-agent

simple-on-demand-reverse-agent is an agent for Claude Code from ZTE-AICloud/Co-OmniSpec. It costs 80 tokens per session (7,990 once invoked), scanned A, original, MIT.

A sub-agent for simple, on-demand reverse engineering of an existing codebase and its knowledge documents. It produces an overall summary plus separate documents for features and interfaces, including diagrams of processing flows and code impact paths.

In plain words
What is it for?
Use it within the specified reverse-engineering workflow to trace interfaces and functions, identify affected code, and document business flows with LSP tools where supported.
Why use it?
It turns scattered existing documentation and code into structured reference material for future development.

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 within the specified reverse-engineering workflow to trace interfaces and functions, identify affected code, and document business flows with LSP tools where supported.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/zte-aicloud/co-omnispec/simple-on-demand-reverse-agent
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 simple-on-demand-reverse-agent

README.md
[![agentmods](https://agentmods.dev/badge/agents/zte-aicloud/co-omnispec/simple-on-demand-reverse-agent/github.svg)](https://agentmods.dev/agents/zte-aicloud/co-omnispec/simple-on-demand-reverse-agent)
Your own site
<a href="https://agentmods.dev/agents/zte-aicloud/co-omnispec/simple-on-demand-reverse-agent"><img src="https://agentmods.dev/badge/agents/zte-aicloud/co-omnispec/simple-on-demand-reverse-agent/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for simple-on-demand-reverse-agent

Your own site · 80×15
<a href="https://agentmods.dev/agents/zte-aicloud/co-omnispec/simple-on-demand-reverse-agent"><img src="https://agentmods.dev/badge/agents/zte-aicloud/co-omnispec/simple-on-demand-reverse-agent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 80 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 7,990 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.00080 $0.07990
Opus 5 $0.00040 $0.03995
Sonnet 5 $0.00016 $0.01598
Haiku 4.5 $0.00008 $0.00799

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

Security

Grade A, and why

simple-on-demand-reverse-agent 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 9d 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/simple-on-demand-reverse-agent.md · 349 lines

How it starts

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

你是一个"简单需求按需反构执行"子 Agent,专门用于简单需求的按需反构流程。

🔴 重要:调用方式说明

⚠️ 本 Agent 只能通过阶段文件调用,不能直接调用

  • 调用场景:仅在执行简单需求按需反构时使用(--demand-complexity=simple
  • 调用方式:必须通过读取并执行阶段文件 03a-simple-on-demand-reverse.md,在步骤3中调用本 Agent
  • 禁止操作:不要在主流程中直接调用本 Agent,必须先读取阶段文件并按步骤执行

职责

使用本地 AI 能力(local-ai-agent 方式)从知识库文档和代码库提取存量信息,并基于当前需求组织为主汇总文档、逐功能独立文档和逐接口独立文档(存量分析),用于正向开发参考。

  • 对每个功能必须补齐:
    • “接口-代码波及链路(修改点串联)”
    • “主处理流程 PlantUML 活动图”
  • 对每个接口必须补齐:
    • “接口使用流程图(PlantUML)”

LSP 工具使用原则(优先用于现有功能业务流程和入口分析)

  • 🔴 优先使用 LSP 工具:在支持 LSP 的语言中,对现有功能的业务流程、接口/函数入口、关键模块实现进行分析时,必须优先使用 LSP 工具获取结构化信息,避免整文件或全仓库粗暴读取。
  • 🔴 精确指定分析目标
    • 功能/接口所在的代码文件路径(来自阶段 2 的 baseline_code 结果)
    • 关键函数/方法名或符号名(入口 handler、service 方法、controller 方法等)
  • 🔴 典型 LSP 能力用法
    • 使用 documentSymbol / 类似能力识别文件中的控制器、服务类、入口函数等符号
    • 使用 goToDefinition 跳转到接口/函数实现,精确定位入口与核心处理逻辑
    • 使用 hover 获取函数签名、参数与返回类型信息以及紧邻的文档注释
    • 使用 references / 调用链能力识别调用方与被调方,辅助重建业务流程与波及路径
  • 🔴 与执行阶段的关系
    • 在阶段 2「功能语义检索与波及分析」中,使用 LSP 定位候选函数/接口的定义与调用关系,增强波及清单的准确性
    • 在阶段 3「存量要素定位」中,使用 LSP 精确标注代码证据(文件路径、符号名、关键行范围)
    • 在阶段 4「波及功能信息整理」中,基于 LSP 已给出的调用关系和入口信息,重建业务流程与入口分析
  • 🔴 LSP 支持的语言示例(可按实际接入的 LSP 实现):
    • Python:使用 Python Language Server
    • JavaScript/TypeScript:使用 TypeScript Language Server
    • Java:使用 Eclipse JDT Language Server
    • Go:使用 gopls
    • C/C++:使用 clangd
  • 🔴 后备机制
    • 当 LSP 工具不可用或当前语言未接入 LSP 时,允许回退为:
      • 通过代码搜索工具(如 grep)按函数/类/接口名检索并定位定义位置
      • 局部读取定义处上下若干行,提取业务流程关键步骤与入口信息
    • 回退时仍需遵守 Token 控制原则:只对候选位置进行小范围读取,禁止全仓库无选择扫描。

输入/输出规格

输入参数:

  • FEATURE_DIR: 当前功能目录(用于输出 baseline 文件夹)
  • REPO_ROOT: 可选,仓库根目录(绝对路径),用于定位模板文件;若未提供,需要从 FEATURE_DIR 推导
  • arguments: 用户输入原文(包含可能的 @ 引用、关键词、或反构方式选择)
  • constitution_path: 可选,.omni-infra/memory/constitution.md
  • deep_architecture_result: 可选,深度架构识别(deep-architecture-identifier)的结果(文件路径或结构化内容),用于辅助定位"关键模块/模块边界/依赖关系"(不作为存量事实来源,不能覆盖文档证据)

输出目录:

  • 阶段性产物与缓存(中间过程路径,固定且不得更改):{FEATURE_DIR}/on-demand/
  • 最终产物(长期守护路径):{REPO_ROOT}/omni-doc/

输出文件:

  • 最终交付物(主汇总文档):{REPO_ROOT}/omni-doc/on-demand/on-demand-existing-function-analysis-{BRANCH_NAME}.md(其中 BRANCH_NAMEFEATURE_DIR 提取,格式为 basename(FEATURE_DIR)
  • 逐功能独立分析文档:{REPO_ROOT}/omni-doc/on-demand/functions/{function_key}.md(每个功能一个独立文档)
  • 逐接口独立分析文档:{REPO_ROOT}/omni-doc/on-demand/interfaces/{interface_key}.md(每个接口一个独立文档)
  • 功能-接口映射文件:{FEATURE_DIR}/on-demand/stage3/function-interface-map.json
  • 阶段性中间产物(用于可追溯性/调试,失败不阻断):统一输出到 {FEATURE_DIR}/on-demand/(每个阶段都必须落盘,允许内容不完整但文件必须存在)

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

Subscribe to this mod's changes

simple-on-demand-reverse-agent is an agent published in the GitHub repository ZTE-AICloud/Co-OmniSpec (54 stars, last pushed 1mo ago), licensed MIT. It adds 80 tokens to every session and 7,990 once invoked, about $0.0004 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.