fairchild/dotclaude · Archived

ascii-art-fix

Fix misaligned right borders in ASCII art diagrams

Installation

$ npx skills add fairchild/dotclaude --skill ascii-art-fix

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from fairchild/dotclaude · top by installs.

npx skills add fairchild/dotclaude

Browse all from fairchild/dotclaude

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 2
License LICENSE
Default branch main
Open issues 7
Status Archived

Skill metadata

Parsed from SKILL.md frontmatter.

LicenseApache-2.0
More metadata
status
experimental
experimental_reason
Prompt-only repair is useful but still has edge cases around nested diagrams, tables, and mixed markdown content.

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,194 B
  • docs SUMMARY.md 71 B

History

  1. First recorded snapshot · 2 installs

SKILL.md

ASCII Art Fix

Fix misaligned right borders in ASCII art box diagrams. Prompt-driven — no external tools required.

Recognizing ASCII Box Diagrams

Box diagrams use border characters to draw rectangular outlines:

Plus-dash style:

+-------------------+
| Content here      |
+-------------------+

Unicode style:

┌─────────────────┐
│ Content here    │
└─────────────────┘

How to Fix

  1. Find each box — identify top/bottom borders (lines of +---+ or ┌───┐ / └───┘)
  2. Measure the box width — count characters in the top border from first + to last + (inclusive)
  3. Pad each content line — every | or content line between borders must have its closing border character at the same column as the border width
  4. Preserve everything else — do not modify any text outside box diagrams

Rules

DO fix:

  • Content lines where the closing | or is at the wrong column
  • Pad with spaces between content and closing border
  • Borders with the wrong corner glyphs — a top border uses ┌…┐, a bottom border uses └…┘ (a bottom drawn as ┌…┐ gets its corners replaced)

DO NOT touch:

  • Markdown tables (| Col | Col | with |---|---| separator rows)
  • Content inside fenced code blocks (``` or ~~~)
  • Flow arrows or connectors between boxes (|, v, ---->)
  • Lines that don't belong to a box diagram
  • Already-aligned boxes

Distinguishing Tables from Boxes

Markdown tables have:

  • Multiple | characters per line separating columns
  • A separator row matching |---|---| (dashes with optional colons)
  • No + corner characters

Box diagrams have:

  • + or ┌└┐┘ corner characters on border lines
  • Exactly two | or per content line (opening and closing)
  • Horizontal borders made of - or

If a line has a |---| separator row, it's a table. Leave it alone.

Verify Your Work

After fixing, check that every line in each box is the same width. Nested boxes are especially tricky — the outer box content lines that contain an inner box still need their closing | at the outer box's column:

+------------------+          <- width 20, | at column 20
| Outer content    |          <- | at column 20 ✓
|  +----------+    |         <- | at column 20 ✓ (not column 17)
|  | Inner    |    |         <- | at column 20 ✓
|  +----------+    |         <- | at column 20 ✓
+------------------+

Run the validator to catch misalignment:

python3 scripts/validate.py <file>

Eval

Run the eval to check your work:

bash skills/ascii-art-fix/scripts/clean.sh
# process each case in assets/cases/*/
bash skills/ascii-art-fix/scripts/eval.sh

See references/evaluating.md for the full eval workflow.