cli-ux-patterns

Apply UX patterns for error messages, colors, progress indicators, and output formatting in Rust CLIs.

8|2|Updated Oct 17, 2025
One-click install
npx skills add https://github.com/geoffjay/claude-plugins --skill cli-ux-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli-ux-patterns
Source: https://github.com/geoffjay/claude-plugins/tree/main/plugins/rust-cli-developer/skills/cli-ux-patterns
Command: npx skills add https://github.com/geoffjay/claude-plugins --skill cli-ux-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill covers UX patterns for error messages, color usage, progress indicators, and interactive prompts to improve CLI usability.

Core Features & Use Cases

  • Error Message Patterns: 3-part approach; actionable messages.
  • Color Usage Patterns: Semantic colors and NO_COLOR handling.
  • Progress Indication: Progress bars and spinners for long tasks.
  • Interactive Prompts: When to prompt vs fail; smart defaults.
  • Output Formatting: Human-readable vs machine-readable outputs.

Quick Start

Use the cli-ux-patterns skill to improve a CLI's error messages, add colorized status outputs, and implement a progress bar for a long task.

Frequently Asked Questions about cli-ux-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write error messages that help users understand and fix CLI problems?

Error messages should follow a 3-part pattern: clearly state what went wrong, explain why it happened, and guide users on how to fix it. This approach makes errors actionable rather than cryptic, reducing user frustration and support overhead.

How do I use colors effectively in CLI output without breaking accessibility?

Use semantic colors that map status to meaning—green for success, red for error, yellow for warnings. Always respect the NO_COLOR environment variable so users who need plain output or use screen readers aren't forced into colored text.

What's the best way to show progress for long-running CLI tasks?

Progress bars and spinners signal to users that work is happening. Use spinners for indeterminate tasks and progress bars when you know the total steps. Libraries like indicatif handle formatting and performance so you don't block output.

When should I prompt users interactively vs. fail or use defaults in a CLI?

Prompt only when the decision is critical and the user is present; otherwise fail loudly with actionable guidance or apply smart defaults. Interactive prompts should be safe—validate input and offer sensible defaults to reduce user burden.

How do I output data from a CLI so both humans and machines can parse it?

Provide dual output modes: human-readable text for direct terminal use and structured formats like JSON for programmatic consumption. This lets scripts reliably extract data while keeping the CLI approachable for manual use.

Does CLI UX apply to Rust tools and other languages?

Yes. Error messages, color handling, progress indicators, and output formatting patterns work across any CLI—Rust, Python, Go, or others. The principles are platform-agnostic; implementation uses language-specific libraries like miette or owo-colors.