From omni
Reverse engineers rules and constraints from codebases and docs into AI/IDE-usable .mdc files. Scans features, maps rules by priority, generates docs in batches. Triggers on `reverse --target rules` or `all`.
npx claudepluginhub zte-aicloud/co-omnispec --plugin omniThis skill uses the workspace's default tool permissions.
- **职责**:从代码库与既有文档中反构各类规则与约束,生成可被 AI/IDE 使用的 `.mdc` 规则文档。
Extracts project-specific coding rules and domain knowledge from codebase, PRs, or conversations into structured markdown documentation for AI agents. Use for onboarding or after code reviews.
Guides authoring .claude/rules/*.md files for auto-applied constraints scoped by file patterns. Use when creating or updating rules for code conventions and quality standards.
Orchestrates reverse engineering of codebases to extract interfaces, logic architecture, functions, scenarios, constraints into standardized Markdown documents. Supports full pipeline or on-demand targets.
Share bugs, ideas, or general feedback.
.mdc 规则文档。reverse --target rules ... 或 --target all 触发--path / --exclude 等参数确定扫描范围{REPO_ROOT}/.cache/reverse/rules/
01-features.md(特征报告)rule-mapping.json 等中间数据.cache-status.json{REPO_ROOT}/omni-doc/rules/
{规则ID}.mdc规则类型按优先级 P0~P4 管理,支持通用模板与规则类型专用模板。
reverse 命令的关系reverse 负责:
--path、--exclude、--interactive、--template、--clear-cache 等);对应原 reverse-rules.md 与 reverse.rules/stages/*,本 Skill 包含 4 个阶段:
{REPO_ROOT}/.cache/reverse/rules/01-features.mdfeatures_scan 段落。rule-mapping.jsonprompts/03-rule-{规则ID}.md.mdc 文档。{REPO_ROOT}/omni-doc/rules/{规则ID}.mdc{REPO_ROOT}/.infra/metamodel/10.rules-templates/{规则ID}.template.md(若存在);{{MAIN_LANGUAGE}}、{{SCOPE}}、{{PRINCIPLES}} 等);--template,可覆盖默认模板;omni-doc/rules 或 .cursor/rules 中的规则)。--interactive;--interactive;--non-interactive / --yes:强制全自动模式。{REPO_ROOT}/.cache/reverse/rules/.cache-status.jsonfeatures_scan、rule_mapping、rule_generation、user_rules_injection 段落。--clear-cache):
.mdc 文件,避免残留。本 Skill 的详细规范位于本目录下 references/:
执行本 Skill 时,AI Agent 应读取上述文档并按照其中描述的阶段、规则类型与模板体系执行。