agentsclimarketplace

Ascii diagram

Skill weicheng95/skills-hub/skills/ascii-diagram

Draw diagrams as monospace ASCII/Unicode text that renders directly in a terminal — flowcharts, architecture diagrams, sequence diagrams, trees, state machines, timelines, entity relationships, and comparison tables. Use this whenever explaining anything with structure, flow, hierarchy, or relationships — system architecture, data flow, request lifecycles, module dependencies, directory layouts, state transitions, before/after comparisons, decision logic, or process steps. Trigger on explicit asks ("draw me a diagram", "show this as ascii", "visualize this", "sketch the architecture") AND on structural questions where prose would be worse ("how does X work", "what's the flow when a user logs in", "explain this codebase's layout", "what talks to what"). Terminals and agent CLIs cannot render images or Mermaid — this is the only way to show a picture there, so reach for it readily rather than waiting to be asked.From its SKILL.md

Install
npx -y skills add weicheng95/skills-hub --skill ascii-diagram

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

13.7 KB, as published. Nobody here has run it

ASCII Diagram

A terminal can't render an image. It can't render Mermaid, SVG, or PNG. What it can render — perfectly, in every agent CLI, over SSH, in a git commit, in a code comment — is a grid of monospace characters. That grid is the only drawing surface you have, and it's a genuinely good one.

The value here isn't decoration. A diagram forces you to commit to specific relationships. Prose lets you write "the service talks to the database and also handles caching" and hide the fact that you don't know whether the cache sits in front of the DB or beside it. A diagram makes you place the box. That constraint is the point: readers absorb structure from a picture in one glance that would take three paragraphs and a re-read.

When to draw

Draw when the answer has shape — things that connect, contain, sequence, branch, or compare. Reach for it readily; a diagram that turns out to be unnecessary costs a few lines, while prose that should have been a diagram costs the reader real comprehension.

The question is about…Draw
What talks to whatFlow / architecture
What happens in order, across actorsSequence
What contains whatTree
What state follows what, and on which eventState machine
What changedBefore/after
Which option to pickComparison table or decision tree
When things happenedTimeline

Don't draw when the structure is trivially linear and has no branching or actors ("read the file, then parse it" is a sentence, not a diagram), when the honest answer is a single fact, or when you'd be inventing relationships you haven't verified. A confidently-drawn wrong diagram is worse than prose, because the crisp lines imply a certainty you don't have. If you're unsure whether the cache sits in front of the DB, go read the code — don't guess with a box.

Diagram and prose is usually right: the picture carries structure, a sentence or two carries the nuance the picture can't (why, caveats, what's out of scope).

Non-negotiables

