Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问许可证需确认审计提醒

update-workflow-diagram更新工作流程图

Agent Skill

update-workflow-diagram 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

321

周安装

13

GitHub Stars

163

下载量

101
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:update-workflow-diagram(更新工作流程图)
来源仓库:https://github.com/oocx/tfplan2md
仓库路径:skills/update-workflow-diagram
安装命令:
npx skills add https://github.com/oocx/tfplan2md --skill update-workflow-diagram
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/oocx/tfplan2md --skill update-workflow-diagram

简介

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合在需要围绕仓库状态、代码变更或协作事项进行整理时使用。
  • 可结合来源仓库、安装命令和原始 README 继续核验具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 注意该技能分类为前端设计,可能与工作流可视化相关。

SKILL.md

Update Workflow Diagram from Mermaid

Purpose

Regenerate the website/ai-workflow.svg file from the canonical mermaid diagram in docs/agents.md. The website uses a hand-crafted blueprint-styled SVG that preserves the exact layout generated by mermaid but applies a custom visual style (technical drawing aesthetic with cyan/white on dark blue).

When to Use

  • After changes to the mermaid diagram in docs/agents.md
  • When adding, removing, or renaming agents/artifacts
  • When modifying the workflow connections

Hard Rules

Must

  • Use mermaid-cli (mmdc) to render the mermaid diagram to SVG
  • Parse the generated SVG to extract node positions and path definitions
  • Preserve exact node positions and path routing from mermaid output
  • Apply blueprint styling consistently per node type
  • Keep the SVG self-contained (all styles inline or in <style> block)

Must Not

  • Manually calculate node positions (extract from rendered mermaid SVG)
  • Manually recreate path curves (copy exact d attributes from mermaid paths)
  • Change the visual styling without updating this skill documentation

Blueprint Style Reference

Colors

ElementColorNotes
Background#0d1b2aDark navy blue
Grid linesrgba(255,255,255,0.1)Subtle white grid
Agent borders#00ffff (cyan)Solid 2px
Agent text#ffffff (white)Monospace font
Meta-agent borders#34d399 (green)Solid 2px
Meta-agent text#34d399 (green)Monospace font
Artifact borders#ffffff (white)Dashed 2px (2,2)
Artifact fillrgba(0,255,255,0.1)Subtle cyan
Artifact text#00ffff (cyan)Monospace font
Human borders#ffffff (white)Dashed 2px (4,2)
Human text#00ffff (cyan)Monospace font
Paths (solid)#00ffff (cyan)2px with glow
Paths (dashed/feedback)#ff6b6b (coral red)2px, dasharray 6,3
Arrow markersSame as path color

Node Classes (from mermaid)

Mermaid ClassSVG ClassDescription
humannode-humanMaintainer (dashed white border)
agentnode-agentRegular agents (solid cyan border)
metaagentnode-metaagentWorkflow Engineer (solid green border)
artifactnode-artifactProduced documents (dashed white, cyan fill)

Glow Effects

All nodes and paths have CSS filter glow:

/* Nodes */
filter: drop-shadow(0 0 4px rgba(0,255,255,0.6));

/* Paths */
filter: drop-shadow(0 0 2px rgba(0,255,255,0.4));

Actions

1. Extract Mermaid Diagram from agents.md

The mermaid diagram is embedded in docs/agents.md within a fenced code block. Extract it to a temporary file:

# Create temp directory if needed
scripts/setup-tmp.sh

# Extract the mermaid diagram from agents.md
sed -n '/^```mermaid$/,/^```$/p' docs/agents.md | sed '1d;$d' > .tmp/workflow.mmd

This extracts everything between ``` `mermaid `` and the closing `` ` ```.

2. Render Mermaid to SVG using mermaid-cli

Use the mermaid-cli (mmdc) to render the diagram to SVG. Install if needed:

# Option A: Use npx (no global install needed)
npx -p @mermaid-js/mermaid-cli mmdc -i .tmp/workflow.mmd -o .tmp/workflow-raw.svg -t dark

