agentsclimarketplace

Text diagram

Skill vanducng/skills/skills/text-diagram

Draw reliable, well-aligned text/ASCII architecture diagrams with nested boxes, arrows, and connectors. Use when user asks to draw/create text diagrams, ASCII art diagrams, box diagrams, or architecture diagrams in plain text. For rendered image artifacts (PNG/SVG), use vd:diagram instead.From its SKILL.md

Install
npx -y skills add vanducng/skills --skill text-diagram

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

One thing to look at

  • 5 stars5 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.

What its file declares

Copied from the file, not written here

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

8.6 KB, ~2.0k tokens by cl100k_base, as published. Nobody here has run it

Text Diagram Drawing

Draw professional, pixel-perfect text-based architecture diagrams using monospace characters. Every character must align correctly in a monospace font.

Critical Rules (NEVER violate)

  1. Calculate widths BEFORE drawing. Never freehand a diagram. Always compute column widths, box widths, and total widths first, then render.
  2. Every line in a box must be the SAME character length. Count characters. Verify.
  3. Use ONLY ASCII-safe monospace characters for borders: |, -, + for basic; or Unicode box-drawing (see charset below). Never mix styles in one diagram.
  4. Pad content with spaces to fill the full inner width of every box.
  5. Vertical connectors (| or ) must be at the EXACT same column position on every line between two boxes.
  6. After drawing, mentally re-count character positions of the first line, last line, and any connector lines to verify alignment.
  7. One box-drawing style per diagram. Don't mix +--+ with ┌──┐.

Character Sets

Style A: Pure ASCII (safest, works everywhere)

Corners:  +
Horiz:    -
Vert:     |
Arrow:    -> or -->
Down:     v or V
Cross:    +
T-junc:   +

Style B: Unicode Light Box Drawing (cleaner look)

Corners:  ┌ ┐ └ ┘
Horiz:    ─
Vert:     │
T-junc:   ├ ┤ ┬ ┴
Cross:    ┼
Arrow:    → ← ↑ ↓
Triangle: ▼ ▲ ► ◄

Style C: Unicode Rounded (friendly look)

Corners:  ╭ ╮ ╰ ╯
Horiz:    ─
Vert:     │
(rest same as Style B)

Style D: Double-line (emphasis/outer containers)

Corners:  ╔ ╗ ╚ ╝
Horiz:    ═
Vert:     ║
T-junc:   ╠ ╣ ╦ ╩
Cross:    ╬

Style E: Dashed borders (secondary containers)

Vert:     ¦  or  :  or  ╎
Horiz:    - - -  (dash-space-dash)

Width Constraints

  • Default max width: 80 characters (standard terminal). Use 120 for wide diagrams.
  • If a diagram exceeds the limit, reduce padding, abbreviate labels, or split into multiple diagrams.
  • Never use tab characters. Always spaces.
  • All Unicode box-drawing chars (U+2500–U+257F) are exactly 1 column wide. Safe to use.
  • Avoid: CJK chars (2-wide), emoji (variable width), heavy/dashed variants if cross-platform rendering matters.

Drawing Algorithm

ALWAYS follow these steps in order:

Step 1: Plan the Layout

  • List all boxes, their nesting depth, and content lines
  • Determine layout direction (top-down, left-right, or mixed)
  • Identify connectors between boxes

Step 2: Calculate Dimensions (CRITICAL)

For each box:
  inner_width = max(len(line) for line in content_lines) + 2*padding
  outer_width = inner_width + 2  (for left/right borders)

For side-by-side boxes:
  total_width = sum(outer_widths) + gaps_between_boxes

For container boxes:
  container_inner_width = max(total_width_of_children, len(title)) + 2*padding
  container_outer_width = container_inner_width + 2

Step 3: Render Top-Down

  • Draw each line as a fixed-width string
  • Use .ljust() / space-padding to ensure every line in a box is the same width
  • For nested boxes: indent children by container's left border + padding
  • Symmetric padding rule: if you indent a child row with 2 spaces on the LEFT after the container's , you must reserve 2 spaces on the RIGHT before the closing . The most common alignment bug is leaving only 1 space on the right.

Step 4: Verify Alignment

  • Check: first border line length == last border line length
  • Check: all content lines length == border line length
  • Check: vertical connector column is consistent across all rows
  • Check: side-by-side boxes have matching heights (pad shorter ones with empty lines)

Layout Patterns

Pattern: Container with Title

