error-standardizer

Convert nonstandard shell and Python error handling to emit_error() with named exit codes.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/ribatshepo/cc-auto-orchestrate --skill error-standardizer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: error-standardizer
Source: https://github.com/ribatshepo/cc-auto-orchestrate/tree/main/claude-code/skills/error-standardizer
Command: npx skills add https://github.com/ribatshepo/cc-auto-orchestrate --skill error-standardizer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Inconsistent error handling patterns across a codebase lead to hard-to-trace failures and brittle integrations. The error-standardizer identifies nonstandard patterns and converts them to a uniform emit_error() flow using named exit codes.

Core Features & Use Cases

  • Detects and catalogues nonstandard error patterns in Shell and Python code, including direct echoes, raw exits, bare excepts, and inconsistent messaging.
  • Converts detected patterns to a structured, machine-parseable error emission with emit_error() and standard exit codes, backed by references for mapping codes.
  • Generates a comprehensive standardization report and a plan for updating affected files, with guidance for imports and context.
  • Useful in CI pipelines to enforce consistent error handling across new and existing code.

Quick Start

Run the error-standardizer against a repository to generate a standardization report and prepare conversions for review.

Frequently Asked Questions about error-standardizer

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

FAQPage Schema
How do I standardize error handling across Python and shell scripts?

Convert nonstandard patterns like direct echoes, raw exits, and bare except blocks into a uniform emit_error() flow with named exit codes. This generates a guided standardization plan and updated files for review.

What are nonstandard error handling patterns in a codebase?

Nonstandard patterns include direct echoes to stderr, raw exit calls, bare except blocks in Python, and inconsistent error messaging. These cause brittle integrations and hard-to-trace failures across shell and Python sources.

Can I enforce consistent error emission in a CI pipeline?

Yes, you can enforce consistent error emission in CI pipelines by running standardization against your repository. It validates emitter sources, maps patterns to exit code constants, and outputs a safety-checked report.

What's the best way to convert raw exit codes to named exit codes?

Map detected patterns to standard constants and replace them with emit_error() calls. The process validates error emitter sources and generates a safety-checked report with updated files for review.

Does error standardization work with both shell and Python sources?

Yes, error standardization works with both shell and Python sources. It detects bare excepts in Python alongside direct echoes and raw exits in shell, converting them to emit_error() with named exit codes.

What do I need before standardizing error handling in my codebase?

You need a repository with shell or Python sources and valid error emitter sources present. The standardizer validates emitter availability and maps patterns to exit code constants before generating updated files.