AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Box Diagram

skill-ilia-pluzhnikov-box-diagram-box-diagram · by ilia-pluzhnikov

Generate perfectly aligned Unicode box diagrams (replaces ASCII art). Use when the user asks for box diagrams, flowcharts, architecture diagrams, or ASCII art in text format.

No reviews yet
0 installs
11 views
0.0% view→install

Install

$ agentstack add skill-ilia-pluzhnikov-box-diagram-box-diagram

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-ilia-pluzhnikov-box-diagram-box-diagram)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
4mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Box Diagram? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Box Diagram Generator

Purpose

Generate perfectly aligned box diagrams where every box, line, and arrow lines up correctly in monospace fonts. Uses a Python validator to catch misalignment before outputting.

Workflow

  1. Generate the diagram following the Rules below
  2. Write diagram to a temp file
  3. Run validator: python ${CLAUDE_SKILL_DIR}/validate.py
  4. If validator reports errors — fix them and re-validate
  5. Only output the diagram to the user after it passes validation
  6. Output from the file — read the validated file and paste its content into the code block. NEVER re-type the diagram manually, as even one lost space breaks alignment

Validator

Located at ${CLAUDE_SKILL_DIR}/validate.py

# Validate a file
python ${CLAUDE_SKILL_DIR}/validate.py diagram.txt

# Validate inline
python ${CLAUDE_SKILL_DIR}/validate.py --inline "╭──╮\n│  │\n╰──╯"

Checks:

  • Double-width characters (emoji, CJK) that break alignment
  • Inconsistent line widths within box groups
  • Vertical connector (, ) misalignment between consecutive lines
  • Broken box borders (╭───╮ with wrong fill)
  • Tab characters

Returns OK: N lines, max width M chars on success, or list of errors.

IMPORTANT: Always validate before showing the diagram to the user.

Rules

Character Set

Use Unicode box-drawing characters:

| Element | Character | Code point | |---------|-----------|------------| | Corners | ╭ ╮ ╰ ╯ | U+256D-256F | | Horizontal | | U+2500 | | Vertical | | U+2502 | | Arrow right | | U+25B8 | | Arrow down | | U+25BE | | Content arrow | | U+2192 | | Branch corners | ┌ ┐ └ ┘ | U+250C-2518 | | T-junctions | ┬ ┴ ├ ┤ ┼ | U+252C-253C |

NEVER use emoji — they are double-width and break alignment.

Box Format

╭──────────────────╮
│  Content here    │
╰──────────────────╯

Width = left + dashes + right . Content lines: + space + text padded to fixed width + space + . The corners and must be in the same columns.

Construction Method

  1. Define grid: assign exact column positions for each box (colA=0, colB=25, col_C=50)
  2. Fixed-width boxes: every line in a box must be the same character count
  3. Draw row by row: pad each content line to match the border width
  4. Connectors: horizontal dashes count = gap between boxes, vertical shares column with box center
  5. Assert text fits: assert len(text) <= inner_width before generating — one char overflow breaks everything
  6. Validate: run the Python validator before output

Prefer Python generation for diagrams with 3+ boxes. Define helper functions for borders, content lines, and padding — hand-counting spaces is error-prone. Example pattern:

H = '\u2500'  # ─
V = '\u2502'  # │
TL, TR = '\u256d', '\u256e'  # ╭ ╮
BL, BR = '\u2570', '\u256f'  # ╰ ╯

def box_line(text, w):
    return V + ' ' + text + ' ' * (w - len(text)) + ' ' + V
def border_top(w):
    return TL + H * (w + 2) + TR
def border_bot(w):
    return BL + H * (w + 2) + BR

Connector Patterns

Horizontal:   ──────────▸     ◂──────────     ◂──────────▸
Vertical:     │               ▴
              │               │
              ▾               │

Branching (fan-out / fan-in)

Fan-out (1 → 3): use or with between them. Fan-in (3 → 1): use with between them.

         │                     (source)
┌────────┼────────┐            fan-out
│        │        │
▾        ▾        ▾
│        │        │
└────────┼────────┘            fan-in
         │                     (destination)
         ▾

Labels on Arrows

       label
A ──────────────────▸ B

    │
    │ label
    ▾

Anti-patterns

  • NEVER use emoji (double-width)
  • NEVER eyeball alignment — always validate with the script
  • NEVER manually re-type the diagram for output — always read from the validated file. Even one lost space breaks alignment between corners and
  • NEVER mix tabs and spaces
  • Avoid boxes wider than 60 chars

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.