# Option B: Global install
npm install -g @mermaid-js/mermaid-cli
mmdc -i .tmp/workflow.mmd -o .tmp/workflow-raw.svg -t dark

# Option C: Docker (no Node.js required)
docker run --rm -v "$(pwd)/.tmp:/data" minlag/mermaid-cli -i /data/workflow.mmd -o /data/workflow-raw.svg -t dark

The -t dark flag uses dark theme which matches our target styling better.

3. Parse the Generated SVG

The generated .tmp/workflow-raw.svg contains all the positioning data. Parse it to extract:

3a. Get ViewBox

grep -o 'viewBox="[^"]*"' .tmp/workflow-raw.svg

3b. Extract Node Data

Use a script or manual inspection to extract node information. Each node in the mermaid SVG has:

  • A <g> element with class containing the node ID (e.g., flowchart-HUMAN-0)
  • A transform attribute with the position
  • A <rect> or <polygon> for the shape
  • Text content in <span> or <foreignObject>

Example extraction with grep/sed:

# List all node groups with their transforms
grep -E '<g[^>]*class="[^"]*node[^"]*"' .tmp/workflow-raw.svg

3c. Extract Path Data

Paths are <path> elements with class flowchart-link. Extract the d attributes:

# Extract all path d attributes
grep -o 'd="M[^"]*"' .tmp/workflow-raw.svg | head -40

3d. Extract Edge Labels

Edge labels are in <g class="edgeLabel"> elements:

grep -A5 'edgeLabel' .tmp/workflow-raw.svg

4. Identify Node Types from Mermaid Source

Read the class definitions from the mermaid source in docs/agents.md:

class HUMAN human;
class IA_AGENT,RE,AR,TP_AGENT,QE,DEV,TW,CR,UAT_AGENT,RM,RETRO_AGENT agent;
class WE metaagent;
class IA,FS,US,ADR,TP,CODE,DOCS,CRR,REL,PR,WD,UAT,RETRO artifact;

Map each node ID to its SVG class:

Node IDMermaid ClassSVG Class
HUMANhumannode-human
WEmetaagentnode-metaagent
RE, AR, QE, TP_AGENT, DEV, TW, CR, UAT_AGENT, RM, RETRO_AGENT, IA_AGENTagentnode-agent
FS, IA, WD, ADR, TP, US, CODE, DOCS, CRR, UAT, REL, PR, RETROartifactnode-artifact

5. Identify Path Types from Mermaid Source

Read the connection definitions to classify paths:

Connection SyntaxPath TypeExample
==>path-thickHUMAN ==> RE
-->path-solidRE --> FS --> AR
-- "label" -->path-solidCRR -- "Approved" --> UAT_AGENT
-. or -.- or -. "label".->path-dashedCRR -. "Rework".-> DEV

The dashed paths are feedback loops: "Rework" and "Rendering Issues".

6. Build the Blueprint SVG

Create website/ai-workflow.svg using the template structure. The key transformation steps:

  1. Copy viewBox from the mermaid-generated SVG
  2. Add defs section with grid pattern and arrow markers
  3. Add style section with blueprint CSS classes
  4. Add background with dark blue fill and grid overlay
  5. Copy all paths with their exact d attributes, applying the correct class:

- First 3 paths (from HUMAN): path-thick - Paths with dashed style in source: path-dashed - All others: path-solid

  1. Copy all nodes with their exact transforms, applying the correct class based on node type
  2. Add edge labels at their extracted positions

7. Node Text Formatting

When copying node text, apply these transformations:

  • Remove <b> tags
  • For HUMAN node: Use 👤 MAINTAINER (all caps)
  • For agents: Use the agent name as-is
  • For artifacts: Keep the emoji prefix (📄, 📐, ✓, 📋, 💻, 📚, ✅, 🧪, 🚀, 🔀, 📝, 🔍, ⚙️)

8. Verify the Result

  1. Start local server: python -m http.server 3000
  2. Open http://127.0.0.1:3000/website/ai-workflow.html
  3. Check:

