Agent Skillsmohitagw15856/pm-claude-skills › sequence-diagram

sequence-diagram

GitHub

将交互流程转化为可渲染的 Mermaid 序列图,适用于 API 调用、认证握手等场景。明确参与者与消息顺序,区分同步/异步及失败路径,确保语法正确且直观展示系统间时序关系。

skills/sequence-diagram/SKILL.md mohitagw15856/pm-claude-skills

Trigger Scenarios

询问系统组件间的交互顺序 需要可视化 API 调用链或请求响应流程 分析集成逻辑或认证握手步骤

Install

npx skills add mohitagw15856/pm-claude-skills --skill sequence-diagram -g -y
More Options

Use without installing

npx skills use mohitagw15856/pm-claude-skills@sequence-diagram

指定 Agent (Claude Code)

npx skills add mohitagw15856/pm-claude-skills --skill sequence-diagram -a claude-code -g -y

安装 repo 全部 skill

npx skills add mohitagw15856/pm-claude-skills --all -g -y

预览 repo 内 skill

npx skills add mohitagw15856/pm-claude-skills --list

SKILL.md

Frontmatter
{
    "name": "sequence-diagram",
    "description": "Diagram an interaction as a sequence of messages between participants over time. Use when asked to show an API flow, request\/response, auth handshake, integration, or 'what calls what in what order'. Produces a ready-to-render Mermaid sequence diagram (renders live, exportable as PNG\/SVG) plus notes on edge cases and failure paths."
}

Sequence Diagram Skill

When the question is "in what order do these things talk to each other?", a sequence diagram is the clearest answer. This skill turns a described interaction — an API call chain, an auth handshake, a webhook flow — into a correct Mermaid sequence diagram with participants, ordered messages, return values, and the important error/timeout paths.

Required Inputs

Ask for these only if they aren't already provided:

  • The participants — the actors/services/systems involved (client, API, DB, third party…).
  • The messages — what each one sends to the next, in order; what comes back.
  • Sync vs async — which calls block on a response vs fire-and-forget.
  • Edge cases — the failure, timeout, or alternative path worth showing.

Output Format

[Interaction name] — sequence

One line on what flow this traces.

sequenceDiagram
    actor U as User
    participant W as Web app
    participant A as API
    participant D as Database
    U->>W: Click "Sign in"
    W->>A: POST /login
    A->>D: Lookup user
    D-->>A: User record
    A-->>W: 200 + token
    W-->>U: Logged in
    Note over A,D: On miss, return 401

Notes — failure/timeout handling, retries, idempotency, anything async (-) ).

Mermaid Rules (so it renders)

  • Start with sequenceDiagram. Declare participant X as Label (or actor) up front.
  • Solid arrow ->> = call/request; dashed -->> = response/return; -) = async message.
  • Use Note over A,B: ... for context and alt/else/end for alternative paths if needed.
  • Keep message text short; no colons that aren't the message separator.

Quality Checks

  • Participants are declared and ordered to match the real call flow
  • Requests and responses are distinguished (solid vs dashed arrows)
  • At least one failure/edge path is shown or noted (not just the happy path)
  • Sync vs async messages are visually distinct
  • The Mermaid block renders without edits

Anti-Patterns

  • Do not show only the happy path when a failure path matters — note the 401/timeout/retry
  • Do not blur requests and returns — use ->> vs -->>
  • Do not reorder messages for neatness — sequence order is the whole point
  • Do not put colons inside message text — it breaks parsing
  • Do not invent participants — model only the systems actually involved

Based On

UML sequence diagramming (lifelines, sync/async messages, alt fragments), expressed as renderable Mermaid.

Version History

  • a38bc30 Current 2026-07-05 11:44

Same Skill Collection

exports/openclaw/360-feedback-template/SKILL.md
exports/openclaw/401k-plan-decoder/SKILL.md
exports/openclaw/ab-test-planner/SKILL.md
exports/openclaw/ab-test-readout/SKILL.md
exports/openclaw/accessibility-audit/SKILL.md
exports/openclaw/account-plan/SKILL.md
exports/openclaw/acquirer-red-team/SKILL.md
exports/openclaw/ad-copy/SKILL.md
exports/openclaw/aeo-optimizer/SKILL.md
exports/openclaw/agenda-or-cancel/SKILL.md
exports/openclaw/agent-design-review/SKILL.md
exports/openclaw/agent-observability-spec/SKILL.md
exports/openclaw/agent-spec/SKILL.md
exports/openclaw/ai-ethics-review/SKILL.md
exports/openclaw/ai-eval-plan/SKILL.md
exports/openclaw/ai-feature-prd/SKILL.md
exports/openclaw/ai-product-canvas/SKILL.md
exports/openclaw/air-quality/SKILL.md
exports/openclaw/altitude-shifter/SKILL.md
exports/openclaw/ambiguity-resolver/SKILL.md
exports/openclaw/analyst-relations-brief/SKILL.md
exports/openclaw/announcement-card/SKILL.md
exports/openclaw/api-docs-writer/SKILL.md
exports/openclaw/api-test-plan/SKILL.md
exports/openclaw/api-versioning-strategy/SKILL.md
exports/openclaw/apology-letter/SKILL.md
exports/openclaw/architecture-decision-record/SKILL.md
exports/openclaw/architecture-diagram/SKILL.md
exports/openclaw/archive-strategy/SKILL.md
exports/openclaw/assumption-bounty/SKILL.md
exports/openclaw/assumption-mapper/SKILL.md
exports/openclaw/async-update-format/SKILL.md
exports/openclaw/auto-repair-estimate-decoder/SKILL.md
exports/openclaw/autopilot-charter/SKILL.md
exports/openclaw/benefits-decoder/SKILL.md
exports/openclaw/bid-tender-review/SKILL.md
exports/openclaw/board-deck-narrative/SKILL.md
exports/openclaw/board-minutes/SKILL.md
exports/openclaw/board-pre-read/SKILL.md
exports/openclaw/bom-cost-review/SKILL.md
exports/openclaw/bookkeeping-categorization/SKILL.md
exports/openclaw/boolean-search-builder/SKILL.md
exports/openclaw/brag-doc/SKILL.md
exports/openclaw/brainstorming/SKILL.md
exports/openclaw/brief-builder/SKILL.md
exports/openclaw/briefing-note/SKILL.md
exports/openclaw/budget-builder/SKILL.md
exports/openclaw/budget-variance-analysis/SKILL.md
exports/openclaw/bug-diagnosis/SKILL.md
exports/openclaw/bug-report/SKILL.md

Metadata

Files
0
Version
471c606
Hash
af8e9a05
Indexed
2026-07-05 11:44

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-30 12:48
浙ICP备14020137号-1 $방문자$