skills/mermaid-ascii/SKILL.md
Mermaid 圖表 ASCII 渲染工具。Use for: (1) 將 Mermaid 圖表轉為純文字 ASCII, (2) 在不支援圖形的環境中顯示流程圖, (3) 文件中嵌入文字版圖表
npx skillsauth add tarrragon/claude mermaid-asciiInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
純 Python 實現 Mermaid 圖表的 ASCII 渲染工具。
mermaid-ascii 是一個完整的 Python 套件(使用 hatchling 打包系統),包含以下元件:
.claude/skills/mermaid-ascii/
├── pyproject.toml # 套件配置(PEP 517 標準)
├── SKILL.md # 本文件
├── mermaid_ascii/ # Python 套件
│ ├── __init__.py # 套件入口,導出公開 API
│ ├── mermaid_ascii_renderer.py # 核心渲染引擎
│ └── scripts/
│ ├── __init__.py
│ ├── __main__.py # 命令列模組入口(python -m mermaid_ascii)
│ └── render.py # CLI 指令碼(mermaid-ascii 命令)
└── .venv/ # 虛擬環境
# 使用 uv 進行開發安裝
uv pip install -e .
# 之後可直接使用命令列工具
mermaid-ascii --input diagram.mmd --unicode
# 使用 uv 直接運行套件
uv run -C /path/to/mermaid-ascii --input diagram.mmd --unicode
# 或使用 stdin
cat diagram.mmd | uv run -C /path/to/mermaid-ascii --ascii
# 從 PyPI 安裝
uv pip install mermaid-ascii
# 使用 uv run with 選項
uv run --with mermaid-ascii mermaid-ascii --input diagram.mmd --unicode
目前支援以下 5 種 Mermaid 圖表類型的 ASCII 和 Unicode 渲染:
| 圖表類型 | 描述 | 主要用途 | |---------|------|--------| | Flowchart | 流程圖 | 表示系統或過程的流程和決策邏輯 | | State Diagram | 狀態圖 | 表示對象或系統的不同狀態及其轉移 | | Sequence Diagram | 序列圖 | 表示參與者之間的時間序列交互 | | Class Diagram | 類別圖 | 表示系統中的類別結構和關係 | | ER Diagram | 實體關係圖 | 表示資料庫設計中的實體和關係 |
詳細的圖表類型說明、支援的元素和使用範例請參考 references/supported-diagrams.md。
# 從檔案輸入,輸出 Unicode 格式
mermaid-ascii --input diagram.mmd --unicode
# 從檔案輸入,輸出 ASCII 格式
mermaid-ascii --input diagram.mmd --ascii
# 從 stdin(pipe)輸入
cat diagram.mmd | mermaid-ascii --unicode
# 查看版本
mermaid-ascii --version
from mermaid_ascii import render_mermaid
diagram = """
flowchart TD
A[開始]
B[處理]
C[結束]
A --> B
B --> C
"""
# 使用預設的 Unicode 格式渲染
output = render_mermaid(diagram)
print(output)
from mermaid_ascii import MermaidAsciiRenderer
diagram = """
flowchart TD
A[開始]
B[處理]
C[結束]
A --> B
B --> C
"""
# 建立渲染器實例
renderer = MermaidAsciiRenderer()
# 解析 Mermaid 語法
renderer.parse(diagram)
# 產生 Unicode 格式輸出
output = renderer.render()
print(output)
# 使用 python -m 執行模組(未安裝時)
python -m mermaid_ascii --input diagram.mmd --unicode
# 或管道輸入
cat diagram.mmd | python -m mermaid_ascii --ascii
--input FILE, -i FILE
--ascii
--unicode 互斥--unicode
--ascii 互斥--version
Last Updated: 2026-03-02 Version: 1.0.0
重要:本 skill 透過
uv tool install安裝為獨立 CLI,source(本目錄)與 installed(~/.local/share/uv/tools/<package>/)是兩份獨立 Python package。修改 source 後若未 reinstall,CLI 仍使用 stale installed 版本,新增的函式會 AttributeError 或被 hasattr 包裝靜默吞掉(W11-037 根因)。
修復指令:
cd .claude/skills/<本 skill 目錄> && uv tool install . --force --reinstall
自動偵測:每次 SessionStart 由 uv-tool-staleness-check-hook 比對 source vs installed SHA256,偵測 stale 時提示修復指令。對應 ticket-skill 本身另有 ticket-reinstall-hook 自動 reinstall。
development
Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding, and empty states. Handles UX review, visual hierarchy, information architecture, cognitive load, accessibility, performance, responsive behavior, theming, anti-patterns, typography, fonts, spacing, layout, alignment, color, motion, micro-interactions, UX copy, error states, edge cases, i18n, and reusable design systems or tokens. Also use for bland designs that need to become bolder or more delightful, loud designs that should become quieter, live browser iteration on UI elements, or ambitious visual effects that should feel technically extraordinary. Not for backend-only or non-UI tasks.
development
Claude Code release notes 框架影響評估工具。比對 last-reviewed 版本篩出新版本,逐項分類(對框架有幫助 / 需評估 / 無影響 / 不適用),對採用項引導建 ANA + WRAP + spawn 落地。Use when: 執行 /release-notes 看到新版本、定期檢查 CC 更新、評估新功能對專案框架的影響時。Triggers: release notes, release-notes, CC 更新, claude code 更新, 版本更新評估, 新功能評估, 框架影響評估。
development
Assertion design judgment framework for flaky and design-quality issues. Use when writing tests, reviewing assertions, diagnosing flaky tests, or deciding if a timing/float/cache assertion is appropriate. Do NOT use for API syntax or refactoring.
tools
Chrome Extension 實機測試與 debug 工作流,以 chrome-devtools-mcp 為核心工具。Use when: (1) 完成功能後實機驗證 / manual test / 試看看 / 跑看看 / verify feature, (2) extension debug / popup 不作動 / content script 不注入 / service worker 報錯 / background 出問題, (3) 安裝 unpacked extension / load unpacked / 載入未封裝, (4) 看 console / 看 network / 看 log / view console / inspect requests, (5) 功能更新後重新載入 extension / rebuild reload / reload extension。涵蓋 Manifest V3 service worker / content script / popup / options page 的 chrome-devtools-mcp 工具呼叫流程。不取代 Puppeteer / Playwright 自動化 E2E(CI 用),定位為開發期手動驗證與 LLM-assisted debug。