Agent skill

Code To Chart

by rongxinzy in rongxinzy/RongxinAI

解析代码仓库的 import/依赖关系,自动生成架构图、流程图和组织架构图,输出 Mermaid 文本或 SVG 图片。支持 Python、JavaScript、TypeScript、Go 和 Java 项目。当用户需要可视化代码结构、分析模块依赖、生成架构文档,或提及“代码架构图”、“依赖关系图”、“流程图”、“组织架构图”、“Mermaid 图”等关键词时触发。

MITAuto-check passedDevelopment

Install Code To Chart

skills CLI
$ npx skills add rongxinzy/RongxinAI --skill code-to-chart -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install rongxinzy/RongxinAI code-to-chart --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/rongxinzy/RongxinAI.git skills-src && mkdir -p .claude/skills && cp -r skills-src/SKILLs/code-to-chart .claude/skills/code-to-chart && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
code-to-chart
GitHub stars
154
Token cost
~596 tokens
SKILL.md length
130 words
Files
5 (incl. scripts)
Skills in repo
94
Repo updated
First seen
Licence
MIT

At a glance

解析代码仓库的 import/依赖关系,自动生成架构图、流程图和组织架构图,输出 Mermaid 文本或 SVG 图片。支持 Python、JavaScript、TypeScript、Go 和 Java 项目。当用户需要可视化代码结构、分析模块依赖、生成架构文档,或提及“代码架构图”、“依赖关系图”、“流程图”、“组织架构图”、“Mermaid 图”等关键词时触发。

  • Works in 3 steps: 架构图(Architecture Diagram) — 模块/目录级别的依赖关系 → 流程图(Flowchart) — 文件级别的 import 调用链路 → 组织架构图(Org Chart) — 目录/文件的层级结构
  • Tasks that involve Diagrams
  • SKILL.md covers 使用方式, 工作原理, 适用场景 and 依赖, plus 1 more section
  • Runs Python scripts from its folder; calls python3

What it does

Code To Chart is an agent skill from rongxinzy/RongxinAI. 解析代码仓库的 import/依赖关系,自动生成架构图、流程图和组织架构图,输出 Mermaid 文本或 SVG 图片。支持 Python、JavaScript、TypeScript、Go 和 Java 项目。当用户需要可视化代码结构、分析模块依赖、生成架构文档,或提及“代码架构图”、“依赖关系图”、“流程图”、“组织架构图”、“Mermaid 图”等关键词时触发。

Its SKILL.md is about 600 tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts (for example `scripts/analyze_codebase.py` and `zhiyuan/metadata.yaml`).

It sits in Development, covering Diagrams. It works with Mermaid, Python, Java and JavaScript. The repository describes itself as: An all-in-one local AI Agent workspace with a fully self-developed stack. The licence is MIT.

When your agent uses it

  • Tasks that involve Diagrams

Example prompts

  • “Mermaid 图”
  • “/code-to-chart”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. 架构图(Architecture Diagram) — 模块/目录级别的依赖关系
  2. 流程图(Flowchart) — 文件级别的 import 调用链路
  3. 组织架构图(Org Chart) — 目录/文件的层级结构

What it can do on your machine

Read from SKILL.md and the folder at commit 26406d6. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Code To Chart loads about 596 tokens when it runs. Until then it costs about 50 tokens; SKILL.md has 130 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~50
When it runs · the whole SKILL.md, loaded when a task matches
~596

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from rongxinzy/RongxinAI at commit 26406d6, republished under its MIT licence (© rongxinzy). 130 words, ~596 tokens.

Download SKILL.mdSave it as .claude/skills/code-to-chart/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
code-to-chart
description
解析代码仓库的 import/依赖关系,自动生成架构图、流程图和组织架构图,输出 Mermaid 文本或 SVG 图片。支持 Python、JavaScript、TypeScript、Go 和 Java 项目。当用户需要可视化代码结构、分析模块依赖、生成架构文档,或提及“代码架构图”、“依赖关系图”、“流程图”、“组织架构图”、“Mermaid 图”等关键词时触发。
license
MIT
metadata.type
tool
metadata.tags
visualization, architecture, mermaid, ast, diagram

Diagram Maker

将代码仓库的 import/依赖关系通过 AST 解析提取出来,自动生成三种图表:

  1. 架构图(Architecture Diagram) — 模块/目录级别的依赖关系
  2. 流程图(Flowchart) — 文件级别的 import 调用链路
  3. 组织架构图(Org Chart) — 目录/文件的层级结构

支持语言:Python、JavaScript、TypeScript、Go、Java

输出格式:Mermaid 文本(.mmd)或 SVG 图片(需系统安装 mmdc)

使用方式

基础用法:分析整个项目
bash
python3 scripts/analyze_codebase.py /path/to/project

输出三张 Mermaid 图到 stdout,同时写入当前目录下的 .mmd 文件。

指定图表类型
bash
# 仅生成架构图
python3 scripts/analyze_codebase.py /path/to/project --type architecture

# 仅生成流程图
python3 scripts/analyze_codebase.py /path/to/project --type flowchart

# 仅生成组织架构图
python3 scripts/analyze_codebase.py /path/to/project --type org
指定输出目录和格式
bash
# 输出到指定目录
python3 scripts/analyze_codebase.py /path/to/project --output /tmp/diagrams

# 输出 SVG(需要 mmdc)
python3 scripts/analyze_codebase.py /path/to/project --format svg

# 同时输出 Mermaid 和 SVG
python3 scripts/analyze_codebase.py /path/to/project --format both
输出 JSON 分析结果
bash
python3 scripts/analyze_codebase.py /path/to/project --json
参数说明
参数说明
directory要分析的代码目录(必填)
--type, -t图表类型:architecture、flowchart、org、all(默认 all)
--output, -o输出目录(默认当前目录)
--format, -f输出格式:mermaid、svg、both(默认 mermaid)
--max-files最大扫描文件数(默认 500)
--max-depth组织架构图最大深度(默认 4)
--json以 JSON 格式输出分析结果

工作原理

  1. 扫描阶段:递归遍历目录,跳过 node_modules、.git、__pycache__ 等
  2. 解析阶段:
    • Python 文件使用 ast 模块解析 import 和 from ... import 语句
    • JS/TS 文件使用正则匹配 import、require、export from
    • Go 文件使用正则匹配 import 语句
    • Java 文件使用正则匹配 import 语句
  3. 解析内部依赖:将 import 路径映射到项目内的实际文件
  4. 生成图表:将依赖关系转为 Mermaid 图表语法
  5. 渲染(可选):调用 mmdc(Mermaid CLI)将 .mmd 渲染为 SVG

适用场景

  • 快速了解陌生项目的模块结构
  • 代码审查时可视化依赖关系
  • 编写技术文档中的架构图
  • 发现循环依赖或过度耦合
  • 项目重构前的结构分析

依赖

  • Python 3.7+(标准库,无需额外安装)
  • SVG 输出需要 @mermaid-js/mermaid-cli(可选)

注意事项

  • 仅分析静态 import 关系,不追踪动态导入
  • 大型项目建议使用 --max-files 限制扫描范围
  • Mermaid 图在节点过多时可能渲染困难,建议配合 --type 分开查看

© rongxinzy, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (scripts) in SKILLs/code-to-chart of rongxinzy/RongxinAI.

  • SKILL.md
  • LICENSE
  • scripts/analyze_codebase.py
  • zhiyuan/icon.png
  • zhiyuan/metadata.yaml

Open the folder on GitHubat commit 26406d6

Compare with similar skills

Code To Chart next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Code To Chart compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Code To Chart this skillrongxinzy/RongxinAI154—~596Automated safety check: PassMIT
CodeScope Codebase Graph AnalysisQwenLM/qwen-code28k1 repos~9.3kAutomated safety check: PassApache-2.0
Code Flow Visualizerwentorai/research-plugins2981 repos~1.9kAutomated safety check: PassMIT
Code To Diagramzebbern/claude-code-guide4.7k1 repos~972Automated safety check: PassMIT
Cross-Language Coding Standardszereight/gitlab-mcp2k1 repos~1.4kAutomated safety check: PassMIT
Codegraph QAQwenLM/qwen-code-examples143—~4.3kAutomated safety check: PassNone

Similar skills

  • Answers questions about code structure, history, bugs and PR risk using a CodeScope knowledge graph and semantic index built from the repository.

    28k GitHub starsUsed in 1 repo~9.3k tokens
    DevelopmentAuto-check passed
  • Code Flow Visualizer

    wentorai/research-plugins

    Convert Python, JavaScript, and TypeScript functions into Mermaid flowcharts

    298 GitHub starsUsed in 1 repo~1.9k tokens
    DevelopmentAuto-check passed
  • Code To Diagram

    zebbern/claude-code-guide

    Analyze codebases and automatically generate architecture diagrams, flowcharts, and org charts.

    4.7k GitHub starsUsed in 1 repo~972 tokens
    DevelopmentAuto-check passed
  • Shared reference for naming, function size, complexity and error handling rules that reviewer agents apply across TypeScript, Python, Go, Rust, Java, C# and Swift.

    2k GitHub starsUsed in 1 repo~1.4k tokens
    DevelopmentAuto-check passed
  • Codegraph QA

    QwenLM/qwen-code-examples

    Use CodeScope to analyze any indexed codebase via its graph database (neug) and vector index (zvec).

    143 GitHub stars~4.3k tokensUpdated 4 mo ago
    DevelopmentAuto-check passed
  • Official

    Comprehensive technology stack blueprint generator that analyzes codebases to create detailed architectural documentation.

    40k GitHub starsUsed in 1 repo~2.5k tokens
    DevelopmentAuto-check passed

