diagram
Explain how parts of a system connect with Mermaid diagrams that Pi renders in the terminal. Use it for "/diagram <topic>", "draw a diagram of", "show me how this flows", or when a reply explains control flow, a request path, states, or data relations.
- License 许可
- MIT
- 所属仓库
- sQVe/tau
- 最近更新
- 2026-11-13
- Stars
- ★ 3
- Forks
- 0
01 前言 Front Matter
- name
- diagram
- metadata
- { "required-for": "explaining how parts of a system connect, such as control flow, a request path, states, or data relations" }
- description
- Explain how parts of a system connect with Mermaid diagrams that Pi renders in the terminal. Use it for "/diagram <topic>", "draw a diagram of", "show me how this flows", or when a reply explains control flow, a request path, states, or data relations.
03 SKILL.md 正文
Diagram
When to use
Use this skill when a diagram explains a structure faster than prose: control flow, a request path between components, states and transitions, or relations between records. GitHub renders the same blocks, so they also work in pull request bodies and documents.
Hard rules
- Write the diagram in a top-level
```mermaidcode block. Never put the block inside a list item or a quote. Diagrams in thinking do not render. - Use only these types. Pi shows any other type, such as
pie,gantt,mindmap,timeline,gitGraph, or C4, as raw source.flowchartorgraph: directionsTD,TB,BT,LR, andRL, subgraphs, and edge labels.sequenceDiagram: notes,loop,alt,opt, andautonumber.stateDiagram-v2orstateDiagram.classDiagram.erDiagram.
- If the user asks for a type not listed here, use the nearest supported type when it shows the same information. Name the requested type and the type you used instead. When it would lose information the user asked for, say the type is not supported, offer the nearest one, and stop until the user answers.
- Write valid syntax. When the parser warns, Pi shows the source and a warning instead of the drawing.
- Keep the drawing narrower than the pane, under about 80 columns. Pi shows a diagram wider than the pane as raw source. Keep labels to a few words: Pi wraps a node label at 24 columns and cuts an edge label after 28.
- Show one idea per diagram, with about 12 nodes or fewer. Split a large diagram into several instead of shortening labels until they lose meaning.
- Pair each diagram with short prose that names the real files, functions, or records behind its nodes.
Procedure
- Find the topic. Use the text after
/diagram. Without it, use the structure the conversation is discussing. If there is none or it is unclear, ask what to diagram and stop. - Read the code or records for the topic: entry points, calls or messages between parts, and the states or records involved. A plan, such as slice tickets, is its own record. If you cannot read what you need, say what is missing and stop.
- Decide whether a diagram helps. After
/diagram, draw at least one unless an earlier rule or step told you to stop. Otherwise, if one sentence explains the topic, write the sentence instead and say that a diagram would add nothing. - Pick the type that matches the idea:
flowchartfor control flow,sequenceDiagramfor messages between components over time,stateDiagram-v2for states,erDiagramorclassDiagramfor data relations. - Draft the diagram with short labels, and give a
flowcharttheTDdirection. Count its nodes and estimate its width. Split it when it exceeds about 12 nodes or 80 columns. - Write the prose around each diagram.
04 同仓库更多 Skills
benchmark-checklist
Check evidence before measuring performance or reporting a speedup, regression, or comparison.
worktree
Create or open a Git worktree for a ticket or task with Grove and open it as a herdr-app space. Use it when asked to create, add, start, or open a worktree, optionally followed by a handover.
update-branch
Rebase the current branch onto its base, resolve conflicts, and update the PR when asked. Use it for "rebase onto main", "fix conflicts", "the PR has conflicts", or when a rebase or merge stops on a conflict.
triage-findings
Verify review findings or comments the user asked you to act on, fix the supported ones in scope, and report each one as Fixed, Not worth changing, Incorrect, or Blocked. Use it for "triage these findings", "fix these review comments", or "act on the findings I approved". `code-review`, `pr`, and `start-slice` also start it after a review of the user's own work.
tracker
Write Linear tickets by Tau's rules. Pick the type and template, route it, search for duplicates, and use checked tools for ticket writes and the two allowed status changes. Use it for "file a bug", "create a ticket", or "add a follow-up ticket". It does not split designs or start slices.
tdd
Change behavior test-first with Tau's run_tests tool, then verify the affected tests and a mutation check. Use it when changing behavior. Covers the cycle and survivor handling, not test design.