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

sequence-diagram

GitHub

将API流程、认证握手或集成交互转化为可渲染的Mermaid时序图。明确参与者、同步/异步消息及错误路径,确保图表准确展示调用顺序与异常处理。

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

Trigger Scenarios

询问系统组件间的调用顺序 需要可视化API请求响应流程 描述身份验证握手过程 分析Webhook或第三方集成交互

Install

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

Non-standard path

npx skills add https://github.com/mohitagw15856/pm-claude-skills/tree/main/exports/openclaw/sequence-diagram -g -y

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",
    "homepage": "https:\/\/mohitagw15856.github.io\/pm-claude-skills\/skill\/sequence-diagram.html",
    "metadata": {
        "openclaw": {
            "emoji": "🖼"
        }
    },
    "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

  • 54fad50 Current 2026-07-19 12:33

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-hiring-panel/SKILL.md
exports/openclaw/agent-observability-spec/SKILL.md
exports/openclaw/agent-severance/SKILL.md
exports/openclaw/agent-spec/SKILL.md
exports/openclaw/agm-in-a-box/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/behavior-intervention-plan/SKILL.md
exports/openclaw/benefits-decoder/SKILL.md
exports/openclaw/bennett-time-audit/SKILL.md
exports/openclaw/bid-tender-review/SKILL.md
exports/openclaw/board-deck-narrative/SKILL.md
exports/openclaw/board-game-designer/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

Metadata

Files
0
Version
e4def4c
Hash
4911c8a1
Indexed
2026-07-19 12:33

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