Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Create consistent chalk-based color and styling system for CLI output with themes, semantic colors, and formatting utilities.
.claude/skills/a5c-ai-chalk-styling-system/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 40% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 8% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -6% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 19% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 20% | 0% |
Create consistent chalk-based styling for CLI output.
Invoke this skill when you need to:
| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | language | string | Yes | Target language | | theme | object | No | Custom color theme | | utilities | array | No | Formatting utilities needed |
typescriptimport chalk, { ChalkInstance } from 'chalk'; // Theme definition export interface Theme { primary: string; secondary: string; success: string; warning: string; error: string; info: string; muted: string; } const defaultTheme: Theme = { primary: '#3498db', secondary: '#9b59b6', success: '#2ecc71', warning: '#f39c12', error: '#e74c3c', info: '#00bcd4', muted: '#95a5a6', }; // Create themed chalk instance export function createTheme(theme: Partial<Theme> = {}): { primary: ChalkInstance; secondary: ChalkInstance; success: ChalkInstance; warning: ChalkInstance; error: ChalkInstance; info: ChalkInstance; muted: ChalkInstance; } { const t = { ...defaultTheme, ...theme }; return { primary: chalk.hex(t.primary), secondary: chalk.hex(t.secondary), success: chalk.hex(t.success), warning: chalk.hex(t.warning), error: chalk.hex(t.error), info: chalk.hex(t.info), muted: chalk.hex(t.muted), }; } // Default styled outputs export const style = createTheme(); // Semantic helpers export const log = { success: (msg: string) => console.log(style.success('✓ ') + msg), error: (msg: string) => console.error(style.error('✗ ') + msg), warning: (msg: string) => console.log(style.warning('⚠ ') + msg), info: (msg: string) => console.log(style.info('ℹ ') + msg), debug: (msg: string) => console.log(style.muted('⋯ ') + msg), }; // Text formatting export const format = { bold: chalk.bold, dim: chalk.dim, italic: chalk.italic, underline: chalk.underline, strikethrough: chalk.strikethrough, code: (text: string) => chalk.bgGray.white(` ${text} `), link: (text: string, url: string) => chalk.blue.underline(text) + ` (${chalk.dim(url)})`, }; // Box drawing export function box(content: string, options?: { title?: string; padding?: number; borderColor?: string; }): string { const lines = content.split('\n'); const maxWidth = Math.max(...lines.map(l => l.length), options?.title?.length || 0); const padding = options?.padding || 1; const borderColor = options?.borderColor || '#888'; const border = chalk.hex(borderColor); const horizontalBorder = border('─'.repeat(maxWidth + padding * 2 + 2)); const emptyLine = border('│') + ' '.repeat(maxWidth + padding * 2) + border('│'); const result: string[] = []; // Top border with optional title if (options?.title) { const titlePadding = Math.floor((maxWidth + padding * 2 - options.title.length) / 2); result.push( border('┌') + border('─'.repeat(titlePadding)) + ` ${options.title} ` + border('─'.repeat(maxWidth + padding * 2 - titlePadding - options.title.length - 2)) + border('┐') ); } else { result.push(border('┌') + horizontalBorder.slice(1, -1) + border('┐')); } // Padding top for (let i = 0; i < padding; i++) { result.push(emptyLine); } // Content for (const line of lines) { result.push( border('│') + ' '.repeat(padding) + line.padEnd(maxWidth) + ' '.repeat(padding) + border('│') ); } // Padding bottom for (let i = 0; i < padding; i++) { result.push(emptyLine); } // Bottom border result.push(border('└') + horizontalBorder.slice(1, -1) + border('┘')); return result.join('\n'); } // Table formatting export function table( headers: string[], rows: string[][], options?: { headerColor?: string } ): string { const headerColor = chalk.hex(options?.headerColor || '#3498db').bold; const colWidths = headers.map((h, i) => Math.max(h.length, ...rows.map(r => (r[i] || '').length)) ); const headerRow = headers .map((h, i) => headerColor(h.padEnd(colWidths[i]))) .join(' '); const separator = colWidths.map(w => '─'.repeat(w)).join('──'); const dataRows = rows.map(row => row.map((cell, i) => (cell || '').padEnd(colWidths[i])).join(' ') ); return [headerRow, separator, ...dataRows].join('\n'); }
json{ "dependencies": { "chalk": "^5.0.0" } }
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 13,413 | 13,315 | -1% | 1 | 1 | 0% | 3,091 | 4,322 | +40% | 0 | 0 | — |
case-02 | fail→fail | 25,384 | 15,622 | -38% | 1 | 1 | 0% | 5,835 | 5,105 | -13% | 0 | 0 | — |
case-03 | fail→pass | 17,992 | 12,235 | -32% | 1 | 1 | 0% | 3,722 | 4,015 | +8% | 0 | 0 | — |
case-04 | pass→pass | 20,470 | 12,026 | -41% | 1 | 1 | 0% | 3,523 | 4,136 | +17% | 0 | 0 | — |
case-05 | fail→pass | 17,352 | 9,651 | -44% | 1 | 1 | 0% | 3,827 | 3,580 | -6% | 0 | 0 | — |
case-06 | fail→fail | 18,342 | 16,794 | -8% | 1 | 1 | 0% | 3,986 | 5,535 | +39% | 0 | 0 | — |
case-07 | fail→pass | 12,233 | 7,180 | -41% | 1 | 1 | 0% | 2,323 | 2,760 | +19% | 0 | 0 | — |
case-08 | fail→fail | 14,751 | 10,064 | -32% | 1 | 1 | 0% | 2,771 | 3,488 | +26% | 0 | 0 | — |
case-09 | fail→fail | 10,644 | 8,679 | -18% | 1 | 1 | 0% | 2,103 | 3,293 | +57% | 0 | 0 | — |
case-10 | fail→fail | 16,023 | 11,518 | -28% | 1 | 1 | 0% | 3,393 | 3,875 | +14% | 0 | 0 | — |
case-11 | fail→pass | 10,687 | 4,307 | -60% | 1 | 1 | 0% | 2,083 | 2,510 | +20% | 0 | 0 | — |
case-12 | fail→fail | 13,620 | 9,267 | -32% | 1 | 1 | 0% | 2,724 | 3,480 | +28% | 0 | 0 | — |
case-13 | fail→fail | 17,172 | 17,352 | +1% | 1 | 1 | 0% | 3,721 | 5,232 | +41% | 0 | 0 | — |
case-14 | fail→fail | 12,989 | 11,426 | -12% | 1 | 1 | 0% | 2,949 | 3,857 | +31% | 0 | 0 | — |
case-15 | fail→fail | 10,614 | 7,271 | -31% | 1 | 1 | 0% | 2,012 | 2,970 | +48% | 0 | 0 | — |
case-16 | fail→fail | 12,063 | 7,329 | -39% | 1 | 1 | 0% | 2,253 | 2,689 | +19% | 0 | 0 | — |
case-17 | fail→fail | 16,380 | 12,339 | -25% | 1 | 1 | 0% | 3,328 | 4,028 | +21% | 0 | 0 | — |
case-18 | fail→fail | 17,625 | 13,408 | -24% | 1 | 1 | 0% | 2,829 | 4,087 | +44% | 0 | 0 | — |
case-19 | fail→pass | 11,111 | 4,931 | -56% | 1 | 1 | 0% | 2,057 | 2,604 | +27% | 0 | 0 | — |
case-20 | fail→fail | 11,761 | 15,467 | +32% | 1 | 1 | 0% | 2,445 | 4,894 | +100% | 0 | 0 | — |
case-21 | fail→fail | 16,043 | 17,520 | +9% | 1 | 1 | 0% | 3,517 | 5,377 | +53% | 0 | 0 | — |
case-22 | fail→fail | 8,889 | 9,391 | +6% | 1 | 1 | 0% | 1,984 | 3,548 | +79% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +27 percentage points is the difference between those two pass rates over the 22 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.