Agent skill

Fin Arch Diagram

by csmar432 in csmar432/finai-research

生成研究/项目架构图、流程图、层次图(swimlane / processflow / hierarchytree)。适合 PPT 汇报、技术文档、综述插图。输出风格接近 draw.io,可选 graphviz(高质量)/ matplotlib(零依赖)双后端。

MITAuto-check passedData & Analytics

Install Fin Arch Diagram

skills CLI
$ npx skills add csmar432/finai-research --skill fin-arch-diagram -a claude-code

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

GitHub CLI
$ gh skill install csmar432/finai-research fin-arch-diagram --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/csmar432/finai-research.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.cursor/skills/fin-arch-diagram .claude/skills/fin-arch-diagram && 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
fin-arch-diagram
GitHub stars
109
Token cost
~1.5k tokens
SKILL.md length
348 words
Files
1
Skills in repo
15
Repo updated
First seen
Licence
MIT

At a glance

生成研究/项目架构图、流程图、层次图(swimlane / processflow / hierarchytree)。适合 PPT 汇报、技术文档、综述插图。输出风格接近 draw.io,可选 graphviz(高质量)/ matplotlib(零依赖)双后端。

  • Works in 4 steps: 不阻塞流水线 — 所有生成失败都 best-effort,不抛异常 → 自动 fallback — graphviz 不可用时自动回退 matplotlib → 可重复运行 — 同一 spec 输出相同结果(DOT 渲染确定性) → …
  • Tasks that involve Data visualization
  • SKILL.md covers 触发条件, 三种图类型, 推荐用法(PPT 制作最常用) and 5 张参考 demo(直接看效果), plus 10 more sections
  • Calls python, brew and pip

What it does

Fin Arch Diagram is an agent skill from csmar432/finai-research. 生成研究/项目架构图、流程图、层次图(swimlane / processflow / hierarchytree)。适合 PPT 汇报、技术文档、综述插图。输出风格接近 draw.io,可选 graphviz(高质量)/ matplotlib(零依赖)双后端。

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Data & Analytics, covering Data visualization and Econometrics and empirical research. It works with Matplotlib, draw.io and Python. The repository describes itself as: Evidence-first AI workflow for economic and financial research: literature → identification → data → econometrics → verifiable LaTeX. 43 data sources, 58 method modules, 18 AI… The licence is MIT.

When your agent uses it

  • Tasks that involve Data visualization
  • Tasks that involve Econometrics and empirical research

Example prompts

  • “/fin-arch-diagram”

Requirements

  • Python 3

Workflow steps

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

  1. 不阻塞流水线 — 所有生成失败都 best-effort,不抛异常
  2. 自动 fallback — graphviz 不可用时自动回退 matplotlib
  3. 可重复运行 — 同一 spec 输出相同结果(DOT 渲染确定性)
  4. 跨平台 — macOS / Linux / Windows 统一行为

What it can do on your machine

Read from SKILL.md and the folder at commit 47eebb7. 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

    Shell commands in SKILL.md call:

    • python
    • brew
    • pip

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

  • Network

    No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.

    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

Fin Arch Diagram loads about 1.5k tokens when it runs. Until then it costs about 38 tokens; SKILL.md has 348 words of instructions outside code blocks.

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

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from csmar432/finai-research at commit 47eebb7, republished under its MIT licence (© csmar432). 348 words, ~1,475 tokens.