- All nodes visible with correct styling - All paths connect correctly - Grid overlay visible - Glow effects applied - Text readable

  1. Run verification: scripts/website-verify.sh --all

SVG Template

<svg xmlns="http://www.w3.org/2000/svg" viewBox="{{VIEWBOX}}" role="graphics-document document" aria-roledescription="flowchart-v2">
  <defs>
    <!-- Blueprint grid pattern -->
    <pattern id="grid-blueprint" width="20" height="20" patternUnits="userSpaceOnUse">
      <path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/>
    </pattern>

    <!-- Arrow markers -->
    <marker id="arrow-solid" markerWidth="4" markerHeight="4" refX="3.5" refY="2" orient="auto">
      <path d="M0,0 L0,4 L4,2 z" fill="#00ffff"/>
    </marker>
    <marker id="arrow-dashed" markerWidth="4" markerHeight="4" refX="3.5" refY="2" orient="auto">
      <path d="M0,0 L0,4 L4,2 z" fill="#ff6b6b"/>
    </marker>
    <marker id="arrow-thick" markerWidth="4" markerHeight="4" refX="3.5" refY="2" orient="auto">
      <path d="M0,0 L0,4 L4,2 z" fill="#00ffff"/>
    </marker>
  </defs>

  <style>
    /* Human/Maintainer node */
    .node-human rect { fill: none; stroke: #ffffff; stroke-width: 2; stroke-dasharray: 4,2; }
    .node-human text { fill: #00ffff; font-family: monospace; font-size: 13px; font-weight: 600; }
    .node-human { filter: drop-shadow(0 0 4px rgba(0,255,255,0.6)); }

    /* Agent nodes */
    .node-agent rect { fill: none; stroke: #00ffff; stroke-width: 2; }
    .node-agent text { fill: #ffffff; font-family: monospace; font-size: 13px; font-weight: 600; }
    .node-agent { filter: drop-shadow(0 0 4px rgba(0,255,255,0.6)); }

    /* Meta-agent nodes */
    .node-metaagent rect { fill: none; stroke: #34d399; stroke-width: 2; }
    .node-metaagent text { fill: #34d399; font-family: monospace; font-size: 13px; font-weight: 600; }
    .node-metaagent { filter: drop-shadow(0 0 4px rgba(52,211,153,0.6)); }

    /* Artifact nodes */
    .node-artifact rect { fill: rgba(0,255,255,0.1); stroke: #ffffff; stroke-width: 2; stroke-dasharray: 2,2; }
    .node-artifact text { fill: #00ffff; font-family: monospace; font-size: 13px; font-weight: 600; }
    .node-artifact { filter: drop-shadow(0 0 4px rgba(0,255,255,0.6)); }

    /* Paths */
    .path-solid { fill: none; stroke: #00ffff; stroke-width: 2; filter: drop-shadow(0 0 2px rgba(0,255,255,0.4)); }
    .path-thick { fill: none; stroke: #00ffff; stroke-width: 2; filter: drop-shadow(0 0 2px rgba(0,255,255,0.4)); }
    .path-dashed { fill: none; stroke: #ff6b6b; stroke-width: 2; stroke-dasharray: 6,3; filter: drop-shadow(0 0 2px rgba(255,107,107,0.4)); }

    /* Edge labels */
    .edge-label { fill: rgba(0,255,255,0.8); font-family: monospace; font-size: 10px; font-weight: 500; }
    .edge-label-bg { fill: #0d1b2a; }
  </style>

  <!-- Background with grid -->
  <rect x="{{X}}" y="{{Y}}" width="{{WIDTH}}" height="{{HEIGHT}}" fill="#0d1b2a"/>
  <rect x="{{X}}" y="{{Y}}" width="{{WIDTH}}" height="{{HEIGHT}}" fill="url(#grid-blueprint)"/>

  <!-- PATHS (render first, behind nodes) -->
  <!-- Thick paths from HUMAN -->
  <path class="path-thick" marker-end="url(#arrow-thick)" d="{{PATH_D}}"/>

  <!-- Regular solid paths -->
  <path class="path-solid" marker-end="url(#arrow-solid)" d="{{PATH_D}}"/>

  <!-- Dashed paths (feedback loops) -->
  <path class="path-dashed" marker-end="url(#arrow-dashed)" d="{{PATH_D}}"/>

  <!-- Edge labels -->
  <g transform="translate({{X}}, {{Y}})">
    <rect class="edge-label-bg" x="-{{W/2}}" y="-10" width="{{W}}" height="20" rx="3"/>
    <text class="edge-label" text-anchor="middle" dy="4">{{LABEL_TEXT}}</text>
  </g>

  <!-- NODES -->
  <!-- Human -->
  <g class="node-human" transform="translate({{X}}, {{Y}})">
    <rect x="-{{W/2}}" y="-{{H/2}}" width="{{W}}" height="{{H}}" rx="2" ry="2"/>
    <text text-anchor="middle" dy="5">👤 MAINTAINER</text>
  </g>

  <!-- Agent -->
  <g class="node-agent" transform="translate({{X}}, {{Y}})">
    <rect x="-{{W/2}}" y="-{{H/2}}" width="{{W}}" height="{{H}}" rx="2" ry="2"/>
    <text text-anchor="middle" dy="5">{{AGENT_NAME}}</text>
  </g>

  <!-- Meta-agent -->
  <g class="node-metaagent" transform="translate({{X}}, {{Y}})">
    <rect x="-{{W/2}}" y="-{{H/2}}" width="{{W}}" height="{{H}}" rx="2" ry="2"/>
    <text text-anchor="middle" dy="5">{{AGENT_NAME}}</text>
  </g>

  <!-- Artifact -->
  <g class="node-artifact" transform="translate({{X}}, {{Y}})">
    <rect x="-{{W/2}}" y="-{{H/2}}" width="{{W}}" height="{{H}}" rx="2" ry="2"/>
    <text text-anchor="middle" dy="5">{{ARTIFACT_NAME}}</text>
  </g>
</svg>

Updating ai-workflow.html

Ensure website/ai-workflow.html references the SVG:

<section class="workflow-diagram">
  <object data="ai-workflow.svg" type="image/svg+xml"
          style="width: 100%; height: auto; max-height: 80vh;">
    <p>Workflow diagram - <a href="ai-workflow.svg">View SVG</a></p>
  </object>
</section>

Prerequisites

  • mermaid-cli: Install via npm install -g @mermaid-js/mermaid-cli or use npx/Docker
  • Local server: Python (python -m http.server) or similar for verification

Golden Example

The current website/ai-workflow.svg was generated from the mermaid diagram at commit on main branch. Key metrics:

  • ViewBox: -8 -8 686.43359375 2087.03125
  • Nodes: 26 total (1 human, 11 agents, 1 meta-agent, 13 artifacts)
  • Paths: 32 total (3 thick from HUMAN, 27 solid, 2 dashed feedback loops)
  • Edge Labels: 5 (Rework, Approved (UAT needed), Approved (no UAT), Rendering Issues, Approved)

Troubleshooting

Paths don't align with nodes

  • Ensure you're using the exact d attribute from mermaid output, not recalculating
  • Check that node transforms use the same coordinate system

Text is cut off

  • Mermaid may use <foreignObject> for text; extract inner text content
  • Adjust rect width if needed based on text measurement

Glow not visible

  • Check that CSS filter properties are applied to the <g> element, not child elements
  • Some browsers may need vendor prefixes for filters

Colors look wrong

  • Verify the background color is #0d1b2a
  • Check that the grid pattern uses white (rgba(255,255,255,0.1)), not cyan

References

  • Blueprint design source: website/prototypes/diagram-designs-svg.html (Design 7)
  • Mermaid source: docs/agents.md (search for ``` `mermaid ```)
  • Node class mappings: docs/agents.md (search for classDef and class)

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

38.07%
按下载量换算38

Claude

28.53%
按下载量换算29

Cursor

18.38%
按下载量换算19

Gemini CLI

8.77%
按下载量换算9

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills