cli-error-diagnostics

Community

Build robust CLI error handling.

AuthorRepairYourTech
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill provides patterns and code examples for creating command-line interfaces (CLIs) that offer clear, actionable error messages and diagnostic capabilities, making them user-friendly and easier to troubleshoot.

Core Features & Use Cases

  • Structured Error Messages: Define errors with clear messages, causes, and suggested fixes.
  • Actionable Suggestions: Implement "Did You Mean?" for typos and context-aware fixes.
  • Verbose/Debug Modes: Control the level of detail in output for troubleshooting.
  • Diagnostic Commands: Include commands like mycli doctor to check system health and dependencies.
  • Log Files & Crash Reports: Automate logging and generate detailed crash reports for debugging.
  • Error Codes: Define a catalog of machine-readable error codes.
  • Colored Output: Ensure errors are displayed clearly and gracefully degrade in non-TTY environments.
  • Use Case: When developing a new CLI tool, use these patterns to ensure that when an error occurs (e.g., a configuration file is missing), the user receives a helpful message like "Error: Configuration file not found. Fix: Run mycli init to create one."

Quick Start

Implement structured error messages in your CLI tool by defining an error interface and a formatting function.

Dependency Matrix

Required Modules

None required

Components

scriptsreferences

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: cli-error-diagnostics
Download link: https://github.com/RepairYourTech/cfsa-antigravity/archive/main.zip#cli-error-diagnostics

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.