Download SKILL.mdSave it as .claude/skills/fin-arch-diagram/SKILL.md (or your agent's skills folder).
name
fin-arch-diagram
description
生成研究/项目架构图、流程图、层次图(swim_lane / process_flow / hierarchy_tree)。适合 PPT 汇报、技术文档、综述插图。输出风格接近 draw.io,可选 graphviz(高质量)/ matplotlib(零依赖)双后端。
trigger
架构图|架构|流程图|流程|层次图|层次|swim_lane|process_flow|hierarchy|画架构|生成架构图|绘制流程图|绘制架构图|画一个流程图|组织架构图|架构示意图|系统架构图
version
1.0.0
created
2026-08-02
tags
visualization, architecture, diagram, graphviz, swim-lane, process-flow, hierarchy, ppt, presentation

fin-arch-diagram

生成高质量架构/流程/层次图,专为 PPT 汇报和技术文档插图设计。 不依赖数据(与 fin-viz-launch / fin-paper-figure 的"数据图表"互补), 不阻塞论文流水线(用户主动触发)。

触发条件

  • 关键词: 架构图 架构 流程图 流程 层次图 层次 swim_lane process_flow hierarchy 画架构 生成架构图 绘制流程图 绘制架构图 画一个流程图 组织架构图 架构示意图 系统架构图
  • Skill 语法: Skill: fin-arch-diagram "[描述]"
  • 前置条件: 无需数据 / 无需 DataFrame

三种图类型

类型用途函数graphviz 风格
swim_lane系统架构(多层 + 泳道)swim_lane_gv()✅ ~92% 接近 draw.io
process_flow业务流程(决策菱形 + 分支 + 循环)process_flow_gv()✅ 决策菱形 + yes/no 边
hierarchy_tree树状/层级(树/CONSORT/组织架构)hierarchy_tree_gv()✅ tree/consort/org 三风格

推荐用法(PPT 制作最常用)

python
from scripts.research_framework.arch_diagram_gv import draw_diagram
from scripts.research_framework.arch_diagram import (
    DiagramSpec, Node, Edge, Layer,
)

# 例:生成 FinResearch Agent 系统架构图
spec = DiagramSpec(
    title="FinResearch Agent · 系统架构",
    layers=[
        Layer("USER LAYER", y_top=70, y_bottom=55, color="#FDEBD0", text_color="#D68910"),
        Layer("SKILLS LAYER", y_top=53, y_bottom=38, color="#D6EAF8", text_color="#21618C"),
        Layer("PERSISTENCE", y_top=36, y_bottom=21, color="#EBDEF0", text_color="#6C3483"),
        Layer("INFRASTRUCTURE", y_top=19, y_bottom=4, color="#D5F5E3", text_color="#1E8449"),
    ],
    nodes=[
        Node("u1", "Researchers", layer="USER LAYER", color="#E67E22", icon="U"),
        Node("u2", "HitL Reviewer", layer="USER LAYER", color="#E67E22", icon="U"),
        Node("a1", "Orchestrator", layer="SKILLS LAYER", column="Sub-agents",
             color="#1ABC9C", icon="1"),
        Node("p1", "fin-full-pipeline", layer="SKILLS LAYER", column="Pipelines",
             color="#3498DB", icon="1"),
        # ... 更多节点
    ],
    edges=[
        Edge("u1", "p1"),
        Edge("p1", "a1", label="dispatch", style="invoke"),
        Edge("a1", "u2", label="HITL", style="invoke"),
        # ... 更多边
    ],
)

# 默认 graphviz 后端(接近 draw.io 风格)
out = draw_diagram(spec, "output/figures/finresearch_arch.png")
print(f"生成: {out}")

# 显式指定后端
out = draw_diagram(spec, "out.png", engine="graphviz")    # 高质量 (推荐)
out = draw_diagram(spec, "out.png", engine="matplotlib")  # 零系统依赖

5 张参考 demo(直接看效果)

bash
python scripts/research_framework/arch_diagram_demos.py

输出(graphviz 后端,浅色风格):

  • output/figures/demo_arch_finresearch_gv.png — 系统架构 4 层 × 3 泳道
  • output/figures/demo_hierarchy_pipeline_gv.png — 8 步研究流水线
  • output/figures/demo_process_flow_gv.png — 决策菱形 + yes/no 分支 + 自循环
  • output/figures/demo_consort_gv.png — CONSORT 样本筛选
  • output/figures/demo_org_chart_gv.png — 组织架构(纵向)

节点 (Node) 字段

字段类型说明
idstr唯一标识,用于 Edge 引用
labelstr显示文字(支持 \n 多行)
colorstr边框色 hex(如 #3498DB)
iconstricon Unicode 字符(U=👤, 1-5=①-⑤, ?=❓, S=▶, E=■, K=📚, D=💾, P=📋, M=🔌, L=🧠)
layerstr所属 layer 名称
columnstr所属泳道名称(layer 内的纵向分隔)

边 (Edge) 字段

字段类型说明
src / dststr源/目标节点 id
labelstr边标签文字
stylestrsolid/dashed/dotted/invoke(红)/loop(黄)/data(蓝)
arrowstr->(默认)/<-(反向)/<->(双向)
colorstr自定义边颜色(覆盖 style 默认色)

Layer 字段

字段类型说明
namestrLayer 名称(也作 cluster key)
y_top / y_bottomint兼容 matplotlib 后端的纵向范围(graphviz 后端自动忽略)
colorstrLayer 背景填充色 hex
text_colorstrLayer 标题文字色 hex

双后端行为对照

维度matplotlib 后端graphviz 后端(默认)
系统依赖❌ 纯 Python⚠️ 需 brew install graphviz + pip install graphviz
自动布局❌ 手动坐标✅ graphviz 智能布局
视觉风格基础⭐⭐⭐⭐ 接近 draw.io
用户体感简单但粗糙专业、像素级对齐
Fallback—graphviz 不可用时自动 fallback 到 matplotlib

cross-platform: macOS / Linux / Windows 全兼容。 graphviz 不可用时 draw_diagram() 会自动警告并 fallback,不抛异常。

在 agent_pipeline 中可选自动生成

论文流水线 PLOTTING 阶段完成时,可通过 CLI flag 触发自动生成:

bash
python scripts/agent_pipeline.py --topic "数字金融与企业创新" --auto-arch
  • 默认: 不生成(避免无意义 IO)
  • 开启后: 在 output/arch_diagrams/ 输出架构图
  • 失败: 不阻塞流水线(best-effort 模式)

何时用 fin-arch-diagram vs fin-viz-launch

场景用这个
画 PPT 用系统架构图fin-arch-diagram ← 本文
画 PPT 用研究流程图fin-arch-diagram ← 本文
画 PPT 用组织架构图fin-arch-diagram ← 本文
画论文 DID 平行趋势图fin-viz-launch
画论文 PSM 倾向得分图fin-viz-launch
画论文相关性热力图fin-paper-figure

核心区别:

  • 架构图 = 不依赖数据的"结构图"
  • 数据图表 = 依赖数据的"统计图"

输出规范

output/
├── figures/
│   └── finresearch_arch.png    # graphviz 后端 PNG(≥300 DPI 等价)
└── arch_diagrams/              # agent_pipeline --auto-arch 输出
    └── arch_<topic>_<timestamp>.png

约束

  1. 不阻塞流水线 — 所有生成失败都 best-effort,不抛异常
  2. 自动 fallback — graphviz 不可用时自动回退 matplotlib
  3. 可重复运行 — 同一 spec 输出相同结果(DOT 渲染确定性)
  4. 跨平台 — macOS / Linux / Windows 统一行为

依赖项

  • scripts/research_framework/arch_diagram.py — matplotlib 后端 (1038 行)
  • scripts/research_framework/arch_diagram_gv.py — graphviz 后端 (新增)
  • scripts/research_framework/arch_diagram_demos.py — 5 张 demo runner
  • 系统命令 dot (graphviz) — 已验证 macOS brew install graphviz

注意事项

⚠️ 图标使用 Unicode emoji(👤📚💾🔌🧠 等),不同操作系统的 emoji 字体可能略有差异。 macOS 默认支持;Linux 需安装 noto-coloremoji;Windows 11+ 自带 Segoe UI Emoji。 如果对图标一致性要求严格,可改为图标编号(icon="1" 等)。

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

Files

Just SKILL.md in .cursor/skills/fin-arch-diagram of csmar432/finai-research.

Open the folder on GitHubat commit 47eebb7

Compare with similar skills

Fin Arch Diagram 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.

Fin Arch Diagram compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Fin Arch Diagram this skillcsmar432/finai-research109—~1.5kAutomated safety check: PassMIT
Scientific Figure MakingChenLiu-1996/figures4papers8.3k—~557Automated safety check: PassCustom licence
FigMirrorVILA-Lab/FigMirror521—~2.4kAutomated safety check: PassNone
Agent Figure GalleryDsadd4/AgentFigureGallery163—~643Automated safety check: PassMIT
Scientific Figure Generationlingzhi227/agent-research-skills390—~809Automated safety check: PassNone
Molecular Visualization 3dmoljaechang-hits/SciAgent-Skills374—~3.2kAutomated safety check: PassBSD-3-Clause

Similar skills

  • Scientific Figure Making

    ChenLiu-1996/figures4papers

    Covers publication-ready matplotlib figures for academic papers, slides, and reports—bars, trends, scatter, heatmaps, and multi-panel layouts—with this…

    8.3k GitHub stars~557 tokensUpdated yesterday
    Data & AnalyticsAuto-check passed
  • FigMirror

    VILA-Lab/FigMirror

    Mirrors the visual style of a top-conference paper figure onto your own data, producing a camera-ready PDF and a self-contained matplotlib script.

    521 GitHub stars~2.4k tokensUpdated 11 days ago
    Data & AnalyticsAuto-check passed
  • Agent Figure Gallery

    Dsadd4/AgentFigureGallery

    Lets a plotting agent query a gallery of scientific figure references, show candidates for you to pick from, and export the chosen ones before it writes plot code.

    163 GitHub stars~643 tokensUpdated 1 mo ago
    Data & AnalyticsAuto-check passed
  • Scientific Figure Generation

    lingzhi227/agent-research-skills

    Generates publication-quality scientific figures with matplotlib or seaborn through query expansion, a run-and-retry coding loop and a visual check of the rendered PNG.

    390 GitHub stars~809 tokensUpdated 7 mo ago
    Data & AnalyticsAuto-check passed
  • Molecular Visualization 3dmol

    jaechang-hits/SciAgent-Skills

    3Dmol.js WebGL molecular visualization emitted as self-contained HTML.

    374 GitHub stars~3.2k tokensUpdated 12 days ago
    Data & AnalyticsAuto-check passed
  • Bio Copy Number Cnv Visualization

    FreedomIntelligence/OpenClaw-Medical-Skills

    Visualize copy number profiles, segments, and compare across samples.

    3.1k GitHub stars~2.6k tokensUpdated 2 mo ago
    Data & AnalyticsAuto-check passed

More from csmar432/finai-research

All 15 skills in this repo
  • Fin Brief Generator

    csmar432/finai-research

    根据用户输入或已有研究输出(文献综述/想法报告/新颖性报告),自动生成或更新FINBRIEF.md,减少用户填写负担. An agent skill from csmar432/finai-research.

    109 GitHub stars~1.7k tokensUpdated 5 days ago
    Auto-check passed
  • Fin Data Acquisition

    csmar432/finai-research

    根据REFINEDDESIGN.md中的变量定义,自动获取所需数据并生成可执行的回归分析脚本(Python/Stata)。

    109 GitHub stars~2k tokensUpdated 5 days ago
    Auto-check passed
  • Fin Experiment Design

    csmar432/finai-research

    经济金融实证方法设计。根据研究想法和REFINEDDESIGN.md,生成完整的实证研究设计方案,覆盖识别策略选择、样本构建、变量定义、稳健性检验清单和内生性处理方案。

    109 GitHub stars~4.2k tokensUpdated 5 days ago
    Auto-check passed
  • Fin Generate Idea

    csmar432/finai-research

    针对经济金融研究方向的创意生成与评估。生成8-12个可发表的研究idea,过滤后在数据可行的情况下进行小规模实证验证,输出排序后的研究想法报告。

    109 GitHub stars~2.5k tokensUpdated 5 days ago
    Auto-check passed
  • Fin Idea Discovery

    csmar432/finai-research

    经济金融研究的完整想法发现流程。从研究方向出发,经过文献综述、想法生成、新颖性验证、实证方法设计和数据获取,输出经过数据实证验证的可执行研究方案。

    109 GitHub stars~2.7k tokensUpdated 5 days ago
    Auto-check passed
  • Fin Lit Review

    csmar432/finai-research

    经济金融领域的系统性文献综述。整合 Semantic Scholar + ArXiv + OpenAlex + NBER 构建引文网络,识别研究缺口,生成结构化文献地图。

    109 GitHub stars~1.2k tokensUpdated 5 days ago
    Auto-check passed

Questions about Fin Arch Diagram

What does Fin Arch Diagram do?

生成研究/项目架构图、流程图、层次图(swimlane / processflow / hierarchytree)。适合 PPT 汇报、技术文档、综述插图。输出风格接近 draw.io,可选 graphviz(高质量)/ matplotlib(零依赖)双后端。. Fin Arch Diagram is an agent skill from csmar432/finai-research.

When should I use Fin Arch Diagram?

Fin Arch Diagram fits situations like: tasks that involve Data visualization; tasks that involve Econometrics and empirical research.

How do I install Fin Arch Diagram in Claude Code?

Run `npx skills add csmar432/finai-research --skill fin-arch-diagram -a claude-code`. Or copy the skill folder (.cursor/skills/fin-arch-diagram in csmar432/finai-research) into .claude/skills/fin-arch-diagram in your project. Claude Code loads it when a task matches its description.

How do I install Fin Arch Diagram in Codex?

Run `npx skills add csmar432/finai-research --skill fin-arch-diagram -a codex`. Or copy the skill folder (.cursor/skills/fin-arch-diagram in csmar432/finai-research) into .agents/skills/fin-arch-diagram in your project. Codex loads it when a task matches its description.

Can I use Fin Arch Diagram 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 csmar432/finai-research --skill fin-arch-diagram -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/fin-arch-diagram, .gemini/skills/fin-arch-diagram, .github/skills/fin-arch-diagram and .opencode/skills/fin-arch-diagram in your project.

What does Fin Arch Diagram need to run?

Going by SKILL.md and its folder, Fin Arch Diagram needs the command-line tools its instructions call (python, brew and pip). Our summary lists: Python 3.

Does Fin Arch Diagram access the network?

SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Fin Arch Diagram 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. Review the folder before installing.

What licence does Fin Arch Diagram use?

Fin Arch Diagram is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Fin Arch Diagram use?

About 1.5k tokens (SKILL.md is roughly 5.9k 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 Fin Arch Diagram?

Skills that share tags, products or a category with Fin Arch Diagram: Scientific Figure Making (ChenLiu-1996/figures4papers, 8.3k stars), FigMirror (VILA-Lab/FigMirror, 521 stars), Agent Figure Gallery (Dsadd4/AgentFigureGallery, 163 stars) and Scientific Figure Generation (lingzhi227/agent-research-skills, 390 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Fin Arch Diagram?

csmar432 (a GitHub user) maintains it in csmar432/finai-research, which has 109 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on October 6, 2026.

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