ascii-diagram-validator

Validate ASCII diagram alignment in markdown. TRIGGERS - diagram alignment, ASCII art, box-drawing diagrams.

16 stars

Best use case

ascii-diagram-validator is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Validate ASCII diagram alignment in markdown. TRIGGERS - diagram alignment, ASCII art, box-drawing diagrams.

Teams using ascii-diagram-validator should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/ascii-diagram-validator/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/devops/ascii-diagram-validator/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/ascii-diagram-validator/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How ascii-diagram-validator Compares

Feature / Agentascii-diagram-validatorStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Validate ASCII diagram alignment in markdown. TRIGGERS - diagram alignment, ASCII art, box-drawing diagrams.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# ASCII Diagram Validator

Validate and fix alignment issues in ASCII box-drawing diagrams commonly used in architecture documentation, README files, and code comments.

## Overview

ASCII diagrams using box-drawing characters (─│┌┐└┘├┤┬┴┼ and double-line variants ═║╔╗╚╝╠╣╦╩╬) require precise column alignment. This skill provides:

1. **Validation script** - Detects misaligned characters with file:line:column locations
2. **Actionable fixes** - Specific suggestions for correcting each issue
3. **Multi-file support** - Validate individual files or entire directories

## When to Use This Skill

Invoke when:

- Creating or editing ASCII architecture diagrams in markdown
- Reviewing documentation with box-drawing diagrams
- Fixing "diagram looks wrong" complaints
- Before committing docs/ARCHITECTURE.md or similar files
- When user mentions "ASCII alignment", "diagram alignment", or "box drawing"

## Supported Characters

### Single-Line Box Drawing

```
Corners: ┌ ┐ └ ┘
Lines:   ─ │
T-joins: ├ ┤ ┬ ┴
Cross:   ┼
```

### Double-Line Box Drawing

```
Corners: ╔ ╗ ╚ ╝
Lines:   ═ ║
T-joins: ╠ ╣ ╦ ╩
Cross:   ╬
```

### Mixed (Double-Single)

```
╞ ╟ ╤ ╧ ╪ ╫
```

## Quick Start

### Validate a Single File

```bash
/usr/bin/env bash << 'PREFLIGHT_EOF'
uv run ${CLAUDE_PLUGIN_ROOT}/skills/ascii-diagram-validator/scripts/check_ascii_alignment.py docs/ARCHITECTURE.md
PREFLIGHT_EOF
```

### Validate Multiple Files

```bash
/usr/bin/env bash << 'PREFLIGHT_EOF_2'
uv run ${CLAUDE_PLUGIN_ROOT}/skills/ascii-diagram-validator/scripts/check_ascii_alignment.py docs/*.md
PREFLIGHT_EOF_2
```

### Validate Directory

```bash
/usr/bin/env bash << 'PREFLIGHT_EOF_3'
uv run ${CLAUDE_PLUGIN_ROOT}/skills/ascii-diagram-validator/scripts/check_ascii_alignment.py docs/
PREFLIGHT_EOF_3
```

## Output Format

The script outputs issues in a compiler-like format for easy navigation:

```
docs/ARCHITECTURE.md:45:12: error: vertical connector '│' at column 12 has no matching character above
  → Suggestion: Add '│', '├', '┤', '┬', or '┼' at line 44, column 12

docs/ARCHITECTURE.md:67:8: warning: horizontal line '─' at column 8 has no terminator
  → Suggestion: Add '┐', '┘', '┤', '┴', or '┼' to close the line
```

### Severity Levels

| Level   | Description                              |
| ------- | ---------------------------------------- |
| error   | Broken connections, misaligned verticals |
| warning | Unterminated lines, potential issues     |
| info    | Style suggestions (optional cleanup)     |

## Validation Rules

The script checks for:

1. **Vertical Alignment** - Vertical connectors (│║) must align with characters above/below
2. **Corner Connections** - Corners (┌┐└┘╔╗╚╝) must connect properly to adjacent lines
3. **Junction Validity** - T-joins and crosses must have correct incoming/outgoing connections
4. **Line Continuity** - Horizontal lines (─═) should terminate at valid endpoints
5. **Box Closure** - Boxes should be properly closed (no dangling edges)

## Exit Codes

| Code | Meaning                                         |
| ---- | ----------------------------------------------- |
| 0    | No issues found                                 |
| 1    | Errors detected                                 |
| 2    | Warnings only (errors ignored with --warn-only) |

## Integration with Claude Code

When Claude Code creates or edits ASCII diagrams:

1. Run the validator script on the file
2. Review any errors in the output
3. Apply suggested fixes
4. Re-run until clean

### Example Workflow

```bash
/usr/bin/env bash << 'PREFLIGHT_EOF_4'
# After editing docs/ARCHITECTURE.md
uv run ${CLAUDE_PLUGIN_ROOT}/skills/ascii-diagram-validator/scripts/check_ascii_alignment.py docs/ARCHITECTURE.md

# If errors found, Claude Code can read the output and fix:
# docs/ARCHITECTURE.md:45:12: error: vertical connector '│' at column 12 has no matching character above
# → Edit line 44, column 12 to add the missing connector
PREFLIGHT_EOF_4
```

## Limitations

- Detects structural alignment issues, not aesthetic spacing
- Requires consistent use of box-drawing characters (no mixed ASCII like +---+)
- Tab characters may cause false positives (convert to spaces first)
- Unicode normalization not performed (use pre-composed characters)

## Bundled Scripts

| Script                             | Purpose                |
| ---------------------------------- | ---------------------- |
| `scripts/check_ascii_alignment.py` | Main validation script |

## Related

- [ARCHITECTURE.md best practices](https://github.com/joelparkerhenderson/architecture-decision-record)
- [Unicode Box Drawing block](https://www.unicode.org/charts/PDF/U2500.pdf)

Related Skills

citation-link-validator

16
from diegosouzapw/awesome-omni-skill

Validates footnote links in articles to prevent broken 404 URLs. Use when Claude needs to generate content with reference citations (research reports, technical documentation, academic articles). Supports two modes - (1) Real-time validation mode - validates each URL during content generation, ensuring zero broken links; (2) Post-validation mode - checks all footnotes in existing documents. Suitable for high-quality citation scenarios including web search data compilation, literature citation, and fact-checking tasks.

bicep-diagrams

16
from diegosouzapw/awesome-omni-skill

Generates architecture diagrams from Azure Bicep files. Use when user has .bicep files or asks to visualize Bicep infrastructure.

azure-pipelines-validator

16
from diegosouzapw/awesome-omni-skill

Comprehensive toolkit for validating, linting, and securing Azure DevOps Pipeline configurations.

azure-diagrams

16
from diegosouzapw/awesome-omni-skill

Visualizes Azure infrastructure from ARM templates, Azure CLI, or descriptions. Use when user has Azure resources to diagram.

asciinema-streaming-backup

16
from diegosouzapw/awesome-omni-skill

Real-time asciinema backup to GitHub orphan branch. TRIGGERS - streaming backup, asciinema backup, session backup, recording backup.

asciinema-player

16
from diegosouzapw/awesome-omni-skill

Play .cast terminal recordings in iTerm2. TRIGGERS - asciinema play, .cast file, play recording, recording playback.

asciinema-converter

16
from diegosouzapw/awesome-omni-skill

Convert .cast recordings to .txt for analysis. TRIGGERS - convert cast, cast to txt, strip ANSI, batch convert.

asciinema-cast-format

16
from diegosouzapw/awesome-omni-skill

Asciinema v3 .cast file format reference. TRIGGERS - cast format, asciicast spec, event codes, parse cast file.

asciinema-analyzer

16
from diegosouzapw/awesome-omni-skill

Semantic analysis of asciinema recordings. TRIGGERS - analyze cast, keyword extraction, find patterns in recordings.

ascii-explainer

16
from diegosouzapw/awesome-omni-skill

Explains code, algorithms, system design using ASCII diagrams. Trigger phrases - "explain visually", "I don't get it", "show me", "ascii diagram", "help me understand". Produces diagram-first explanations ending with TL;DR tables.

ascii-diagrams

16
from diegosouzapw/awesome-omni-skill

Create and fix ASCII diagrams, tables, wireframes, box-drawings. Use when message contains Unicode box characters (┌┐└┘│─), user asks to create/fix text visualization, align borders, or fix broken ASCII art. Triggers on "поправ діаграму", "fix diagram", "create table", "вирівняй", "align boxes".

ascii-diagram-creator

16
from diegosouzapw/awesome-omni-skill

Create ASCII diagrams from workflow definitions and save them as image files (PNG, SVG, etc.)