More from rongxinzy/RongxinAI

All 94 skills in this repo
  • SaaS Metrics Coach

    rongxinzy/RongxinAI

    SaaS financial health advisor. An agent skill from rongxinzy/RongxinAI.

    154 GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check passed
  • Churn Prevention

    rongxinzy/RongxinAI

    Reduce voluntary and involuntary churn through cancel flow design, save offers, exit surveys, and dunning sequences.

    154 GitHub starsUsed in 3 repos~2.6k tokens
    Auto-check passed
  • Presentation Studio

    rongxinzy/RongxinAI

    The only skill for creating a new PowerPoint deck. An agent skill from rongxinzy/RongxinAI.

    154 GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • Cantian Bazi

    rongxinzy/RongxinAI

    以命理场景为主的八字排盘、黄历查询与大运/流年/流月/流日/流时区间查询技能。用于用户请求“算八字”“四柱排盘”“阳历/农历转八字”“查黄历/宜忌”“查未来10年流年”“查下个月流日/流时”等场景;关键词包括:八字、四柱、命理、大运、流年、流月、流日、流时、时辰、阳历转八字、农历转八字、黄历、宜忌、干支日期。真太阳时换算属于辅助能力,仅在需要校时定盘时使用。

    154 GitHub starsUsed in 2 repos~2.1k tokens
    Auto-check passed
  • Zhiyuan Expert Manager

    rongxinzy/RongxinAI

    ZhiYuan Agent expert package lifecycle manager for the pi engine.

    154 GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Lark Mail

    rongxinzy/RongxinAI

    飞书邮箱:Use when user mentions 起草邮件、写邮件、草稿、发送/回复/转发邮件、查阅邮件、看邮件、搜索邮件、邮件文件夹、邮件标签、邮件联系人、监听新邮件、邮件收信规则等;use for mail/email intent only.

    154 GitHub starsUsed in 4 repos~4.1k tokens
    Auto-check: warnings

Categories

Questions about Code To Chart

What does Code To Chart do?

解析代码仓库的 import/依赖关系,自动生成架构图、流程图和组织架构图,输出 Mermaid 文本或 SVG 图片。支持 Python、JavaScript、TypeScript、Go 和 Java 项目。当用户需要可视化代码结构、分析模块依赖、生成架构文档,或提及“代码架构图”、“依赖关系图”、“流程图”、“组织架构图”、“Mermaid 图”等关键词时触发。. Code To Chart is an agent skill from rongxinzy/RongxinAI.

When should I use Code To Chart?

Code To Chart fits situations like: tasks that involve Diagrams.

How do I install Code To Chart in Claude Code?

Run `npx skills add rongxinzy/RongxinAI --skill code-to-chart -a claude-code`. Or copy the skill folder (SKILLs/code-to-chart in rongxinzy/RongxinAI) into .claude/skills/code-to-chart in your project. Claude Code loads it when a task matches its description.

How do I install Code To Chart in Codex?

Run `npx skills add rongxinzy/RongxinAI --skill code-to-chart -a codex`. Or copy the skill folder (SKILLs/code-to-chart in rongxinzy/RongxinAI) into .agents/skills/code-to-chart in your project. Codex loads it when a task matches its description.

Can I use Code To Chart in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add rongxinzy/RongxinAI --skill code-to-chart -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/code-to-chart, .gemini/skills/code-to-chart, .github/skills/code-to-chart and .opencode/skills/code-to-chart in your project.

What does Code To Chart need to run?

Going by SKILL.md and its folder, Code To Chart needs Python for the scripts in its folder and the command-line tools its instructions call (python3). Our summary lists: Python 3.

Does Code To Chart access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Code To Chart safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Code To Chart use?

Code To Chart is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Code To Chart use?

About 596 tokens (SKILL.md is roughly 2.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Code To Chart?

Skills that share tags, products or a category with Code To Chart: CodeScope Codebase Graph Analysis (QwenLM/qwen-code, 28k stars), Code Flow Visualizer (wentorai/research-plugins, 298 stars), Code To Diagram (zebbern/claude-code-guide, 4.7k stars) and Cross-Language Coding Standards (zereight/gitlab-mcp, 2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Code To Chart?

rongxinzy (a GitHub organization) maintains it in rongxinzy/RongxinAI, which has 154 GitHub stars. The repository holds 94 skills in this directory. The repository was last updated on October 8, 2026.

Source: rongxinzy/RongxinAI on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.