taiyi-diagram-c4

taiyi-diagram-c4 is a skill for Claude Code, Codex from Dong90/oh-my-taiyiforge. It costs 48 tokens per session (863 once invoked), scanned A, original, MIT.

A code-scanning tool that builds C4 architecture documents from a repository. It separates facts observed in the code from conclusions inferred about the design and uses Mermaid diagrams as the source format.

In plain words
What is it for?
Use it to inspect an entire repository, a directory, or a single service and record its scope, entry points, containers, and architecture diagrams. It can produce change-specific or repository-level C4 documentation for later design and diagram-rendering steps.
Why use it?
It reduces guesswork when entering an unfamiliar codebase or planning a large refactor. The documented evidence helps prevent repeated or incorrect assumptions about module boundaries.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex; mentions OpenCode.

Good fit Use it to inspect an entire repository, a directory, or a single service and record its scope, entry points, containers, and architecture diagrams. It can produce change-specific or repository-level C4 documentation for later design and diagram-rendering steps.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dong90/oh-my-taiyiforge/taiyi-diagram-c4
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.

Any agent
npx skills add Dong90/oh-my-taiyiforge --skill taiyi-diagram-c4
Clone the repo
git clone --depth 1 https://github.com/Dong90/oh-my-taiyiforge

Made for: Claude Code, Codex.

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 taiyi-diagram-c4

README.md
[![agentmods](https://agentmods.dev/badge/skills/dong90/oh-my-taiyiforge/taiyi-diagram-c4/github.svg)](https://agentmods.dev/skills/dong90/oh-my-taiyiforge/taiyi-diagram-c4)
Your own site
<a href="https://agentmods.dev/skills/dong90/oh-my-taiyiforge/taiyi-diagram-c4"><img src="https://agentmods.dev/badge/skills/dong90/oh-my-taiyiforge/taiyi-diagram-c4/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 taiyi-diagram-c4

Your own site · 80×15
<a href="https://agentmods.dev/skills/dong90/oh-my-taiyiforge/taiyi-diagram-c4"><img src="https://agentmods.dev/badge/skills/dong90/oh-my-taiyiforge/taiyi-diagram-c4.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 863 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 27
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
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.00048 $0.00863
Opus 5 $0.00024 $0.00432
Sonnet 5 $0.00010 $0.00173
Haiku 4.5 $0.00005 $0.00086

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

Security

Grade A, and why

taiyi-diagram-c4 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 12d 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.

skills/taiyi-diagram-c4/SKILL.md · 69 lines

What it actually says

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.mdDESIGN.mdCONTEXT.md
  • docs/ARCHITECTURE.md(若有)

输出

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

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

执行步骤

  1. 定范围:全仓库 / src/core / 单服务;写明 in-scope / out-of-scope
  2. 扫证据:入口(src/clisrc/plugin)、package.jsonworkflow-manifest.yaml、部署/CI 描述
  3. 写 README.md:Scope · Observations(Observed)· Assumptions(Inferred)· Open questions
  4. 写 containers.mdC4Container 或结构化 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

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. 12d ago First seen · 69 lines · 48 tokens per session scan A 6f21e09a4f69

Subscribe to this mod's changes

taiyi-diagram-c4 is a skill published in the GitHub repository Dong90/oh-my-taiyiforge (888 stars, last pushed 5d ago), licensed MIT. It adds 48 tokens to every session and 863 once invoked, about $0.0002 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.

Related

Other skills, from other repositories

review

Use when the user wants code assessed rather than changed — "review PR 88", "is this branch ready to merge?", "look over my changes", "any problems with this diff?", "give me a code review", "what do you think of this PR?", "sanity-check this branch", "ship it?". Applies to a pull request or the current branch when…

The01Geek/prflow · 123 tokens

fix

PRFlow's code-review reception skill (formerly receiving-code-review), used by the review-and-fix loop and available directly. Use when addressing review feedback already posted on a pull request — verifying findings before applying them — as distinct from /prflow:review-and-fix, which runs the review itself and then…

The01Geek/prflow · 82 tokens

review-and-fix

Use when the user wants problems in a pull request or the current branch both found AND corrected — "review my changes and fix what's wrong", "clean up whatever the review turns up", "address the review feedback on this branch", "tidy this PR up before merge", "find and fix the issues here". Requires explicit fix…

The01Geek/prflow · 88 tokens

docs-bootstrap-internal

Use when a codebase has no structured developer documentation yet and needs it built from scratch — "we have no docs at all", "set up internal docs for this repo", "the docs directory is a mess, start over", "create developer documentation for this codebase" — including an empty or disorganized docs directory or a…

The01Geek/prflow · 94 tokens

docs-release-notes

Use when a change needs a user-visible release-note, changelog, or changeset entry — "add a release note", "add a changeset for this", "what goes in the changelog?", "write up what shipped", "note this for the next release" — or when finalizing a branch whose customer-visible features, bug fixes, or UI changes should…

The01Geek/prflow · 106 tokens

docs-sync-internal

Use when code changes on the current branch need matching internal or developer documentation — "update our internal docs", "the architecture docs are stale after this change", "document what I just changed", "do the dev docs still match the code?" — or as a pre-push check that developer docs track the code. Narrower…

The01Geek/prflow · 105 tokens