skills/ansi-table/SKILL.md
Render new ANSI tables from a data source. Trigger ONLY when asked to CREATE/DISPLAY/PRINT tabular data (CSV, parquet, dataframes, analysis results, sweep matrices, grids). Do NOT trigger when merely referencing or discussing an existing table.
npx skillsauth add MoonBoi9001/claude-code-cli-tools ansi-tableInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Present tabular data as beautifully formatted, color-coded tables in the terminal.
IMPORTANT: Do NOT write a Python script file. Always render the table directly with a single Bash(python3 -c "...") call. Never use the Write tool to create a .py file and then run it.
python3 -c "..." in a single Bash call. No script files.pandas for data loading when available; fall back to csv stdlib if not.Tables must fit the terminal. Always detect width and constrain output accordingly.
import shutil
term_width = shutil.get_terminal_size((80, 24)).columns
Hard cap: total table width (including borders and 2-char left indent) must never exceed term_width. If the natural column widths would overflow, shrink the widest column(s) and wrap cell text. When a cell's content is wrapped, continuation lines repeat the border characters but leave other columns empty.
Column sizing strategy:
num_columns + 1 vertical barsterm_width, reduce the widest column iteratively until it fits, with a minimum column width of 10 characterstextwrap.wrap()Use Unicode box-drawing characters for borders:
| Character | Name | Usage |
|-----------|------|-------|
| \u250c | ┌ | Top-left corner |
| \u2510 | ┐ | Top-right corner |
| \u2514 | └ | Bottom-left corner |
| \u2518 | ┘ | Bottom-right corner |
| \u251c | ├ | Left T-junction |
| \u2524 | ┤ | Right T-junction |
| \u252c | ┬ | Top T-junction |
| \u2534 | ┴ | Bottom T-junction |
| \u253c | ┼ | Cross junction |
| \u2500 | ─ | Horizontal line |
| \u2502 | │ | Vertical line |
Build border strings dynamically based on column widths. Do not hardcode table widths.
Use ANSI escape codes to color-code cell values based on thresholds. Choose thresholds contextually based on what the data represents.
GREEN = '\033[32m' # Good / low / within target
YELLOW = '\033[33m' # Warning / moderate / approaching limit
RED = '\033[31m' # Bad / high / exceeding limit
BOLD = '\033[1m' # Headers and titles
RESET = '\033[0m' # Reset after each colored value
When thresholds are not obvious from context, ask the user or use sensible defaults (e.g. terciles of the data range).
\033[1mpython3 -c "
import shutil, textwrap
term_width = shutil.get_terminal_size((80, 24)).columns
INDENT = 2
BOLD = '\033[1m'; RESET = '\033[0m'
GREEN = '\033[32m'; YELLOW = '\033[33m'; RED = '\033[31m'
headers = ['Name', 'Status', 'Description']
rows = [
['alpha', 'OK', 'A short description of the first item'],
['beta', 'WARN', 'A longer description that might need wrapping in narrow terminals'],
['gamma', 'FAIL', 'Another description'],
]
# 1. Compute natural column widths from data
col_widths = [len(h) for h in headers]
for row in rows:
for i, cell in enumerate(row):
col_widths[i] = max(col_widths[i], len(cell))
# 2. Add padding (1 each side)
padded = [w + 2 for w in col_widths]
# 3. Check total: indent + borders + padded widths
num_cols = len(headers)
total = INDENT + (num_cols + 1) + sum(padded)
# 4. Shrink widest columns if needed (min 10 inner width)
while total > term_width:
widest = max(range(num_cols), key=lambda i: padded[i])
if padded[widest] <= 12: # min 10 + 2 padding
break
padded[widest] -= 1
total -= 1
inner = [p - 2 for p in padded] # usable char width per column
# 5. Build helpers
def hline(left, mid, right):
return ' ' * INDENT + left + mid.join('\u2500' * p for p in padded) + right
def render_row(cells, colors=None):
wrapped = [textwrap.wrap(c, w) or [''] for c, w in zip(cells, inner)]
max_lines = max(len(w) for w in wrapped)
for ln in range(max_lines):
parts = []
for i, w in enumerate(wrapped):
text = w[ln] if ln < len(w) else ''
color = (colors[i] if colors else '') if ln == 0 or (colors and colors[i]) else ''
reset = RESET if color else ''
parts.append(f' {color}{text:<{inner[i]}}{reset} ')
print(' ' * INDENT + '\u2502' + '\u2502'.join(parts) + '\u2502')
# 6. Print table
print()
print(f'{\" \" * INDENT}{BOLD}Example Table{RESET}')
print()
print(hline('\u250c', '\u252c', '\u2510'))
render_row(headers, [BOLD] * num_cols)
print(hline('\u251c', '\u253c', '\u2524'))
for i, row in enumerate(rows):
status_color = {\"OK\": GREEN, \"WARN\": YELLOW, \"FAIL\": RED}.get(row[1], '')
render_row(row, ['', status_color, ''])
if i < len(rows) - 1:
print(hline('\u251c', '\u253c', '\u2524'))
print(hline('\u2514', '\u2534', '\u2518'))
print()
"
When presenting data with multiple groups (e.g. monthly breakdowns, per-category views):
%Adjust cell width to fit the widest value in each column plus padding, then apply the terminal width constraint described above.
testing
Bring a branch up to date with its base by MERGING the base in (a merge commit), never rebasing — so no commit hashes are rewritten and no force-push is needed. Use this whenever the user asks to "use the merge skill", "bring my branch up to date", "merge main/the base into this branch", "update my branch from its base without rebasing", "do a merge commit instead of rebasing", or "clear the conflict on my stacked PR without a force-push" (a common situation right after a parent PR squash-merges and the child branch suddenly shows conflicts). It handles both cases: a base that only re-packaged work the branch already has, and a base that carries genuinely new work to fold in. It always verifies the merge preserved exactly the branch's own change before pushing. This is an explicitly-invoked workflow — reach for it when the user talks about merging or updating a branch from its base, but don't hijack unrelated git merges.
development
Run a deep multi-agent review of a GitHub PR — 6 specialized agents covering architecture, correctness, security, tests, code quality, and integration. ONLY trigger when the user's message contains the explicit phrase 'deep review' (e.g. 'deep review this PR', 'deep review PR #1234', 'do a deep review of 1234', '/deep-review'). Do NOT trigger on bare 'review', 'review this', 'review the PR', 'code review', 'what do you think of this PR', or pasted PR URLs without 'deep review' in the message — those are handled by the lighter /review skill. The literal phrase 'deep review' must appear in the user's message; absence of that phrase means do not invoke this skill.
data-ai
--- name: re-explain description: Re-explain a concept from the ground up when an earlier explanation didn't land. Trigger aggressively whenever the user signals confusion about recent technical content — phrases like "i don't get it", "from scratch", "ground up", "explain again", "this makes no sense", "try again", "you need to work better", "what's X" (where X was something just mentioned), or invoking /re-explain directly. Also trigger on quieter cues like the user re-quoting a phrase from th
development
Load a high-fidelity recap of a prior Claude Code session into the current session's context. The goal is to be LESS lossy than running /compact would be — the user is invoking this skill precisely because /compact discards detail they need. Use this when the user wants to "resume", "pick up", "continue", or "load context from" a previous session — especially a long one (hundreds of thousands of tokens) where actually resuming the session would be prohibitively expensive, or where the session was auto-compacted mid-flow and a lot of detailed work happened after the last compaction that another /compact pass would crush. Also trigger on phrases like "recap the last session", "what was I working on yesterday", "load the prior chat", or "/load-prior-session". The skill extracts via a subagent so the full transcript never enters the current session's context.