ascii-diagram-validator by terrylica/cc-skills
npx skills add https://github.com/terrylica/cc-skills --skill ascii-diagram-validator验证并修复架构文档、README 文件和代码注释中常用的 ASCII 框线图的对齐问题。
使用框线字符(─│┌┐└┘├┤┬┴┼ 及双线变体 ═║╔╗╚╝╠╣╦╩╬)的 ASCII 图表需要精确的列对齐。此技能提供:
在以下情况下调用:
Corners: ┌ ┐ └ ┘
Lines: ─ │
T-joins: ├ ┤ ┬ ┴
Cross: ┼
Corners: ╔ ╗ ╚ ╝
Lines: ═ ║
T-joins: ╠ ╣ ╦ ╩
Cross: ╬
╞ ╟ ╤ ╧ ╪ ╫
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
/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
/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
/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
脚本以类似编译器的格式输出问题,便于定位:
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
| 级别 | 描述 |
|---|---|
| error | 连接断开,垂直线未对齐 |
| warning | 未终止的线条,潜在问题 |
| info | 样式建议(可选清理) |
脚本检查以下内容:
| 代码 | 含义 |
|---|---|
| 0 | 未发现问题 |
| 1 | 检测到错误 |
| 2 | 仅存在警告(使用 --warn-only 时忽略错误) |
当 Claude Code 创建或编辑 ASCII 图表时:
/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
| 脚本 | 用途 |
|---|---|
scripts/check_ascii_alignment.py | 主验证脚本 |
| 问题 | 原因 | 解决方案 |
|---|---|---|
| 找不到脚本 | 插件未安装 | 使用 claude plugin list 验证插件是否安装 |
| 制表符导致误报 | 制表符导致错位 | 验证前将制表符转换为空格 |
| 未检测到混合 ASCII | 使用 +---+ 样式 | 脚本仅验证 Unicode 框线字符 |
| 列号偏移 | Unicode 宽度计算问题 | 使用预组合字符,避免组合标记 |
| 未发现问题但显示异常 | 美观间距未检查 | 验证器检查结构,而非视觉间距 |
| 意外的退出码 2 | 仅警告模式 | 使用 --warn-only 标志将警告视为成功 |
| 找不到验证错误 | 复杂的嵌套图表 | 检查输出中的行号,仅验证特定部分 |
| Unicode 字符不显示 | 终端字体缺少字形 | 使用支持完整 Unicode 框线字符的字体 |
每周安装次数
101
代码仓库
GitHub 星标数
25
首次出现
Jan 24, 2026
安全审计
安装于
opencode94
gemini-cli93
codex92
claude-code90
github-copilot90
cursor88
Validate and fix alignment issues in ASCII box-drawing diagrams commonly used in architecture documentation, README files, and code comments.
ASCII diagrams using box-drawing characters (─│┌┐└┘├┤┬┴┼ and double-line variants ═║╔╗╚╝╠╣╦╩╬) require precise column alignment. This skill provides:
Invoke when:
Corners: ┌ ┐ └ ┘
Lines: ─ │
T-joins: ├ ┤ ┬ ┴
Cross: ┼
Corners: ╔ ╗ ╚ ╝
Lines: ═ ║
T-joins: ╠ ╣ ╦ ╩
Cross: ╬
╞ ╟ ╤ ╧ ╪ ╫
/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
/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
/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
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
| Level | Description |
|---|---|
| error | Broken connections, misaligned verticals |
| warning | Unterminated lines, potential issues |
| info | Style suggestions (optional cleanup) |
The script checks for:
| Code | Meaning |
|---|---|
| 0 | No issues found |
| 1 | Errors detected |
| 2 | Warnings only (errors ignored with --warn-only) |
When Claude Code creates or edits ASCII diagrams:
/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
| Script | Purpose |
|---|---|
scripts/check_ascii_alignment.py | Main validation script |
| Issue | Cause | Solution |
|---|---|---|
| Script not found | Plugin not installed | Verify plugin installed with claude plugin list |
| False positives with tabs | Tab characters misalign | Convert tabs to spaces before validation |
| Mixed ASCII not detected | Using +---+ style | Script only validates Unicode box-drawing chars |
| Column numbers off | Unicode width calculation | Use pre-composed characters, avoid combining marks |
| No issues but looks wrong | Aesthetic spacing not checked | Validator checks structure, not visual spacing |
| Exit code 2 unexpected | warnings only mode | Use --warn-only flag to treat warnings as success |
| Can't find validation error |
Weekly Installs
101
Repository
GitHub Stars
25
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode94
gemini-cli93
codex92
claude-code90
github-copilot90
cursor88
Skills CLI 使用指南:AI Agent 技能包管理器安装与管理教程
40,000 周安装
Firebase Authentication 集成指南 - 快速实现用户认证与安全管理
363 周安装
TypeScript高级类型完全指南:泛型、条件类型、映射类型、实用工具类型详解
372 周安装
Claude技能:自动化文档工作流 - 智能管理项目文档生命周期(CLAUDE.md/README.md)
364 周安装
Claude项目工作流技能:9个命令自动化项目生命周期,节省35-55分钟
365 周安装
Hugging Face Datasets 技能:数据集管理、SQL查询与多格式支持工具
366 周安装
使用.NET Aspire配置Akka.NET:集群编排、持久化与Kubernetes部署指南
101 周安装
| Complex nested diagram |
| Check line numbers in output, validate section only |
| Unicode chars not rendering | Terminal font missing glyphs | Use font with full Unicode box-drawing support |