[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6GXJTPC6D04D3F3WYGHFD5J":3,"skill-same:01M6GXJTPC6D04D3F3WYGHFD5J":83},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":51,"commitSha":52,"skillDirectory":53,"forksCount":54,"repositoryHtmlUrl":55,"repositoryHomepageUrl":56,"ownerHtmlUrl":57,"ownerBlogUrl":56,"ownerDescription":58,"updatedAt":59,"install":60,"resources":72},"01M6GXJTPC6D04D3F3WYGHFD5J","ascii-diagram",null,"Generate perfectly aligned ASCII diagrams — architecture, flow, sequence, box-and-arrow. Uses a programmatic character-grid approach so alignment is guaranteed by math, not token prediction. Includes post-render verification.","SethGammon\u002FCitadel","SethGammon","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F5523585?v=4","01M6GXJ90FD2CE9QF5GQERWN06","Seth Gammon","01M6GXJ94VXYGK5KAW14EYE901",931,"MIT","https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Fascii-diagram\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"diagram","ascii diagram","ascii","alignment","architecture","true","programmatic","render","false","architecture diagram","token","character","generate","Art","diagrams","ascii art","math","text","flow","verification","2026-11-10 10:12:30",false,"---\nname: ascii-diagram\nlicense: MIT\ndescription: >-\n  Generate perfectly aligned ASCII diagrams — architecture, flow, sequence,\n  box-and-arrow. Uses a programmatic character-grid approach so alignment is\n  guaranteed by math, not token prediction. Includes post-render verification.\nuser-invocable: true\nauto-trigger: false\ntrigger_keywords:\n  - ascii diagram\n  - ascii art\n  - box diagram\n  - architecture diagram\n  - flow diagram\n  - sequence diagram\n  - draw a diagram\n  - text diagram\n---\n\n# \u002Fascii-diagram — Perfectly Aligned ASCII Diagrams\n\n## Orientation\n\n**Use when:**\n- The user wants any kind of text\u002FASCII diagram: architecture, flow, sequence,\n  box-and-arrow, tree, table, org chart, network topology\n- A diagram needs to be embedded in markdown, code comments, or plain text\n- Visual alignment matters\n\n**Do NOT use when:**\n- The user wants an image (suggest Mermaid, PlantUML, or an image tool instead)\n- The diagram is trivial (a single box or a one-line arrow)\n\n**What this skill needs:**\n- A description of what to diagram\n- Optional: preferred style (single-line `+--+`, double-line `╔══╗`, rounded `╭──╮`, heavy `┏━━┓`)\n- Optional: target width constraint\n\n## Protocol\n\n### Step 1: PLAN THE LAYOUT\n\nBefore writing ANY characters, plan the diagram structurally:\n\n1. **Identify elements**: List every box\u002Fnode and its label text\n2. **Identify connections**: List every arrow\u002Fline between elements, with optional labels\n3. **Choose layout direction**: left-to-right, top-to-bottom, or mixed\n4. **Calculate dimensions**:\n   - Each box width = max label line length + 4 (2 padding + 2 border)\n   - Each box height = label line count + 2 (top + bottom border)\n   - Gutters between boxes: minimum 3 characters for arrows (` → `)\n   - For vertical arrows: minimum 1 row gap\n\nWrite this plan out explicitly before proceeding. Example:\n\n```\nElements:\n  A: \"Client\" → width=10, height=3\n  B: \"Server\" → width=10, height=3\n  C: \"Database\" → width=12, height=3\nLayout: left-to-right\nConnections: A→B (HTTP), B→C (SQL)\nTotal width: 10 + 6 + 10 + 6 + 12 = 44\n```\n\n### Step 2: BUILD ON A CHARACTER GRID\n\nUse this JavaScript approach mentally (or actually execute it via Bash if the\ndiagram is complex):\n\n```javascript\n\u002F\u002F For complex diagrams, RUN this — don't try to hand-align\nclass Grid {\n  constructor(w, h) {\n    this.w = w; this.h = h;\n    this.cells = Array.from({length: h}, () => Array(w).fill(' '));\n  }\n  put(x, y, char) {\n    if (x >= 0 && x \u003C this.w && y >= 0 && y \u003C this.h) this.cells[y][x] = char;\n  }\n  text(x, y, str) {\n    for (let i = 0; i \u003C str.length; i++) this.put(x + i, y, str[i]);\n  }\n  box(x, y, w, h, label) {\n    \u002F\u002F Top border\n    this.put(x, y, '+');\n    for (let i = 1; i \u003C w-1; i++) this.put(x+i, y, '-');\n    this.put(x+w-1, y, '+');\n    \u002F\u002F Bottom border\n    this.put(x, y+h-1, '+');\n    for (let i = 1; i \u003C w-1; i++) this.put(x+i, y+h-1, '-');\n    this.put(x+w-1, y+h-1, '+');\n    \u002F\u002F Sides\n    for (let j = 1; j \u003C h-1; j++) {\n      this.put(x, y+j, '|');\n      this.put(x+w-1, y+j, '|');\n    }\n    \u002F\u002F Label (centered)\n    const lines = label.split('\\n');\n    const startY = y + Math.floor((h - lines.length) \u002F 2);\n    for (let li = 0; li \u003C lines.length; li++) {\n      const line = lines[li];\n      const startX = x + Math.floor((w - line.length) \u002F 2);\n      this.text(startX, startY + li, line);\n    }\n  }\n  hArrow(x1, x2, y, label) {\n    \u002F\u002F Horizontal arrow from x1 to x2 at row y\n    const dir = x2 > x1 ? 1 : -1;\n    for (let x = x1; x !== x2; x += dir) this.put(x, y, '-');\n    this.put(x2, y, dir > 0 ? '>' : '\u003C');\n    if (label) {\n      const lx = Math.min(x1, x2) + Math.floor((Math.abs(x2-x1) - label.length) \u002F 2);\n      this.text(lx, y - 1, label);\n    }\n  }\n  vArrow(x, y1, y2, label) {\n    \u002F\u002F Vertical arrow from y1 to y2 at column x\n    const dir = y2 > y1 ? 1 : -1;\n    for (let y = y1; y !== y2; y += dir) this.put(x, y, '|');\n    this.put(x, y2, dir > 0 ? 'v' : '^');\n    if (label) this.text(x + 2, Math.min(y1, y2) + Math.floor(Math.abs(y2-y1) \u002F 2), label);\n  }\n  render() {\n    return this.cells.map(row => row.join('').trimEnd()).join('\\n');\n  }\n}\n```\n\n**For any diagram with 4+ boxes or crossing connections, ACTUALLY RUN the script\nvia Bash using Node.** Do not attempt to mentally compute grid coordinates for\ncomplex diagrams. This is the entire point of the skill — let code handle alignment.\n\n**Pre-built grid engine**: `.citadel\u002Fscripts\u002Fgrid.cjs` provides\n`Grid` and `autoLayout()`. For auto-layout, pass a JSON spec:\n\n```bash\nnode .citadel\u002Fscripts\u002Fgrid.cjs '{\"direction\":\"horizontal\",\"boxes\":[{\"id\":\"a\",\"label\":\"Input\"},{\"id\":\"b\",\"label\":\"Output\"}],\"arrows\":[{\"from\":\"a\",\"to\":\"b\",\"label\":\"data\"}]}'\n```\n\nFor complex\u002Fnested diagrams, use the Grid class directly via `require()`:\n\n```bash\nnode -e \"\nconst {Grid} = require('.\u002F.citadel\u002Fscripts\u002Fgrid.cjs');\nconst g = new Grid(60, 10);\ng.box(0, 0, 20, 5, 'Box A');\ng.box(30, 0, 20, 5, 'Box B');\ng.hArrow(20, 29, 2, 'flow');\nconsole.log(g.render());\n\"\n```\n\n**Verification**: `.citadel\u002Fscripts\u002Fverify.cjs` checks alignment:\n\n```bash\necho \"\u003Cdiagram>\" | node .citadel\u002Fscripts\u002Fverify.cjs --stdin\n```\n\n### Step 3: VERIFY ALIGNMENT\n\nAfter generating the diagram, verify these properties:\n\n1. **Box closure**: Every `+` corner has matching corners forming a rectangle\n2. **Consistent widths**: All rows within a box have the same width\n3. **Arrow continuity**: Every arrow is an unbroken sequence of `-`, `|`, or\n   diagonal characters ending in `>`, `\u003C`, `v`, `^`\n4. **Label centering**: Labels are centered within their boxes (±1 char)\n5. **No trailing whitespace issues**: Right edges of boxes in the same column\n   align vertically\n\n**Verification method**: Count characters. Pick any two `|` side borders that\nshould be in the same column — they MUST be at the same character offset from\nthe start of their respective lines.\n\nIf verification fails, fix by adjusting coordinates and re-rendering — do NOT\ntry to patch individual characters.\n\n### Step 4: OUTPUT\n\nPresent the diagram in a fenced code block:\n\n````\n```\n[diagram here]\n```\n````\n\nIf the diagram was generated by a script, also offer to save the generator script\nso the user can modify and re-run it.\n\n## Style Guide\n\n### Box styles (use single-line by default):\n\n```\nSingle:  +--------+     Double:  ╔════════╗     Rounded: ╭────────╮\n         | Label  |              ║ Label  ║              │ Label  │\n         +--------+              ╚════════╝              ╰────────╯\n```\n\n### Arrow styles:\n\n```\nHorizontal: ----->    \u003C----->    ──────>\nVertical:   |         |          │\n            |         |          │\n            v         v          ▼\nLabeled:      HTTP\n            ------->\n```\n\n### Common patterns:\n\n**Pipeline (left-to-right):**\n```\n+-------+     +-------+     +-------+\n| Input |---->| Process|--->| Output|\n+-------+     +-------+     +-------+\n```\n\n**Layered (top-to-bottom):**\n```\n+-------------------+\n|    Presentation   |\n+-------------------+\n         |\n+-------------------+\n|     Business      |\n+-------------------+\n         |\n+-------------------+\n|       Data        |\n+-------------------+\n```\n\n**Nested (container with children):**\n```\n+--[ Kubernetes cluster ]------------------+\n|                                          |\n|  +----------+  +----------+  +--------+ |\n|  | Service  |  | Service  |  |Registry| |\n|  +----------+  +----------+  +--------+ |\n|                                          |\n+------------------------------------------+\n```\n\n## Failure Modes & Recovery\n\n| Symptom | Cause | Fix |\n|---------|-------|-----|\n| Boxes misaligned vertically | Computed wrong Y offset | Recalculate from top, re-render full grid |\n| Arrow doesn't reach target | Off-by-one in x\u002Fy range | Use `box.x + box.w` for right edge, not `box.x + box.w - 1` |\n| Label overflows box | Box width too small | Recalculate: `width = max(label.length + 4, minWidth)` |\n| Pipes don't line up across rows | Mixed tabs\u002Fspaces or variable-width chars | Use ONLY spaces, ONLY ASCII (unless explicitly using Unicode box-drawing) |\n\n## Complexity Thresholds\n\n- **1-3 boxes, linear flow**: Render mentally, verify by counting\n- **4-7 boxes, simple topology**: Use the Grid class, run via Node\n- **8+ boxes or crossing connections**: Use the Grid class, AND generate a reusable script the user can tweak\n- **Sequence diagrams**: Always use the Grid class — column alignment across many rows is error-prone\n\n## Anti-Patterns (NEVER do these)\n\n- **NEVER freehand complex diagrams** — you WILL misalign them\n- **NEVER use tabs** — only spaces for monospace alignment\n- **NEVER mix Unicode box-drawing with ASCII `+--+`** — pick one style\n- **NEVER try to \"fix\" a misaligned diagram by editing individual lines** — re-render from the grid\n- **NEVER assume your output is aligned** — always verify by counting columns\n\n## Fringe Cases\n\n- **`.citadel\u002Fscripts\u002Fgrid.cjs` not present**: The harness hasn't been initialized in this project yet. Either run `\u002Fdo setup` to initialize, or use the inline Grid class from Step 2 directly — it's embedded in this skill's protocol as a copy-paste template.\n- **User asks for an image, not ASCII**: Suggest Mermaid (for GitHub\u002FGitLab rendering), PlantUML, or an image generation tool. Do not attempt to produce ASCII for an image request.\n- **Diagram has crossing arrows**: ASCII doesn't handle crossings well. Either restructure the layout (change direction, use layered topology) or note the limitation and offer Mermaid instead.\n- **Unicode box-drawing renders incorrectly**: The user's terminal or font may not support Unicode box-drawing characters. Fall back to single-line ASCII (`+--+` style) and note the switch.\n- **Diagram is trivial (1-2 nodes)**: Skip the full protocol. Render directly in a code block without running the grid engine.\n- **Very large diagram (20+ nodes)**: Warn the user that ASCII has width limits. Consider breaking into sub-diagrams or using a proper diagramming tool for publication.\n\n## Quality Gates\n\n- Every diagram MUST pass the verification step (Step 3) — count characters to confirm alignment, or run `verify.cjs --stdin`\n- No tabs — only spaces\n- Box corners must form closed rectangles\n- All arrows must be unbroken sequences ending in a head character\n- Unicode and ASCII box-drawing styles must not be mixed in the same diagram\n- For diagrams with 4+ boxes: the Grid class was used (not freehand)\n\n## Contextual Gates\n\n**Disclosure:** \"Generating ASCII diagram. Output to screen (or file if requested).\"\n**Reversibility:** green — outputs ASCII diagram to screen or a new file; no existing files modified\n**Trust gates:**\n- Any: full diagram generation, verification, and output.\n\n## Exit Protocol\n\nPresent the diagram in a fenced code block. If a script was used to generate it, offer to save it so the user can tweak and re-run. If verification found issues, fix them before presenting.\n","# \u002Fascii-diagram — Perfectly Aligned ASCII Diagrams\n\n## Orientation\n\n**Use when:**\n- The user wants any kind of text\u002FASCII diagram: architecture, flow, sequence,\n  box-and-arrow, tree, table, org chart, network topology\n- A diagram needs to be embedded in markdown, code comments, or plain text\n- Visual alignment matters\n\n**Do NOT use when:**\n- The user wants an image (suggest Mermaid, PlantUML, or an image tool instead)\n- The diagram is trivial (a single box or a one-line arrow)\n\n**What this skill needs:**\n- A description of what to diagram\n- Optional: preferred style (single-line `+--+`, double-line `╔══╗`, rounded `╭──╮`, heavy `┏━━┓`)\n- Optional: target width constraint\n\n## Protocol\n\n### Step 1: PLAN THE LAYOUT\n\nBefore writing ANY characters, plan the diagram structurally:\n\n1. **Identify elements**: List every box\u002Fnode and its label text\n2. **Identify connections**: List every arrow\u002Fline between elements, with optional labels\n3. **Choose layout direction**: left-to-right, top-to-bottom, or mixed\n4. **Calculate dimensions**:\n   - Each box width = max label line length + 4 (2 padding + 2 border)\n   - Each box height = label line count + 2 (top + bottom border)\n   - Gutters between boxes: minimum 3 characters for arrows (` → `)\n   - For vertical arrows: minimum 1 row gap\n\nWrite this plan out explicitly before proceeding. Example:\n\n```\nElements:\n  A: \"Client\" → width=10, height=3\n  B: \"Server\" → width=10, height=3\n  C: \"Database\" → width=12, height=3\nLayout: left-to-right\nConnections: A→B (HTTP), B→C (SQL)\nTotal width: 10 + 6 + 10 + 6 + 12 = 44\n```\n\n### Step 2: BUILD ON A CHARACTER GRID\n\nUse this JavaScript approach mentally (or actually execute it via Bash if the\ndiagram is complex):\n\n```javascript\n\u002F\u002F For complex diagrams, RUN this — don't try to hand-align\nclass Grid {\n  constructor(w, h) {\n    this.w = w; this.h = h;\n    this.cells = Array.from({length: h}, () => Array(w).fill(' '));\n  }\n  put(x, y, char) {\n    if (x >= 0 && x \u003C this.w && y >= 0 && y \u003C this.h) this.cells[y][x] = char;\n  }\n  text(x, y, str) {\n    for (let i = 0; i \u003C str.length; i++) this.put(x + i, y, str[i]);\n  }\n  box(x, y, w, h, label) {\n    \u002F\u002F Top border\n    this.put(x, y, '+');\n    for (let i = 1; i \u003C w-1; i++) this.put(x+i, y, '-');\n    this.put(x+w-1, y, '+');\n    \u002F\u002F Bottom border\n    this.put(x, y+h-1, '+');\n    for (let i = 1; i \u003C w-1; i++) this.put(x+i, y+h-1, '-');\n    this.put(x+w-1, y+h-1, '+');\n    \u002F\u002F Sides\n    for (let j = 1; j \u003C h-1; j++) {\n      this.put(x, y+j, '|');\n      this.put(x+w-1, y+j, '|');\n    }\n    \u002F\u002F Label (centered)\n    const lines = label.split('\\n');\n    const startY = y + Math.floor((h - lines.length) \u002F 2);\n    for (let li = 0; li \u003C lines.length; li++) {\n      const line = lines[li];\n      const startX = x + Math.floor((w - line.length) \u002F 2);\n      this.text(startX, startY + li, line);\n    }\n  }\n  hArrow(x1, x2, y, label) {\n    \u002F\u002F Horizontal arrow from x1 to x2 at row y\n    const dir = x2 > x1 ? 1 : -1;\n    for (let x = x1; x !== x2; x += dir) this.put(x, y, '-');\n    this.put(x2, y, dir > 0 ? '>' : '\u003C');\n    if (label) {\n      const lx = Math.min(x1, x2) + Math.floor((Math.abs(x2-x1) - label.length) \u002F 2);\n      this.text(lx, y - 1, label);\n    }\n  }\n  vArrow(x, y1, y2, label) {\n    \u002F\u002F Vertical arrow from y1 to y2 at column x\n    const dir = y2 > y1 ? 1 : -1;\n    for (let y = y1; y !== y2; y += dir) this.put(x, y, '|');\n    this.put(x, y2, dir > 0 ? 'v' : '^');\n    if (label) this.text(x + 2, Math.min(y1, y2) + Math.floor(Math.abs(y2-y1) \u002F 2), label);\n  }\n  render() {\n    return this.cells.map(row => row.join('').trimEnd()).join('\\n');\n  }\n}\n```\n\n**For any diagram with 4+ boxes or crossing connections, ACTUALLY RUN the script\nvia Bash using Node.** Do not attempt to mentally compute grid coordinates for\ncomplex diagrams. This is the entire point of the skill — let code handle alignment.\n\n**Pre-built grid engine**: `.citadel\u002Fscripts\u002Fgrid.cjs` provides\n`Grid` and `autoLayout()`. For auto-layout, pass a JSON spec:\n\n```bash\nnode .citadel\u002Fscripts\u002Fgrid.cjs '{\"direction\":\"horizontal\",\"boxes\":[{\"id\":\"a\",\"label\":\"Input\"},{\"id\":\"b\",\"label\":\"Output\"}],\"arrows\":[{\"from\":\"a\",\"to\":\"b\",\"label\":\"data\"}]}'\n```\n\nFor complex\u002Fnested diagrams, use the Grid class directly via `require()`:\n\n```bash\nnode -e \"\nconst {Grid} = require('.\u002F.citadel\u002Fscripts\u002Fgrid.cjs');\nconst g = new Grid(60, 10);\ng.box(0, 0, 20, 5, 'Box A');\ng.box(30, 0, 20, 5, 'Box B');\ng.hArrow(20, 29, 2, 'flow');\nconsole.log(g.render());\n\"\n```\n\n**Verification**: `.citadel\u002Fscripts\u002Fverify.cjs` checks alignment:\n\n```bash\necho \"\u003Cdiagram>\" | node .citadel\u002Fscripts\u002Fverify.cjs --stdin\n```\n\n### Step 3: VERIFY ALIGNMENT\n\nAfter generating the diagram, verify these properties:\n\n1. **Box closure**: Every `+` corner has matching corners forming a rectangle\n2. **Consistent widths**: All rows within a box have the same width\n3. **Arrow continuity**: Every arrow is an unbroken sequence of `-`, `|`, or\n   diagonal characters ending in `>`, `\u003C`, `v`, `^`\n4. **Label centering**: Labels are centered within their boxes (±1 char)\n5. **No trailing whitespace issues**: Right edges of boxes in the same column\n   align vertically\n\n**Verification method**: Count characters. Pick any two `|` side borders that\nshould be in the same column — they MUST be at the same character offset from\nthe start of their respective lines.\n\nIf verification fails, fix by adjusting coordinates and re-rendering — do NOT\ntry to patch individual characters.\n\n### Step 4: OUTPUT\n\nPresent the diagram in a fenced code block:\n\n````\n```\n[diagram here]\n```\n````\n\nIf the diagram was generated by a script, also offer to save the generator script\nso the user can modify and re-run it.\n\n## Style Guide\n\n### Box styles (use single-line by default):\n\n```\nSingle:  +--------+     Double:  ╔════════╗     Rounded: ╭────────╮\n         | Label  |              ║ Label  ║              │ Label  │\n         +--------+              ╚════════╝              ╰────────╯\n```\n\n### Arrow styles:\n\n```\nHorizontal: ----->    \u003C----->    ──────>\nVertical:   |         |          │\n            |         |          │\n            v         v          ▼\nLabeled:      HTTP\n            ------->\n```\n\n### Common patterns:\n\n**Pipeline (left-to-right):**\n```\n+-------+     +-------+     +-------+\n| Input |---->| Process|--->| Output|\n+-------+     +-------+     +-------+\n```\n\n**Layered (top-to-bottom):**\n```\n+-------------------+\n|    Presentation   |\n+-------------------+\n         |\n+-------------------+\n|     Business      |\n+-------------------+\n         |\n+-------------------+\n|       Data        |\n+-------------------+\n```\n\n**Nested (container with children):**\n```\n+--[ Kubernetes cluster ]------------------+\n|                                          |\n|  +----------+  +----------+  +--------+ |\n|  | Service  |  | Service  |  |Registry| |\n|  +----------+  +----------+  +--------+ |\n|                                          |\n+------------------------------------------+\n```\n\n## Failure Modes & Recovery\n\n| Symptom | Cause | Fix |\n|---------|-------|-----|\n| Boxes misaligned vertically | Computed wrong Y offset | Recalculate from top, re-render full grid |\n| Arrow doesn't reach target | Off-by-one in x\u002Fy range | Use `box.x + box.w` for right edge, not `box.x + box.w - 1` |\n| Label overflows box | Box width too small | Recalculate: `width = max(label.length + 4, minWidth)` |\n| Pipes don't line up across rows | Mixed tabs\u002Fspaces or variable-width chars | Use ONLY spaces, ONLY ASCII (unless explicitly using Unicode box-drawing) |\n\n## Complexity Thresholds\n\n- **1-3 boxes, linear flow**: Render mentally, verify by counting\n- **4-7 boxes, simple topology**: Use the Grid class, run via Node\n- **8+ boxes or crossing connections**: Use the Grid class, AND generate a reusable script the user can tweak\n- **Sequence diagrams**: Always use the Grid class — column alignment across many rows is error-prone\n\n## Anti-Patterns (NEVER do these)\n\n- **NEVER freehand complex diagrams** — you WILL misalign them\n- **NEVER use tabs** — only spaces for monospace alignment\n- **NEVER mix Unicode box-drawing with ASCII `+--+`** — pick one style\n- **NEVER try to \"fix\" a misaligned diagram by editing individual lines** — re-render from the grid\n- **NEVER assume your output is aligned** — always verify by counting columns\n\n## Fringe Cases\n\n- **`.citadel\u002Fscripts\u002Fgrid.cjs` not present**: The harness hasn't been initialized in this project yet. Either run `\u002Fdo setup` to initialize, or use the inline Grid class from Step 2 directly — it's embedded in this skill's protocol as a copy-paste template.\n- **User asks for an image, not ASCII**: Suggest Mermaid (for GitHub\u002FGitLab rendering), PlantUML, or an image generation tool. Do not attempt to produce ASCII for an image request.\n- **Diagram has crossing arrows**: ASCII doesn't handle crossings well. Either restructure the layout (change direction, use layered topology) or note the limitation and offer Mermaid instead.\n- **Unicode box-drawing renders incorrectly**: The user's terminal or font may not support Unicode box-drawing characters. Fall back to single-line ASCII (`+--+` style) and note the switch.\n- **Diagram is trivial (1-2 nodes)**: Skip the full protocol. Render directly in a code block without running the grid engine.\n- **Very large diagram (20+ nodes)**: Warn the user that ASCII has width limits. Consider breaking into sub-diagrams or using a proper diagramming tool for publication.\n\n## Quality Gates\n\n- Every diagram MUST pass the verification step (Step 3) — count characters to confirm alignment, or run `verify.cjs --stdin`\n- No tabs — only spaces\n- Box corners must form closed rectangles\n- All arrows must be unbroken sequences ending in a head character\n- Unicode and ASCII box-drawing styles must not be mixed in the same diagram\n- For diagrams with 4+ boxes: the Grid class was used (not freehand)\n\n## Contextual Gates\n\n**Disclosure:** \"Generating ASCII diagram. Output to screen (or file if requested).\"\n**Reversibility:** green — outputs ASCII diagram to screen or a new file; no existing files modified\n**Trust gates:**\n- Any: full diagram generation, verification, and output.\n\n## Exit Protocol\n\nPresent the diagram in a fenced code block. If a script was used to generate it, offer to save it so the user can tweak and re-run. If verification found issues, fix them before presenting.\n",{"name":5,"license":15,"description":7,"auto-trigger":40,"user-invocable":44,"trigger_keywords":45},true,[20,34,46,28,47,48,49,50],"box diagram","flow diagram","sequence diagram","draw a diagram","text diagram","main","e1a3d45697a0f323aaedcbea0ab6a0387b5fe722","skills\u002Fascii-diagram",84,"https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel","https:\u002F\u002Fsethgammon.github.io\u002FCitadel\u002F","https:\u002F\u002Fgithub.com\u002FSethGammon","Building Citadel, the repo-local operating layer for Claude Code and Codex. Persistent work, routing, verification, and coordinated agent fleets.","2026-11-13 02:05:13",{"source":8,"skillName":5,"commands":61,"prompt":71,"zipAvailable":44},[62,65,68],{"tool":63,"command":64},"npx","npx skills add SethGammon\u002FCitadel --skill ascii-diagram",{"tool":66,"command":67},"bunx","bunx skills add SethGammon\u002FCitadel --skill ascii-diagram",{"tool":69,"command":70},"pnpm","pnpm dlx skills add SethGammon\u002FCitadel --skill ascii-diagram","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Fascii-diagram\u002FSKILL.md",[73,79],{"path":74,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":77,"sourceHtmlUrl":78},"__benchmarks__\u002Fno-citadel-scripts.md","REFERENCE","参考文档",974,"https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Fascii-diagram\u002F__benchmarks__\u002Fno-citadel-scripts.md",{"path":80,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":81,"sourceHtmlUrl":82},"__benchmarks__\u002Fsimple-pipeline.md",890,"https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Fascii-diagram\u002F__benchmarks__\u002Fsimple-pipeline.md",[84,109,138,162,188,207],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":39},"01M6GXSBKE9A2HQWF8QRAZ4WJ5","workspace","Multi-repo campaign coordinator. Same lifecycle as fleet -- scope claims, discovery relay, wave-based execution -- but the unit of work is a repo, not a file. Coordinates campaigns across repositories with shared context.","https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Fworkspace\u002FSKILL.md",[],[86,91,92,93,94,95,96,97,98,99,100,101,102,27,103,104,105,106,107,108],"repos","snowflake","multi-repo","work","context","campaign","coordinate","but","across","campaigns","shared","as","scope","add","unit","coordinator","fleet","claims",{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":120,"publishedAt":39},"01M6GXS873AD1Y6RTM6GV47F3E","wiki","Markdown-first knowledge base where the LLM acts as librarian. Ingests raw sources, compiles and interlinks topic files, self-maintains an index. No vector DB or embeddings required -- uses LLM-native navigation over structured markdown up to ~400K words.","https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Fwiki\u002FSKILL.md",[115],{"categoryNo":116,"categoryName":117,"taxonomyType":118,"taxonomyTypeDesc":119},"01JBSEEDCAT000000000000021","资料检索与研究","SCENARIO","使用场景",[111,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,102,27,136,137],"vector","embeddings","librarian","markdown","knowledge","karpathy","knowledge management","karpathy wiki","up","files","maintain","self","knowledge base","project","db","sources","native",{"skillNo":139,"name":140,"nameZh":6,"description":141,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":142,"categories":143,"keywords":144,"publishedAt":39},"01M6GXS2840SJ61285SZ43EJC3","watch","File sentinel that monitors the working directory for changes and marker comments, then auto-triggers appropriate skills. Poll-based via git diff against the last scan commit. Writes intake items for batch processing and routes marker actions through \u002Fdo. Use for automatic reactions to file changes; do NOT use for one-off inspection or tasks needing human judgment per file.","https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Fwatch\u002FSKILL.md",[],[140,145,146,147,148,149,150,151,152,153,154,155,130,156,157,158,159,160,27,161],"directory","commit","tasks","git","batch","actions","start","sentinel","diff","auto","stop","do","scan","human","judgment","reactions","processing",{"skillNo":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":166,"categories":167,"keywords":171,"publishedAt":39},"01M6GXRXHYJ5RD9RZP81S2VFSW","verify","Self-test the Citadel hook pipeline from within a live session. Exercises real tool calls (Write, Edit, Bash, Read) and checks that hooks fired, telemetry accumulated, and no errors occurred. Reports HOOK HEALTH: PASS or HOOK HEALTH: FAIL with a per-hook breakdown.","https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Fverify\u002FSKILL.md",[168],{"categoryNo":169,"categoryName":170,"taxonomyType":118,"taxonomyTypeDesc":119},"01JBSEEDCAT000000000000008","测试与质量",[164,172,173,174,175,176,177,178,179,180,181,182,183,132,184,27,185,186,187,24],"citadel","telemetry","harness","pipeline","Bash","tool","read","write","edit","session","hooks","reports","live","hook","errors","calls",{"skillNo":189,"name":190,"nameZh":6,"description":191,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":192,"categories":193,"keywords":194,"publishedAt":39},"01M6GXRS9MCJFMQZ917H2XH3AC","unharness","Safely leave Citadel using the active adoption receipt. Produces a no-write, reviewable plan, preserves a portable archive, removes only exact owned material, and reports modified or externally registered surfaces as retained or unknown. Legacy installs must be imported before exact leave is claimed.","https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Funharness\u002FSKILL.md",[],[190,195,172,174,196,197,198,199,200,129,183,201,202,203,204,205,102,27,206,24],"uninstall","adoption","plan","archive","remove","only","Legacy","surfaces","clean","imported","active","material",{"skillNo":208,"name":209,"nameZh":6,"description":210,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":211,"categories":212,"keywords":221,"publishedAt":39},"01M6GXRMEJ2VHD43R9FNPD4910","triage","GitHub issue and PR investigator. Pulls open issues\u002FPRs, classifies them, searches the codebase for root cause or reviews contributed code, proposes fixes with file:line references, and optionally implements fixes. Use for investigating GitHub issues and reviewing PRs; do NOT use for general code review unrelated to GitHub issues.","https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Ftriage\u002FSKILL.md",[213,216],{"categoryNo":214,"categoryName":215,"taxonomyType":118,"taxonomyTypeDesc":119},"01JBSEEDCAT000000000000007","代码审查",{"categoryNo":217,"categoryName":218,"taxonomyType":219,"taxonomyTypeDesc":220},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[209,222,223,224,225,226,227,228,229,230,231,232,233,234,156,27,235,236,237,24],"code review","review","review pr","pr","code","github issues","issues","open","use","unrelated","issue","general","references","line","investigator","reviews"]