Always wrap the diagram in a plain code fence. Outside a fence, markdown renderers collapse whitespace and your alignment dies. Use ``` with no language tag (or text). Never mermaid — nothing in a terminal renders it.

Prefer Unicode box-drawing (─│┌┐└┘├┤┬┴┼▶▼◀▲) over ASCII (-|+><). It's dramatically more legible and every modern terminal handles it. Fall back to pure ASCII only when the target is genuinely constrained — some CI log viewers, some email clients, source files with an ASCII-only convention. If you're unsure and the stakes are high, ask.

Avoid emoji and other wide glyphs inside diagrams. They occupy two columns in some terminals and one in others, so your alignment is correct on your machine and broken on the reader's.

Getting alignment right

Misalignment is the single thing that makes an ASCII diagram look amateur, and it comes from counting characters by eye. Don't. Use these habits:

Pick one box width per row and pad every label to it. Decide the inner width from the longest label, then pad the rest with spaces. Boxes of ragged width in the same row read as a mistake even when the connections are correct.

Anchor connectors to a column and keep them there. A vertical line dropping from a box must sit in the same column all the way down to the arrowhead. When a line has to travel far, it's worth literally counting the characters on the box's top border to find its center.

Build the diagram in layers, not left-to-right. Place the boxes first, then the connectors. Trying to draw a box and its outgoing arrow in the same pass is how columns drift.

Verify before you send. Reread the finished block and check two things: every vertical line lands on its arrowhead's column, and every box's borders are the same width top and bottom. For anything with more than a handful of boxes, it's faster and more reliable to render it with a throwaway script than to hand-count — the script gets the padding right by construction.

Patterns

These are starting points, not templates to fill in mechanically. Adapt the shape to the content.

Flow / architecture

Horizontal for short chains, vertical when there are more than three stages or labels are long.

┌──────────┐      ┌──────────┐      ┌──────────┐
│  Client  │─────▶│   API    │─────▶│    DB    │
└──────────┘      └────┬─────┘      └──────────┘
                       │
                       ▼
                  ┌──────────┐
                  │  Cache   │
                  └──────────┘

Label the edges when the kind of connection matters — protocol, direction, trigger. An unlabeled arrow says "related"; a labeled one says something.

┌──────────┐  HTTPS   ┌──────────┐  SQL/TLS  ┌──────────┐
│ Browser  │─────────▶│  Server  │──────────▶│ Postgres │
└──────────┘          └──────────┘           └──────────┘
                            │
                            │ publish
                            ▼
                      ┌──────────┐
                      │  Queue   │
                      └──────────┘

Sequence

Actors across the top, time flowing down. This is the right pattern whenever "who calls whom, in what order" is the question — it shows ordering that a flow diagram can't.

 Client            API             Auth              DB
   │                │               │                │
   │  POST /login   │               │                │
   │───────────────▶│               │                │
   │                │ verify(creds) │                │
   │                │──────────────▶│                │
   │                │               │  SELECT user   │
   │                │               │───────────────▶│
   │                │               │◀ ─ ─ ─ ─ ─ ─ ─ │
   │                │◀ ─ ─ ─ ─ ─ ─ ─│                │
   │◀ ─ ─ ─ ─ ─ ─ ─ │  200 + token  │                │
   │                │               │                │

Solid arrows (───▶) for calls, dashed (─ ─ ▶) for returns. The convention is worth keeping because it lets the reader see the call/return pairing without reading a single label.

Tree / hierarchy

For directory layouts, module structure, org charts, taxonomies.

src/
├── api/
│   ├── routes.ts        request handlers
│   └── middleware.ts    auth, logging
├── core/
│   ├── engine.ts        ← the interesting part
│   └── types.ts
└── utils/
    └── format.ts

Trailing annotations earn their place: a bare file listing is ls output, but one that says what each file is for is a map. Use ← to point at what matters.

State machine

      ┌─────────┐  start   ┌─────────┐  finish  ┌──────────┐
 ────▶│  idle   │─────────▶│ running │─────────▶│   done   │
      └─────────┘          └────┬────┘          └──────────┘
           ▲                    │
           │      cancel        │ error
           └────────────────────┤
                                ▼
                          ┌─────────┐
                          │ failed  │
                          └─────────┘

Every edge needs its trigger label — an unlabeled state transition is missing the only information that makes it a state machine rather than a flowchart.

Before / after

Stack vertically, not side by side. Side-by-side halves the width you have for each and forces cramped labels.

BEFORE — every service owns its auth
┌────────┐   ┌────────┐   ┌────────┐
│ svc A  │   │ svc B  │   │ svc C  │
│ +auth  │   │ +auth  │   │ +auth  │
└────────┘   └────────┘   └────────┘

AFTER — auth extracted to a gateway
             ┌─────────┐
             │ gateway │
             │  +auth  │
             └────┬────┘
        ┌─────────┼─────────┐
        ▼         ▼         ▼
   ┌────────┐┌────────┐┌────────┐
   │ svc A  ││ svc B  ││ svc C  │
   └────────┘└────────┘└────────┘

Decision tree

                  ┌──────────────────┐
                  │ Is it in a repo? │
                  └────────┬─────────┘
                     yes   │   no
             ┌─────────────┴─────────────┐
             ▼                           ▼
    ┌─────────────────┐         ┌─────────────────┐
    │ Is it tracked?  │         │   git init      │
    └────────┬────────┘         └─────────────────┘
        yes  │  no
     ┌───────┴───────┐
     ▼               ▼
┌─────────┐    ┌──────────┐
│ git log │    │ git add  │
└─────────┘    └──────────┘

Timeline

2024          2025          2026
  │             │             │
  ├─ v1 launch  │             │
  │             ├─ rewrite    │
  │             ├─ 10k users  │
  │             │             ├─ v2 beta  ← now
  ▼             ▼             ▼

Comparison table

For weighing options, a table beats boxes and arrows — it's denser and scans better.

┌──────────────┬───────────┬───────────┬──────────────┐
│              │   Redis   │  Postgres │   In-memory  │
├──────────────┼───────────┼───────────┼──────────────┤
│ Latency      │   ~1ms    │   ~10ms   │    ~0.01ms   │
│ Durable      │  partial  │    yes    │      no      │
│ Ops burden   │  medium   │   high    │     none     │
└──────────────┴───────────┴───────────┴──────────────┘

Put the reasoning in the prose around the table, not in the cells — cells are for short facts, and a cell holding a sentence blows the width budget.

Annotating real output

When the subject is a log line, stack trace, or config, don't redraw it — point at it. This keeps the reader anchored to the actual text they'll see.

  ERROR  2026-07-17T09:14:22Z  worker-3  timeout after 30s
         └──────┬───────────┘  └───┬──┘  └──────┬────────┘
              when              which          why
                                              ↑
                        this is the retry ceiling, not the
                        request deadline — see config.ts:44

Composition

Left-to-right suits pipelines with few stages. Top-to-bottom suits anything with branching, and it's what you want when labels are long — vertical layouts spend width on labels instead of on gaps between columns.

Prefer one clear diagram over three fragments, but split when a single picture would hold more than roughly a dozen boxes. Past that density, the diagram stops being scannable and you're better off with a high-level picture plus a detail picture of the interesting subsystem.

When the reader will need it, a legend is cheap:

Legend:  ───▶ sync call    ─ ─▶ async/event    ▭ service    ◇ queue

Keep looking

Skills are one crate of 607,533. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.