Skip to content
Agent Orchestration
Skill

/taiyi-diagram-c4

TaiyiForge 辅助 — 从代码反推 C4 架构文档(Observed/Inferred 分层 · Mermaid 真源)。OpenCode / Claude / Codex / Cursor 通用。

BOOST
From plugin
oh-my-taiyiforge
86625 skills
Install
$ npx -y skills add Dong90/oh-my-taiyiforge --skill taiyi-diagram-c4 --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/taiyi-diagram-c4

Context preview

The summary Claude sees to decide when to auto-load this skill.

TaiyiForge 辅助 — 从代码反推 C4 架构文档(Observed/Inferred 分层 · Mermaid 真源)。OpenCode / Claude / Codex / Cursor 通用。

SKILL.md

taiyi-diagram-c4.SKILL.md
name: taiyi-diagram-c4
description: TaiyiForge 辅助 — 从代码反推 C4 架构文档(Observed/Inferred 分层 · Mermaid 真源)。OpenCode / Claude / Codex / Cursor 通用。

taiyi-diagram-c4

目的

扫描仓库代码,产出 **C4 架构真源文档**(Scope · Observed · Inferred · Mermaid),供后续 `/taiyi:diagram-arch` 与 `/taiyi:diagram-render` 引用——**不重复猜模块边界**。

何时使用

| 时机 | 说明 | |------|------| | 架构流水线 **第 1 步** | `/taiyi:diagram-pipeline` 自动调用 | | 陌生代码库 / 大重构 | 单独 `/taiyi:diagram-c4` | | design 前需证据级架构 | 先于 `taiyi-diagram-arch` |

可跳过:纯文案改动、模块边界已在 DESIGN 冻结且无代码漂移。

外部 Skill(可选增强)

若已安装开源 **`c4-codebase-architecture`**,加载它并遵循其 Observed/Inferred 纪律;未安装则按本 Skill 执行同等流程。

npx skills add lmammino/c4-codebase-architecture-skill --skill c4-codebase-architecture -a cursor

输入

  • 仓库根或 `--scope <path>`(如 `src/core`)
  • (变更内)`REQUIREMENT.md`、`DESIGN.md`、`CONTEXT.md`
  • `docs/ARCHITECTURE.md`(若有)

输出

| 范围 | 路径 | |------|------| | **变更内**(默认,有 active slug) | `.taiyi/changes/<slug>/diagrams/c4/README.md`、`containers.md`、可选 `context.md` | | **仓库级**(`--repo` 或无 slug) | `docs/c4/README.md`、`docs/c4/containers.md`、可选 `docs/c4/context.md` |

**mark-aux**:`scripts/taiyi-forge.sh mark-aux <slug> taiyi-diagram-c4`(变更内且 `diagrams/c4/containers.md` 有实质内容)。

执行步骤

1. **定范围**:全仓库 / `src/core` / 单服务;写明 in-scope / out-of-scope 2. **扫证据**:入口(`src/cli`、`src/plugin`)、`package.json`、`workflow-manifest.yaml`、部署/CI 描述 3. **写 README.md**:Scope · Observations(Observed)· Assumptions(Inferred)· Open questions 4. **写 containers.md**:`C4Container` 或结构化 `graph TB` Mermaid;节点用真实路径/包名 5. **(可选)context.md**:仅当存在明确外部系统/用户角色时 6. **禁止**:把未确认推断写成 Observed;不要在此步导出 PNG(交给 `/taiyi:diagram-render`)

质量自检

  • [ ] Observed 与 Inferred 分节
  • [ ] 每个容器可映射到仓库路径
  • [ ] Mermaid 在 GitHub 预览可渲染
  • [ ] README 注明下游:`/taiyi:diagram-arch` → `/taiyi:diagram-render`

流水线位置

/taiyi:diagram-c4  →  /taiyi:diagram-arch  →  /taiyi:diagram-render
     (本 Skill)          (同步工程图)            (PNG + 视觉审查)

总命令:`/taiyi:diagram-pipeline`

Read more
Ships withoh-my-taiyiforge

把 AI 写代码的玄学,变成一条可执行、可审计的工程流水线。

Get the whole plugin
Stats
866
Stars
23
Forks
Active
Maintenance
TypeScript
Language
MIT
License
3d ago
Last commit
4mo ago
Created
5h ago
Added

Repo: Dong90/oh-my-taiyiforge

Other skills on oh-my-taiyiforge.