terminal-diagrams
Explain things visually right inside the terminal — using inline Unicode/ASCII diagrams and a guided, slideshow-style walkthrough — instead of walls of prose. Use this whenever the user asks to "illustrate", "draw", "diagram", "visualize", "show me visually", "sketch", "map out", "ASCII art / ASCII diagram", "make a picture of", or asks for any visual artifact in the terminal — AND whenever they ask you to explain how something works, the architecture/flow/structure of a system, or walk them through a process step by step where a picture would land better than words. Trigger even if the user doesn't say the word "diagram": if a box-and-arrow sketch, tree, timeline, or annotated layout would make the answer clearer, reach for this skill. Output is rendered inline in the session; no files are created unless the user explicitly asks to save one.
What this skill does
# Terminal Diagrams
You are presenting a small, well-designed slideshow inside the terminal. The goal
is to make a concept *click* through a picture plus a few well-chosen words — the
way a good whiteboard explanation does — rather than burying the idea in prose.
## The core idea
Most explanations default to paragraphs. A diagram is better whenever the concept
has **shape**: things that connect, contain, sequence, branch, layer, or compare.
When you notice that shape, draw it. The picture carries the structure; your words
just narrate it.
Three commitments make this work:
1. **Inline, always.** Diagrams render in the session output as fenced code blocks
(so the terminal shows them in monospace and the alignment holds). Never write a
file unless the user explicitly asks you to save one — see *Saving to a file*.
2. **Show, then narrate.** Lead with the picture. Follow with a short, plain caption
that says what to notice. The reader should be able to skip your words and still
roughly get it from the diagram alone.
3. **Earn every character.** A cluttered diagram is worse than a clean paragraph.
Cut labels that don't teach. Keep widths terminal-friendly (~60–76 columns) so
nothing wraps.
## Character set
Default to **Unicode box-drawing** characters — they render cleanly in modern
terminals and look far crisper than ASCII. Keep this palette handy:
```
Lines ─ │ Corners ┌ ┐ └ ┘
Joins ├ ┤ ┬ ┴ ┼ Arrows ▶ ◀ ▲ ▼ → ← ↑ ↓ ⇄ ↔
Doubles ═ ║ ╔ ╗ ╚ ╝ Markers ● ○ ◆ ▪ ✓ ✗ ①②③ ╱ ╲
Blocks █ ▓ ▒ ░ ▏▎▍▌▋▊▉
```
**Fall back to pure ASCII** (`+ - | / \ > < v ^`) only when the user asks for "plain
ASCII", or when the diagram is destined for somewhere Unicode may break — a log
line, a code comment, a `.txt` the user will paste into an old system. When in
doubt, ask; otherwise prefer Unicode.
## Pacing: slides vs. one diagram
Adapt to the concept's shape:
- **A process, flow, or anything that unfolds in steps → numbered slides.** Break it
into 2–5 slides, each a focused diagram plus a one-line caption, so understanding
builds. This mirrors how you'd present at a whiteboard: reveal one idea, then the
next. Use a slide header so the pacing is visible:
```
── Slide 2/4 ─ The cache check ──────────────
```
- **A single structure, layout, or relationship → one annotated diagram.** Draw it
once, well, and use callout markers (①②③) keyed to a short legend beneath. Don't
fragment something that's meant to be seen whole.
If the topic is small, one diagram is plenty — don't manufacture slides for a
two-box idea. Match the ceremony to the concept.
## Craft rules that make diagrams readable
These are where most terminal diagrams fail. They're worth the care:
- **Alignment is the whole game.** Boxes, arrows, and columns must line up
character-for-character. Pad with spaces so edges are flush. A diagram with ragged
edges reads as broken even when the content is right.
- **Anchor every vertical to a fixed column — this is the #1 thing that breaks.**
Each box wall and lifeline (`│`) must stay at the *same* column on every row it
appears. The classic failure: an arrow runs into a wall (`──▶│`), you lose track of
the column, and on the next rows the `│` and the `▼` below it drift one space right
per line. The diagram looks subtly "indented wrong." To prevent it: decide the
column positions of your verticals *first*, then build each row to hit exactly those
columns. When an arrow meets a wall, keep the wall character in its column and let
the arrow stop one space short (`──▶ │` reads fine and won't shove the wall). Before
you finish, scan down each vertical and confirm it's a straight line.
- **For back-and-forth between actors, reach for the sequence template** (fixed
vertical lifelines, time flowing down — see `references/patterns.md`) rather than
redrawing floating boxes on every step. Fixed lifelines are far easier to keep
aligned than boxes that move around, which is precisely where multi-step flows tend
to drift.
- **Label the arrows, not just the boxes.** `──HTTP──▶` teaches more than a bare
arrow. The relationships are usually the interesting part.
- **Give boxes breathing room.** One space of padding inside box walls
(`│ Server │`, not `│Server│`) reads much cleaner.
- **One diagram, one idea.** If you're cramming six concepts into one picture, that's
a sign to split into slides instead.
- **Keep it within 76 columns.** Terminals wrap around 80, and a single wrapped line
destroys the alignment of everything below it. 76 leaves a safety margin — treat it
as a real ceiling, not a suggestion, and if a diagram won't fit, split it into
slides rather than letting it run wide.
## Saving to a file
Default is inline-only. If — and only if — the user explicitly asks to save, export,
or write the diagram to a file:
- **`.md`** when they want it in a document or README: wrap each diagram in a
fenced ```` ```text ```` block so it stays monospace, keep the captions as prose.
- **`.txt`** when they want the raw art: just the diagrams and minimal labels, no
markdown syntax.
Confirm the path if they didn't give one, then write it.
## Worked examples
**Example 1 — a flow, shown as one annotated diagram:**
```
┌──────────┐ ①GET /page ┌──────────┐
│ Browser │ ───────────────▶ │ Server │
└──────────┘ └────┬─────┘
▲ │ ②query
│ ③HTML (cached) ▼
│ ┌──────────┐
└────────────────────── │ Cache │
└──────────┘
① request ② miss → hit datastore ③ response flows back
```
**Example 2 — a hierarchy, shown as a tree:**
```
RootController
├─ AuthMiddleware ← runs first, gates everything
├─ Router
│ ├─ /users ──▶ UsersHandler
│ └─ /orders ──▶ OrdersHandler
└─ ErrorBoundary ← catches anything thrown above
```
**Example 3 — a comparison, shown side by side:**
```
Monolith Microservices
┌────────────────────┐ ┌──────┐ ┌──────┐ ┌──────┐
│ UI · API · DB · │ │ Auth │ │ Cart │ │ Pay │
│ Auth · Billing │ └──┬───┘ └──┬───┘ └──┬───┘
│ (one deploy) │ └────────┼────────┘
└────────────────────┘ message bus
simpler, scales as one independent, more moving parts
```
## When you need more patterns
For a fuller cookbook — sequence/timeline diagrams, state machines, layered stacks,
grids and tables, progress/gauge bars, network topologies, and more box-drawing
recipes — read `references/patterns.md`. Pull it in when the concept doesn't fit one
of the shapes above, rather than forcing it into a box-and-arrow sketch.
Related in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.