mirror of
https://github.com/magnus919/agent-skills.git
synced 2026-09-19 07:27:04 +03:00
* feat: add mermaid-diagrams skill Signed-off-by: Magnus Hedemark <magnus919@pm.me> * fix: harden portable skill guidance Signed-off-by: Magnus Hedemark <magnus919@pm.me> * fix: remove nonportable source assumptions Signed-off-by: Magnus Hedemark <magnus919@pm.me> * fix: generalize portable examples Signed-off-by: Magnus Hedemark <magnus919@pm.me> --------- Signed-off-by: Magnus Hedemark <magnus919@pm.me>
1.3 KiB
1.3 KiB
Sequence Diagrams
Best for: interaction protocols, API call flows, agent handoffs, multi-service communication.
Basic Syntax
sequenceDiagram
participant A as Service A
participant B as Service B
A->>B: Request
B-->>A: Response
Participant Types (v11+)
sequenceDiagram
participant A as 🧑 User
participant G as ⚙️ API Gateway
participant B as 🕸️ Browser
database D as 📦 Database
actor E as 🌐 External
A->>G: scrape(url)
G->>B: render(url)
B->>D: cache result
B-->>A: markdown
Loops and Conditions
sequenceDiagram
participant A as Agent
participant S as Search-Svc
loop Until goal satisfied
A->>S: search(query)
S-->>A: results
alt results sufficient
A->>S: stop
else need more
A->>S: refine query
end
end
Activation (Lifecycle)
sequenceDiagram
participant A as A
participant B as B
activate A
A->>B: Request
activate B
B-->>A: Response
deactivate B
deactivate A
Critical Rules
activate/deactivatemust be balancedalt/else/endfor conditional branchesloop/endfor iterationspar/and/endfor parallelbreak/endfor exit conditionscritical/option/endfor critical sections