┌──────────────────────────────┐
│ Container Title              │
│                              │
│  ┌────────┐  ┌────────┐      │
│  │ Box A  │  │ Box B  │      │
│  └────────┘  └────────┘      │
│                              │
└──────────────────────────────┘

Rule: outer width = 32. Every row (border, title, empty, child rows, bottom) is exactly 32 chars. Right padding before the closing mirrors the left padding (2 spaces) plus any extra slack.

Pattern: Vertical Flow with Connector

┌──────────┐
│  Box A   │
└────┬─────┘
     │
     ▼
┌──────────┐
│  Box B   │
└──────────┘

Rule: The and must be at the same column as . Calculate: left_border + (inner_width / 2) + 1.

Pattern: Horizontal Flow Inside Container

┌──────────────────────────────────────┐
│                                      │
│  ┌─────────┐    ┌─────────┐          │
│  │ Step 1  │ →  │ Step 2  │          │
│  └─────────┘    └─────────┘          │
│                                      │
└──────────────────────────────────────┘

Rule: outer width = 40. Arrow sits at the vertical midpoint of the boxes, between them. Right side keeps ≥2 spaces before the closing to mirror left padding.

Pattern: Side-by-Side Boxes (Equal Height)

┌──────────┐  ┌──────────┐  ┌──────────┐
│ Title A  │  │ Title B  │  │ Title C  │
│ (desc)   │  │ (desc)   │  │ (desc)   │
└──────────┘  └──────────┘  └──────────┘

Rule: All boxes MUST have the same number of lines. Pad shorter boxes with blank content lines.

Pattern: Centered Connector Between Sections

┌─────────────────────────┐
│ Section A               │
└────────────┬────────────┘
             │
             ▼
┌─────────────────────────┐
│ Section B               │
└─────────────────────────┘

Rule: Both sections should be the same width. Connector at width / 2.

Common Mistakes to Avoid

MistakeFix
Lines in a box have different lengthsPad ALL lines to max_content_width + 2*padding
Right border 1 char short on child rowsMirror left padding: if left has 2 spaces, right needs 2 spaces too
Vertical connector off by 1Calculate center: border_start + 1 + floor(inner_width / 2)
Nested box wider than parentCalculate parent width from children FIRST
Side-by-side boxes different heightsCount lines, pad shorter box with empty │{spaces}│ lines
Right border not alignedUse fixed-width strings, never rely on "looks right"
Mixed border stylesPick ONE style at the start, use it throughout
Arrow not vertically centered on boxArrow row = top_border_row + 1 + floor(content_lines / 2)
Forgot to account for border charsouter_width = inner_width + 2 (left + right )

Rendering Checklist (Run mentally after drawing)

  • Every box: first border line length == last border line length
  • Every box: all content lines == border line length
  • Container boxes: wider than all children combined + gaps + padding
  • Side-by-side boxes: all same height (line count)
  • Vertical connectors: same column on every row
  • No trailing spaces inconsistency
  • Nested boxes indented consistently
  • Arrows aligned to box midpoints
  • Right padding mirrors left padding before the closing border

Examples

See references/examples.md for complete worked examples with dimension calculations, and references/advanced-patterns.md for nested architectures, fan-out, and annotated connectors.

What ships with it: 2 files

18.2 KB alongside SKILL.md

references/

Gives 0 of the 12 instructions most diagrams charts skills give in ~2.0k tokens

Counted across 397 of the 418 authors here whose files we hold, read 2026-09-06

  • Quote labels containing special charactersin 18 of 397, across 17 files
  • Choose the right diagram type for the datain 15 of 397, across 13 files
  • Create a detailed Mermaid diagramin 12 of 397, across 11 files
  • Validate Mermaid syntax before outputin 11 of 397, across 9 files
  • Wrap diagrams in fenced Mermaid code blocksin 11 of 397
  • Read the reference file for the chosen diagram typein 10 of 397, across 6 files
  • Label every connection descriptivelyin 8 of 397, across 7 files
  • Use stateDiagram-v2 for state diagramsin 7 of 397
  • Declare the diagram type on the first linein 7 of 397
  • Keep one concept per diagramin 7 of 397
  • Cap diagrams at 15 nodes and split over 20in 7 of 397
  • Describe the diagram before generating itin 7 of 397

Said here and by no other author read

  • Calculate box widths before drawing
  • Count characters on every box line
  • Re-count character positions after drawing
  • Use one box-drawing style per diagram
  • Pad all lines to the same width with spaces
  • Follow the drawing algorithm steps in order

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 325,949. 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.