plugins/dev/skills/tui-progress/SKILL.md
Builds terminal progress displays with multi-phase bars, ETA, speed, and status colors. Use when writing import scripts, migrations, batch processors, or CLI tools needing a live progress bar.
npx skillsauth add madappgang/magus tui-progressInstall 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.
Build terminal progress views for long-running scripts. Provides a reusable TypeScript module and design patterns for consistent, clean progress displays.
Copy scripts/tui.ts into the project and import it:
import { TUI } from './path/to/tui.ts';
const tui = new TUI('My Import');
const phase = tui.addPhase('Jobs');
tui.begin();
phase.start();
for (let page = 1; page <= totalPages; page++) {
const items = await fetchPage(page);
// ... process items ...
phase.tick({ page, totalPages, fetched: items.length, created: 5, updated: 95 });
}
phase.done();
tui.finish();
scripts/tui.ts — self-contained, zero dependencies, works with Bun and Node.
new TUI(title, options?)| Option | Type | Default | Description |
|--------|------|---------|-------------|
| width | number | 60 | Box width in characters |
| statLabels | object | {created,updated,linked,skipped} | Custom labels for stat columns |
| hideStats | string[] | [] | Hide stat columns: 'created', 'updated', 'linked', 'skipped' |
tui.addPhase(label) -> PhaseAdd a tracked phase. Call before tui.begin().
tui.begin() / tui.finish()begin() — enter alternate screen buffer, hide cursor, start renderingfinish() — exit alternate screen, show cursor, print summary to normal terminalphase.start() / phase.done() / phase.fail(error)Lifecycle methods. fail() marks the phase red with error message.
phase.tick(stats) — accumulateAdd to running totals. Call after each page/batch.
phase.tick({ page: 5, totalPages: 100, fetched: 100, created: 10, updated: 90 });
phase.set(stats) — replaceSet stats absolutely (not accumulating). Use when tracking totals externally.
PhaseStats fields| Field | Type | Description |
|-------|------|-------------|
| page | number | Current page/step number |
| totalPages | number | Total pages (0 = unknown) |
| fetched | number | Items processed this tick |
| created | number | New items created |
| updated | number | Existing items updated |
| linked | number | Items matched/linked |
| skipped | number | Items skipped |
| errors | number | Error count |
| custom | Record<string,number> | Custom named counters |
Follow these when building progress displays:
+, -, |. No Unicode box drawing chars (width varies across terminals).\x1b[?1049h on start, \x1b[?1049l on exit. No scroll history pollution.\x1b[H\x1b[J before each frame. More reliable than cursor-up counting.\x1b[?25l during render, \x1b[?25h on exit. Eliminates flicker.[/] spinner, [ok], [!!], [ ].page / elapsed, show pg/s and remaining time estimate.####..... style, 32 chars wide, with percentage.LOG_LEVEL=silent via env var AND logger.level = 'silent' after import. Redirect stderr for pg warnings.Long-running scripts import modules that log to stdout/stderr. Suppress them:
// Set env BEFORE running (in the shell command):
// LOG_LEVEL=silent bun run scripts/my-import.ts
// Also silence pino after import:
import { logger } from '../src/core/logger';
logger.level = 'silent';
// Suppress console during module init:
const _log = console.log;
console.log = () => {};
// ... imports ...
console.log = _log;
// For pg SSL warnings, redirect stderr:
// bun run scripts/my-import.ts 2>/dev/null
Launch import scripts in a tmux vertical split for monitoring:
tmux split-window -h -l '50%' "LOG_LEVEL=silent bun run scripts/my-import.ts 2>/dev/null"
See assets/examples/ for complete working scripts:
api-import.ts — multi-phase API import with paginated datasimple-batch.ts — single phase with custom stat labelserror-handling.ts — graceful error handling, failed phases show redtesting
A test skill for validation testing. Use when testing skill parsing and validation logic.
tools
--- name: bad-skill description: This skill has invalid YAML in frontmatter allowed-tools: [invalid, array, syntax prerequisites: not-an-array --- # Bad Skill This skill has malformed frontmatter that should fail parsing. The YAML has: - Unclosed array bracket - Wrong type for prerequisites (should be array, not string)
development
Sync model aliases from the curated Firebase database. Fetches default model assignments, short aliases, team compositions, and known model metadata from the claudish API. Run this to get fresh model recommendations.
tools
Release one or more Magus plugins to the distribution repos (magus, magus-alpha, magus-marketing). Handles version inference from git history, marketplace.json updates, tagging, and force-push to lean dist repos. Use whenever the user says "release kanban", "release the dev plugin", "cut a new version of gtd", "bump kanban to 1.7", or hands you a batch like "release kanban and gtd". Also use for multi-plugin releases and for checking what a release would contain before committing.