unicode-box-drawing
1
总安装量
1
周安装量
#46716
全站排名
安装命令
npx skills add https://github.com/andredezzy/maccing --skill unicode-box-drawing
Agent 安装分布
opencode
1
cursor
1
github-copilot
1
claude-code
1
Skill 文档
Unicode Box Drawing Patterns
Guidelines for creating properly aligned, readable Unicode box diagrams.
When to Apply
- Drawing ASCII/Unicode diagrams in code comments or documentation
- Creating flow charts, state machines, or architecture diagrams
- Documenting CLI output formats or terminal interfaces
- Building text-based UI mockups
- Reviewing diagram alignment issues
- Writing technical documentation with visual structures
Rule Categories by Priority
| Priority | Prefix | Category |
|---|---|---|
| CRITICAL | padding- |
Right-padding and fixed width alignment |
| HIGH | spacing- |
Breathing room and whitespace |
| HIGH | layout- |
Centering and nested box calculations |
| MEDIUM | chars- |
Character selection and consistency |
Quick Reference
Critical Rules
| Rule ID | Description |
|---|---|
padding-right |
Every content line MUST be padded to full width before closing â |
padding-fixed-width |
All lines in a box MUST have identical character count |
High Priority Rules
| Rule ID | Description |
|---|---|
spacing-breathing-room |
Empty line after âââââ or âââââ¤, and before âââââ or ââââ⤠|
layout-centering |
Always center nested boxes and flow diagrams within parent |
layout-width-limit |
Keep diagrams under 70 characters for compatibility |
layout-nested-math |
Calculate: left_pad + inner_content + right_pad = content_width |
Character Rules
| Rule ID | Description |
|---|---|
chars-single-set |
Never mix Unicode box chars with ASCII on same line |
chars-light-lines |
Use light lines (â â â â â â) for best compatibility |
chars-monospace |
Only renders correctly in monospace fonts |
Box Width Formula
Border formula: â + (width-2 Ã â) + â = total width
Content formula: â + (width-2 chars) + â = total width
â
Content + right-padding spaces
For a 65-character wide box:
- Border:
â+ 63Ãâ+â= 65 chars - Content:
â+ 63 chars (content + padding) +â= 65 chars
Unicode Characters Reference
Light Lines (Recommended)
Corners: â â â â
Lines: â â
T-junctions: â ⤠⬠â´
Cross: â¼
Arrows
Simple: â â â â
Filled: â¶ â â¼ â²
Double: â â â â
Common Patterns
Simple Box
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â TITLE â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤
â â
â Content with proper right-padding â
â â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
Horizontal Flow
âââââââââââââ âââââââââââââ âââââââââââââ
â Step 1 âââââââ¶â Step 2 âââââââ¶â Step 3 â
âââââââââââââ âââââââââââââ âââââââââââââ
Vertical Flow
âââââââââââââââââââ
â Parent â
ââââââââââ¬âââââââââ
â
â¼
âââââââââââââââââââ
â Child â
âââââââââââââââââââ
Pre-Commit Checklist
- All lines in each box have IDENTICAL character count
- Content lines have right-padding before closing â
- Empty line AFTER every âââââ opening
- Empty line BEFORE every âââââ closing
- Empty lines around every ââââ⤠divider
- Nested boxes have breathing room at ALL levels
- Flow content is CENTERED within parent box
- Total width ⤠70 characters
- No mixed ASCII/Unicode characters
How to Use
Each rule file in rules/ contains:
- Rule explanation with rationale
- WRONG example showing the anti-pattern
- CORRECT example showing proper implementation
- Verification steps
Recommended Tools
| Tool | URL | Platform |
|---|---|---|
| ASCIIFlow | asciiflow.com | Web, free |
| Monodraw | monodraw.helftone.com | macOS, paid |
| Textik | textik.com | Web, free |
| Diagon | arthursonzogni.com/Diagon | Web, free |
References
- ASCIIFlow: Free web-based Unicode diagram editor
- Box-drawing characters (Wikipedia)
- Unicode Box Drawing Block