SuperAPI AI Directory

ascii-progress-and-spinner

Design & creation

View repository

Updated 10-15 21:47

About this skill

When to use this skill

CRITICAL TRIGGER RULE

  • Use this skill ONLY when the user explicitly mentions the exact skill name: ascii-progress-and-spinner.

Trigger phrases include:

  • "ascii-progress-and-spinner"
  • "use ascii-progress-and-spinner"
  • "Generate an ASCII progress bar with ascii-progress-and-spinner"
  • "Use ascii-progress-and-spinner for spinner / loading"

Boundary

  • Do not integrate a specific UI framework; output styles + refresh rules + fallback protocol + examples.
  • Must cover:
    • determinate progress bars
    • indeterminate spinners
    • non-TTY / redirected-output fallback (log lines, no carriage-return updates)

How to use this skill

Inputs

  • mode (determinate | indeterminate)
  • width (default 40)
  • showPercent (default true)
  • showEta (optional)
  • multiTask (optional)
  • colorMode (none | ansi256, default none)

Outputs (required)

  • progressBarStyles (>= 3)
  • spinnerStyles (>= 2)
  • renderRules (TTY single-line refresh vs logLines)
  • fallbackRules (non-interactive / redirected output)

Recommended render rules

  • TTY (interactive): single-line refresh (overwrite previous line), avoid log spam
  • Non-TTY (logs): print log lines (no overwrite). Each line may include task name + percent.

Script

  • scripts/demo.py: local demo for progress bar + spinner shapes

Examples

  • examples/styles.md

Quality checklist

  1. Fixed width (percent field is fixed-width to avoid jitter)
  2. Log mode is grep-friendly (no overwrite)
  3. ASCII-only defaults are available (avoid ambiguous-width Unicode)

Keywords

English: ascii-progress-and-spinner, progress bar, spinner, loading, tty, non-interactive, log output, ascii Chinese: ascii-progress-and-spinner, progress bar, Spinner, Loading, terminal, TTY, log fallback, ASCII

Common Gotchas

  1. Version compatibility: Pay attention to compatibility between the framework version and dependency libraries; APIs may differ across versions
  2. Configuration file format: Configuration file format errors are the most common issue; it is recommended to use your editor's syntax checking
  3. Environment variables: Make sure all necessary environment variables are set correctly, and do not hardcode sensitive information
  4. Dependency conflicts: When multiple versions coexist, watch out for dependency conflicts and use a lock file to pin versions
  5. Performance pitfalls: Pay attention to performance optimization in large-data scenarios, and avoid common issues such as N+1 queries

Usage workflow

Step 1: Environment preparation

Make sure the necessary dependencies and tools are installed in the development environment.

Step 2: Configuration initialization

Perform basic configuration according to project requirements.

Step 3: Using core functionality

Implement the core functionality according to the sample code.

Step 4: Testing and verification

Run tests to ensure the functionality works properly.

Step 5: Deployment and release

After development is complete, proceed with deployment and monitoring.