Luigit
repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by admin

pi/agent/skills/optional/ascii-boxes/SKILL.md

Raw
Rendered preview

name: ascii-boxes description: Draw proper Unicode boxes/tables. Use when output needs aligned terminal boxes, table borders, nested frames, box-drawing chars.

ASCII BOXES

RULES: NEVER draw boxes with + - | . NEVER say "plain ASCII to avoid Unicode". USE Unicode box chars: ┌┐└┘ ─│ ├┤┬┴┼. Complex box/table -> run script. Do not freehand. Monospace grid only. Every output line same visual width.

SCRIPT: index.mjs in this skill directory. Run it with Node. When running from another cwd, resolve it relative to this SKILL.md file.

CLI:

node ./index.mjs draw "text" --width N --style single | double | bold --align left | center | right
node ./index.mjs table --header "H1,H2" --rows "a,b" "c,d"
node ./index.mjs nested "OUTER" "INNER" --gap N

IMPORT:

import { createTable, drawBox, drawNested } from "./index.mjs";

FNS: drawBox(content, opts) -> string createTable(headers, rows, opts) -> string drawNested(outerText, innerText, opts) -> string

CHARS: single: ─│┌┐└┘├┤┬┴┼ double: ═║╔╗╚╝╠╣╦╩╬ bold: ━┃┏┓┗┛┣┫┳┻╋

GOOD: ┌──────┬──────┐ │ Name │ Role │ ├──────┼──────┤ │ API │ svc │ └──────┴──────┘

BAD: +------+------+ | Name | Role | +------+------+

---
name: ascii-boxes
description: Draw proper Unicode boxes/tables. Use when output needs aligned terminal boxes, table borders, nested frames, box-drawing chars.
---

# ASCII BOXES

RULES:
NEVER draw boxes with + - | .
NEVER say "plain ASCII to avoid Unicode".
USE Unicode box chars:
┌┐└┘ ─│ ├┤┬┴┼.
Complex box/table -> run script.
Do not freehand.
Monospace grid only.
Every output line same visual width.

SCRIPT:
`index.mjs` in this skill directory. Run it with Node.
When running from another cwd, resolve it relative to this `SKILL.md` file.

CLI:

```bash
node ./index.mjs draw "text" --width N --style single | double | bold --align left | center | right
node ./index.mjs table --header "H1,H2" --rows "a,b" "c,d"
node ./index.mjs nested "OUTER" "INNER" --gap N
```

IMPORT:

```ts
import { createTable, drawBox, drawNested } from "./index.mjs";
```

FNS:
drawBox(content, opts) -> string createTable(headers, rows, opts) -> string
drawNested(outerText, innerText, opts) -> string

CHARS:
single:
─│┌┐└┘├┤┬┴┼ double:
═║╔╗╚╝╠╣╦╩╬ bold:
━┃┏┓┗┛┣┫┳┻╋

GOOD:
┌──────┬──────┐ │ Name │ Role │ ├──────┼──────┤ │ API │ svc │ └──────┴──────┘

BAD:
+------+------+ | Name | Role | +------+------+