Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问许可证需确认审计通过

ascii-diagramASCII 图

Agent Skill

ascii-diagram 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

588

周安装

24

GitHub Stars

公开资料未说明

下载量

188
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:ascii-diagram(ASCII 图)
来源仓库:https://github.com/lwlee2608/agent-skills
仓库路径:skills/ascii-diagram
安装命令:
npx skills add https://github.com/lwlee2608/agent-skills --skill ascii-diagram
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/lwlee2608/agent-skills --skill ascii-diagram

简介

ascii-diagram 通过打印比对循环修正 ASCII 图的对齐错误,解决边框错位与连接断裂问题。

  • 优先使用 Unicode 框线字符,仅在必要时降级为纯 ASCII 符号。
  • 适用于流程图、架构图与层次结构的可视化校正,提升专业感。
  • 禁止在同一图中混合不同风格字符,确保渲染一致性。
  • 建议人工复核关键节点位置,尤其当涉及多列布局或嵌套分支时。

SKILL.md

Validate ASCII Diagram

ASCII diagrams produced by agents frequently have alignment issues — misaligned corners, uneven borders, broken connectors. LLMs cannot reliably count characters in their head. This skill uses a print-and-inspect loop to catch and fix alignment bugs.

Rules

  1. Prefer Unicode box-drawing characters. Use , , , for corners, for horizontal borders, for vertical borders, and , , , , for junctions. Only fall back to plain ASCII (+, -, |) if the user explicitly requests it or the target format cannot render Unicode. Never mix styles in the same diagram.
  2. Every row of a box must be the exact same width — top border, content rows, and bottom border.
  3. Pad short content lines with spaces so the right border lands in the same column on every row.
  4. Connectors and arrows should clearly connect to the box borders they relate to. Verify gaps are intentional.
  5. No tab characters. Tabs render at unpredictable widths and silently break alignment. Use spaces only.
  6. No trailing whitespace. Invisible trailing spaces cause width mismatches that look correct but aren't.

Verification procedure

Do NOT try to validate by counting characters in your head. Instead, use the print-and-inspect loop below.

Step 0: Decide whether to delegate to a subagent

Delegate the entire verification loop to a subagent (via the Agent tool) when the diagram is both (a) >6 lines AND (b) has multiple boxes or nested/connected layouts. The loop produces a lot of ruler output and iteration churn that is not useful to keep in the main context.

For smaller diagrams (a single box, a short table, ≤6 lines), run the loop inline — spawning a subagent is slower than just doing it.

When delegating, hand off with this template (the subagent does not have this skill loaded):

File: <absolute path>
Lines: <start>-<end>
Task: Run the verification loop in skills/ascii-diagram/SKILL.md steps 1-5. Edit the source file in place.
Report: PASS or FAIL, iteration count, and a one-line summary of fixes. Do not paste the diagram back.

After the subagent returns:

  • Re-read the edited lines to confirm the summary matches what actually changed — subagent reports describe intent, not necessarily the diff.
  • On FAIL (subagent hit the 3-iteration cap with issues remaining), decide whether to accept the partial fix, re-delegate with specific guidance, or finish inline. Do not silently treat FAIL as done.

Step 1: Write the diagram to a temp file

Write the diagram to a temp file using the Write tool. Use a unique path like /tmp/diagram-<context>.txt (replace <context> with something specific to this session, e.g., /tmp/diagram-auth-flow.txt) to avoid clobbering other sessions. Use that same path in every command below.

Step 2: Print with a column ruler

Run this Bash command to display the diagram with column numbers (replace <path> with your temp file path):

awk 'BEGIN{
  ruler1=""; ruler2=""
  for(i=0;i<120;i++){
    ruler1=ruler1 sprintf("%d", int(i/10)%10)
    ruler2=ruler2 sprintf("%d", i%10)
  }
  print "     " ruler1
  print "     " ruler2
}
{printf "%3d: %s\n", NR, $0}' <path>

This prints every line with its row number and a two-row column ruler (tens digit, ones digit) across the top, making it trivial to check whether corners, borders, and connectors land in the right columns. If your diagram is wider than 120 columns, bump the 120 in the loop.

Step 3: Check for invisible problems

Run these checks to catch issues that are invisible in normal output (replace <path> with your temp file path):

# Tabs (will break alignment silently)
grep -F $'\t' <path> && echo "FAIL: tabs found" || echo "OK: no tabs"
# Trailing whitespace
grep ' $' <path> && echo "FAIL: trailing spaces found" || echo "OK: no trailing whitespace"

Fix any findings before proceeding.

Step 4: Visually inspect the ruler output

Look at the printed output and check:

  • Box width consistency: For each box, does the right border ( or /) appear in the same column on every row? Read the column number off the ruler.
  • Top/bottom border match: Does the bottom corner (/) sit in the same column as the top corner (/)?
  • Side-by-side alignment: Do adjacent boxes share consistent column positions?
  • Connectors: Do arrows actually touch the border characters?

Step 5: Fix and repeat

If any issue is found:

  1. Fix the diagram in the file where it lives (not the temp file).
  2. Write the updated diagram to the same temp file again.
  3. Print with the ruler again.
  4. Repeat until every check passes or you hit 3 iterations — whichever comes first. If issues remain after 3 iterations, move on.

Common mistakes to watch for

  • Right border off by one. An extra or missing space before shifts the right border to a different column than the top/bottom corner. Use the ruler to verify every row ends at the same column. WRONG: CORRECT: ┌──────────┐ ┌──────────┐ │ hello │ │ hello │ │ world │ ← col 13 │ world │ └──────────┘ ← col 12 └──────────┘
  • Bottom border width mismatch. The bottom border has fewer or more than the top, so the closing corner lands in the wrong column. Count with the ruler, not by eye. WRONG: CORRECT: ┌──────────┐ ← col 12 ┌──────────┐ │ content │ │ content │ └─────────┘ ← col 11 └──────────┘
  • Side-by-side boxes with ragged gap. The gap between adjacent boxes varies across rows, causing the second box to shift. Verify that the second box's corner is in the same column on every row. WRONG: CORRECT: ┌───────┐ ┌───────┐ ┌───────┐ ┌───────┐ │ box 1 │ │ box 2 │ │ box 1 │ │ box 2 │ └───────┘ └───────┘ ← extra └───────┘ └───────┘
  • Mixed box-drawing styles. Mixing ASCII (+, -, |) and Unicode (, , ) characters in the same diagram. Pick one style and use it consistently. WRONG: CORRECT: ┌──────────+ ← ASCII + ┌──────────┐ │ content │ │ content │ └──────────┘ └──────────┘
  • Connector not touching box border. Arrows or lines that float with a gap between them and the box they should connect to. Every connector must start and end at a border character. WRONG: CORRECT: ┌───────┐ ┌───────┐ ┌───────┐ ┌───────┐ │ box 1 │ -> │ box 2 │ │ box 1 │──>│ box 2 │ └───────┘ └───────┘ └───────┘ └───────┘ gap ^ ^ gap no gaps

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.51%
按下载量换算67

Claude

27.23%
按下载量换算51

Cursor

18.98%
按下载量换算36

Gemini CLI

10.16%
按下载量换算19

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills