sequence-diagram

Generates Mermaid sequence diagrams for multi-service flows from HLD and spec documents.

Updated May 21, 2026
One-click install
npx skills add https://github.com/CagesThrottleUs/private-ai-harness --skill sequence-diagram-cagesthrottleus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sequence-diagram
Source: https://github.com/CagesThrottleUs/private-ai-harness/tree/main/skills/sequence-diagram
Command: npx skills add https://github.com/CagesThrottleUs/private-ai-harness --skill sequence-diagram-cagesthrottleus

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Multi-service interaction bugs are typically discovered during debugging rather than design because teams skip documenting how components actually communicate. This Skill closes that gap by generating Mermaid sequence diagrams for every critical cross-component flow before implementation begins. ## Core Features & Use Cases - Critical Flow Identification: Reads the HLD Container diagram and spec REQ-NNN entries to find flows crossing 3+ components, auth boundaries, retries, or async messaging. - Full Mermaid Syntax Coverage: Produces sequenceDiagram blocks using alt/else, loop, par, opt, critical, and break control flow, plus sync, async, and error arrow types. - Reviewer Loop: Dispatches a sequence-diagram-reviewer agent against the generated artifact and iterates fixes until all Critical findings pass. - Use Case: While writing the HLD for a checkout feature, generate sequence diagrams covering JWT validation, payment critical regions with timeout and decline paths, idempotency checks, and async order.created event publishing, saved to .ai/YYYY-MM-DD-<feature-slug>/lld/. ## Quick Start Ask the AI to generate sequence diagrams for the critical flows in your current feature's HLD and spec, covering happy paths, error paths, and auth boundaries.

Frequently Asked Questions about sequence-diagram

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a sequence diagram in Mermaid?

Declare participants explicitly to control ordering, then use ->> for synchronous requests, -->> for responses, and -) for async fire-and-forget messages. Wrap conditional logic in alt/else blocks, retries in loop blocks, and concurrent calls in par blocks.

When should I write sequence diagrams during system design?

Create sequence diagrams for any flow crossing 3 or more components, involving auth or token validation, retries, circuit breakers, or async messaging. Skip them for single-component internal calls or simple two-party request-response without error handling.

Does Mermaid support async messages and error paths in sequence diagrams?

Yes. Mermaid sequenceDiagram supports async arrows (-) and --)), failure arrows (-x), and control blocks including alt/else for error paths, opt for optional steps, critical for uninterruptible regions, and break for early exits.

How do I show where JWT validation happens in a sequence diagram?

Model the auth service as an explicit participant and draw the validate(token) call from the API immediately after the client request. Wrap the invalid-token response in an alt block returning 401 so the auth boundary is visible at a glance.

What are the limitations of sequence diagrams for system documentation?

Sequence diagrams show how components interact but not what exists or where it is deployed, so they must be paired with C4 Container diagrams. They also become unwieldy if drawn per endpoint rather than per distinct interaction pattern.