From omni-reverse
Scans codebase imports, classifies symbols as system/local/external, and generates standardized documentation only for external interfaces that have call sites.
How this skill is triggered — by the user, by Claude, or both
Slash command
/omni-reverse:reverse-external-interfacesThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- **职责**:识别代码库中来自**外部模块**且在本仓库中有调用示例的接口,并生成标准化文档。
reverse --target external-interfaces ... 或 --target all 触发--path / --exclude 等参数确定扫描范围{REPO_ROOT}/.cache/reverse/external-interfaces/
import-list.json.cache-status.json 等{REPO_ROOT}/omni-doc/specs/external-interfaces/(输出目录与文件命名规范见 references/data.md)“外部”指:非系统标准库且非当前仓库自身代码的模块;仅当存在调用点时才生成一条外部接口记录。
reverse 命令的关系reverse 负责解析参数 (--target external-interfaces)、设置扫描范围与排除规则、准备缓存目录后,激活本 Skill。本 Skill 由两大阶段组成(对应原 reverse-external-interfaces.md 与 reverse.external-interfaces/stages/*):
支持自动化模式(默认)与对话模式(--interactive),并支持 --clear-cache 进行重录。
import-list.json:包含符号、来源模块、分类、文件位置等信息。import/from,Java import,C++ #include,Go import,JS/TS import/require 等);--path 与 --exclude 控制扫描范围,默认排除隐藏目录与 omni-doc/;✅ Checkpoint: 阶段1 完成: X 个导入已分类(系统 Y / 本库 Z / 外部 W)EXTERNAL-API_{NNN}_{简短描述}.mdEXTERNAL-API_SUMMARY.json--non-interactive/--yes 模式下跳过上述对话,自动执行。✅ Checkpoint: 阶段2 完成: N 个外部接口文档已生成,X 个已排除(无调用点){REPO_ROOT}/.cache/reverse/external-interfaces/.cache-status.jsonimport_scan、document_generation 等段落。--clear-cache):
omni-doc/specs/external-interfaces/ 下旧的 EXTERNAL-API_*.md 与 EXTERNAL-API_SUMMARY.json,再重新扫描与生成。references/ 中对 --path / --exclude 与默认排除目录的定义。自动化执行(推荐):自动执行导入扫描与文档生成
reverse --target external-interfaces
reverse --target external-interfaces --path ./src
对话模式:在关键节点暂停确认,适合需要审核结果的场景
reverse --target external-interfaces --interactive
排除特定目录:排除测试或构建目录后再扫描
reverse --target external-interfaces --path ./src --exclude test --exclude build
强制重录:清除缓存后重新执行全部阶段
reverse --target external-interfaces --clear-cache
--interactive;--interactive;--non-interactive 或 --yes 时,强制进入全自动模式。--target external-interfaces:指定触发本 Skill(必选);--target all:触发包括 external-interfaces 在内的所有阶段;--path、--files:控制扫描范围;--exclude:多次传入以排除测试/构建等目录;--interactive:进入对话模式,阶段完成后暂停确认;--non-interactive、--yes:强制自动化模式;--clear-cache:重录,清除缓存后重新执行;reverse 保持一致。本 Skill 的详细规范位于本目录下 references/:
AI Agent 在执行本 Skill 时,应读取上述文档并严格遵循其中的规则与脚本调用方式。
import-list.json),避免重复扫描;--exclude 排除不必要的目录(如 vendor/、node_modules/),减少扫描量;npx claudepluginhub zte-aicloud/co-omnispec --plugin omni-reverseOrchestrates reverse-engineering of interface lists and detail documents from codebases. Produces JSON and Markdown interface specs. Triggered by reverse --target interfaces.
Generates and syncs project documentation including architecture diagrams, API docs, and README using a discovery-first approach with cached manifests.
Guides docs-first workflow for implementing features with external libraries or APIs: check docs and codebase patterns first, then implement minimally and verify.