본문으로 건너뛰기
Skillpedia
일반 코딩58k · #3223

cli-anything-mermaid

하는 일

이 스킬은 AI 에이전트가 Mermaid 형식으로 순서도나 시퀀스 다이어그램 같은 그림을 만들도록 합니다. 글로 된 내용을 명확한 시각 자료로 바꾸고 싶은 사람에게 맞습니다.

사용하는 경우

  • ✓어떤 과정이나 판단이 어떻게 이루어지는지 보여 주는 순서도가 필요할 때.
  • ✓사람이나 시스템 사이에 오가는 메시지를 보여 주는 시퀀스 다이어그램이 필요할 때.
  • ✓기존 다이어그램 파일을 고치고 새 이미지로 다시 만들고 싶을 때.

스킬 링크

https://github.com/HKUDS/CLI-Anything/blob/main/mermaid/agent-harness/cli_anything/mermaid/skills/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/HKUDS/CLI-Anything/blob/main/mermaid/agent-harness/cli_anything/mermaid/skills/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“고객 주문이 요청부터 배송까지 어떻게 진행되는지 보여 주는 순서도를 만들어 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트가 다이어그램을 텍스트로 작성해 프로젝트 파일에 저장하고, 온라인 렌더러를 통해 완성된 이미지 링크를 만들어 줍니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

cli-anything-mermaid

Create, edit, and render Mermaid diagrams via stateful project files and the mermaid.ink renderer. Designed for AI agents and power users who need to generate flowcharts, sequence diagrams, and other visualizations without a GUI.

Installation

This CLI is installed as part of the cli-anything-mermaid package:

pip install cli-anything-mermaid

Prerequisites:

  • Python 3.10+
  • No external software required (rendering uses mermaid.ink cloud service)

Usage

Basic Commands

# Show help
cli-anything-mermaid --help

# Start interactive REPL mode
cli-anything-mermaid

# Create a new project
cli-anything-mermaid project new -o diagram.json

# Run with JSON output (for agent consumption)
cli-anything-mermaid --json project info

REPL Mode

When invoked without a subcommand, the CLI enters an interactive REPL session:

cli-anything-mermaid
# Enter commands interactively with tab-completion and history

Command Groups

Project

Project lifecycle commands.

Command Description
new Create a new Mermaid project with optional sample preset and theme
open Open an existing Mermaid project file
save Save the current project to a file
info Show current project information
samples List available sample diagram presets

Diagram

Diagram source manipulation commands.

Command Description
set Replace the Mermaid source text (inline or from file)
show Print the current Mermaid source code

Export

Render and share commands.

Command Description
render Render the diagram to SVG or PNG via mermaid.ink
share Generate a Mermaid Live Editor URL for sharing

Session

Session state commands.

Command Description
status Show current session state
undo Undo the last diagram source change
redo Redo the last undone change

Examples

Create and Render a Flowchart

# Create a project with flowchart sample
cli-anything-mermaid project new --sample flowchart -o flow.json

# Replace diagram source
cli-anything-mermaid --project flow.json diagram set --text "graph TD; A-->B; B-->C;"

# Render to SVG
cli-anything-mermaid --project flow.json export render output.svg --format svg

Create a Sequence Diagram

# Create project with sequence sample
cli-anything-mermaid project new --sample sequence -o seq.json

# Set diagram from file
cli-anything-mermaid --project seq.json diagram set --file my_diagram.mmd

# Render to PNG
cli-anything-mermaid --project seq.json export render output.png --format png

Share a Diagram

# Generate an editable Mermaid Live URL
cli-anything-mermaid --project flow.json export share --mode edit

# Generate a view-only URL
cli-anything-mermaid --project flow.json export share --mode view

Interactive REPL Session

cli-anything-mermaid
# new flowchart
# set graph TD; A-->B; B-->C;
# render output.svg
# share
# quit

State Management

The CLI maintains session state with:

  • Undo/Redo: Revert or replay diagram source changes
  • Project persistence: Save/load project state as JSON
  • Session tracking: Track modifications and changes

Output Formats

All commands support dual output modes:

  • Human-readable (default): Tables, colors, formatted text
  • Machine-readable (--json flag): Structured JSON for agent consumption
# Human output
cli-anything-mermaid project info

# JSON output for agents
cli-anything-mermaid --json project info

For AI Agents

When using this CLI programmatically:

  1. Always use --json flag for parseable output
  2. Check return codes - 0 for success, non-zero for errors
  3. Parse stderr for error messages on failure
  4. Use absolute paths for all file operations
  5. Verify outputs exist after render operations

More Information

  • Full documentation: See README.md in the package
  • Test coverage: See TEST.md in the package
  • Methodology: See HARNESS.md in the cli-anything-plugin

Version

1.0.0

자주 묻는 질문

다이어그램을 직접 손으로 그려야 하나요?

아닙니다. 진행 단계를 평범한 말로 설명하면 에이전트가 다이어그램 텍스트를 대신 작성합니다.

그림을 만들려면 별도 프로그램이 필요한가요?

아닙니다. 이 스킬은 렌더링에 클라우드 서비스를 쓰므로 Python 외에는 추가 프로그램이 필요하지 않다고 설명합니다.

다이어그램을 저장했다가 나중에 고칠 수 있나요?

네. 다이어그램은 프로젝트 파일로 저장되므로 다시 열어 수정할 수 있습니다.

상세 정보

작성자의 원본 설명

Command-line interface for Mermaid Live Editor - Create, edit, and render Mermaid diagrams via stateful project files and mermaid.ink renderer URLs. Designed for AI agents and power users who need to generate flowcharts, sequence diagrams, and other visualizations without a GUI.

repo: HKUDS/CLI-Anything

인기도

GitHub 스타
58k
순위
#3223
라이선스
Apache-2.0
업데이트
2026. 9. 21.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