Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Integrate ora spinners with consistent styling, promise handling, and status updates for CLI progress feedback.
.claude/skills/a5c-ai-ora-spinner-integration/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 11% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 20% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 29% | 0% |
| case-18 | ✗→✓ | ▲ Improved | 78% | 0% |
| case-20 | ✗→✓ | ▲ Improved | 40% | 0% |
Integrate ora spinners for consistent CLI progress feedback.
Invoke this skill when you need to:
| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | language | string | Yes | Target language (typescript, javascript) | | style | object | No | Spinner styling options | | spinners | array | No | Custom spinner definitions |
typescriptimport ora, { Ora, Options } from 'ora'; import chalk from 'chalk'; // Spinner configuration const defaultOptions: Options = { color: 'cyan', spinner: 'dots', prefixText: '', }; // Create spinner with consistent styling export function createSpinner(text: string, options?: Partial<Options>): Ora { return ora({ ...defaultOptions, ...options, text, }); } // Spinner with promise export async function withSpinner<T>( text: string, fn: () => Promise<T>, options?: { successText?: string | ((result: T) => string); failText?: string | ((error: Error) => string); } ): Promise<T> { const spinner = createSpinner(text); spinner.start(); try { const result = await fn(); const successText = typeof options?.successText === 'function' ? options.successText(result) : options?.successText || text; spinner.succeed(successText); return result; } catch (error) { const failText = typeof options?.failText === 'function' ? options.failText(error as Error) : options?.failText || `Failed: ${(error as Error).message}`; spinner.fail(failText); throw error; } } // Sequential spinners export async function withSequentialSpinners<T>( steps: Array<{ text: string; fn: () => Promise<any>; successText?: string; }> ): Promise<T[]> { const results: T[] = []; for (const step of steps) { const result = await withSpinner(step.text, step.fn, { successText: step.successText, }); results.push(result); } return results; } // Multi-line spinner status export class TaskSpinner { private spinner: Ora; private tasks: Map<string, 'pending' | 'running' | 'done' | 'failed'>; constructor(title: string) { this.spinner = createSpinner(title); this.tasks = new Map(); } addTask(id: string): void { this.tasks.set(id, 'pending'); this.updateDisplay(); } startTask(id: string): void { this.tasks.set(id, 'running'); this.updateDisplay(); } completeTask(id: string): void { this.tasks.set(id, 'done'); this.updateDisplay(); } failTask(id: string): void { this.tasks.set(id, 'failed'); this.updateDisplay(); } private updateDisplay(): void { const lines = Array.from(this.tasks.entries()).map(([id, status]) => { const icon = { pending: chalk.gray('○'), running: chalk.cyan('◐'), done: chalk.green('●'), failed: chalk.red('✗'), }[status]; return ` ${icon} ${id}`; }); this.spinner.text = '\n' + lines.join('\n'); } start(): void { this.spinner.start(); } stop(): void { const failed = Array.from(this.tasks.values()).some(s => s === 'failed'); if (failed) { this.spinner.fail('Tasks completed with errors'); } else { this.spinner.succeed('All tasks completed'); } } }
typescript// Simple spinner const spinner = createSpinner('Loading...'); spinner.start(); // ... do work spinner.succeed('Loaded!'); // Promise wrapper const data = await withSpinner( 'Fetching data...', () => fetchData(), { successText: (data) => `Loaded ${data.length} items` } ); // Sequential steps await withSequentialSpinners([ { text: 'Installing dependencies...', fn: () => installDeps() }, { text: 'Building project...', fn: () => build() }, { text: 'Running tests...', fn: () => test() }, ]); // Task tracking const tasks = new TaskSpinner('Processing files'); tasks.addTask('file1.ts'); tasks.addTask('file2.ts'); tasks.start(); tasks.startTask('file1.ts'); // ... process tasks.completeTask('file1.ts'); tasks.startTask('file2.ts'); tasks.completeTask('file2.ts'); tasks.stop();
json{ "dependencies": { "ora": "^7.0.0", "chalk": "^5.0.0" } }
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 16,445 | 8,108 | -51% | 1 | 1 | 0% | 2,772 | 3,071 | +11% | 0 | 0 | — |
case-02 | fail→fail | 15,662 | 14,994 | -4% | 1 | 1 | 0% | 2,729 | 4,518 | +66% | 0 | 0 | — |
case-03 | fail→pass | 15,924 | 15,902 | -0% | 1 | 1 | 0% | 3,504 | 4,192 | +20% | 0 | 0 | — |
case-04 | fail→fail | 9,709 | 12,087 | +24% | 1 | 1 | 0% | 2,086 | 4,042 | +94% | 0 | 0 | — |
case-05 | fail→fail | 15,909 | 14,105 | -11% | 1 | 1 | 0% | 3,449 | 4,359 | +26% | 0 | 0 | — |
case-06 | fail→fail | 19,745 | 17,269 | -13% | 1 | 1 | 0% | 4,242 | 5,300 | +25% | 0 | 0 | — |
case-07 | fail→fail | 12,923 | 12,404 | -4% | 1 | 1 | 0% | 2,711 | 3,517 | +30% | 0 | 0 | — |
case-08 | fail→fail | 11,771 | 9,896 | -16% | 1 | 1 | 0% | 1,959 | 3,114 | +59% | 0 | 0 | — |
case-09 | fail→fail | 12,184 | 9,478 | -22% | 1 | 1 | 0% | 2,058 | 3,098 | +51% | 0 | 0 | — |
case-10 | fail→fail | 14,557 | 6,603 | -55% | 1 | 1 | 0% | 2,320 | 2,522 | +9% | 0 | 0 | — |
case-11 | fail→fail | 13,274 | 11,896 | -10% | 1 | 1 | 0% | 2,943 | 4,158 | +41% | 0 | 0 | — |
case-12 | fail→fail | 10,191 | 6,595 | -35% | 1 | 1 | 0% | 2,055 | 2,662 | +30% | 0 | 0 | — |
case-13 | pass→pass | 14,165 | 6,837 | -52% | 1 | 1 | 0% | 2,607 | 2,497 | -4% | 0 | 0 | — |
case-14 | fail→fail | 11,319 | 7,737 | -32% | 1 | 1 | 0% | 2,168 | 2,600 | +20% | 0 | 0 | — |
case-15 | pass→pass | 11,571 | 9,575 | -17% | 1 | 1 | 0% | 2,339 | 3,449 | +47% | 0 | 0 | — |
case-16 | pass→pass | 8,098 | 4,315 | -47% | 1 | 1 | 0% | 1,576 | 2,027 | +29% | 0 | 0 | — |
case-17 | fail→pass | 13,753 | 12,000 | -13% | 1 | 1 | 0% | 2,476 | 3,194 | +29% | 0 | 0 | — |
case-18 | fail→pass | 6,159 | 2,978 | -52% | 1 | 1 | 0% | 1,067 | 1,896 | +78% | 0 | 0 | — |
case-19 | fail→fail | 9,380 | 2,689 | -71% | 1 | 1 | 0% | 1,758 | 1,796 | +2% | 0 | 0 | — |
case-20 | fail→pass | 8,313 | 4,992 | -40% | 1 | 1 | 0% | 1,699 | 2,379 | +40% | 0 | 0 | — |
case-21 | fail→fail | 14,276 | 10,231 | -28% | 1 | 1 | 0% | 2,030 | 2,929 | +44% | 0 | 0 | — |
case-22 | fail→fail | 15,736 | 13,421 | -15% | 1 | 1 | 0% | 3,091 | 4,016 | +30% | 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 +23 percentage points is the difference between those two pass rates over the 22 comparable cases. 1 case got worse with the skill loaded, and it is 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.