colored-output
About
This skill provides a centralized ANSI color formatter for terminal output across all Claude skills and agents, enforcing consistent UX. It eliminates duplicate ANSI code definitions by serving as a single source of truth for colored messaging. Developers should use it whenever their skill needs formatted terminal output to maintain DRY principles and visual consistency.
Quick Install
Claude Code
Recommended/plugin add https://github.com/majiayu000/claude-skill-registrygit clone https://github.com/majiayu000/claude-skill-registry.git ~/.claude/skills/colored-outputCopy and paste this command in Claude Code to install this skill
Documentation
Colored Output Formatter Skill
Centralized, reusable colored output formatting for ALL skills, agents, and commands!
π― Purpose
This skill provides a single source of truth for colored terminal output. Instead of duplicating ANSI codes across every skill/agent, they all call this formatter.
Benefits:
- β DRY Principle - Define colors once, use everywhere
- β Consistent UX - All skills/agents look the same
- β Easy Updates - Change colors in one place
- β Zero Duplication - No repeated ANSI codes
π§ BASH COMMAND ATTRIBUTION PATTERN
CRITICAL: Before executing EACH bash command, MUST output:
π§ [colored-output] Running: <command>
Examples:
π§ [colored-output] Running: bash .claude/skills/colored-output/color.sh skill-header "skill-name" "Starting..."
π§ [colored-output] Running: bash .claude/skills/colored-output/color.sh success "" "Complete!"
π§ [colored-output] Running: bash .claude/skills/colored-output/color.sh error "" "Failed!"
Why: This pattern helps users identify which skill is executing which command, improving transparency and debugging.
π― USAGE GUIDELINES (CRITICAL)
β οΈ IMPORTANT: Use colored output SPARINGLY to prevent screen flickering and visual clutter!
β DO Use Colored Output For:
-
Initial Header (once at start of operation)
bash .claude/skills/colored-output/color.sh skill-header "skill-name" "Starting operation..." -
Final Results (success, error, or completion)
bash .claude/skills/colored-output/color.sh success "" "Operation complete!" -
Critical Alerts (warnings, errors)
bash .claude/skills/colored-output/color.sh warning "" "Configuration issue detected" bash .claude/skills/colored-output/color.sh error "" "Operation failed" -
Summary Sections (key metrics, final status)
bash .claude/skills/colored-output/color.sh info "" "Processed 10 files"
β DON'T Use Colored Output For:
-
Progress Updates - Use regular text instead
- β Bad:
bash .claude/skills/colored-output/color.sh progress "" "Step 1 of 5..." - β Good: Regular Claude text: "Step 1 of 5: Analyzing files..."
- β Bad:
-
Intermediate Info Messages - Use regular text
- β Bad:
bash .claude/skills/colored-output/color.sh info "" "Found 3 files" - β Good: Regular Claude text: "Found 3 files to process..."
- β Bad:
-
Verbose Logging - Use regular text
- β Bad: Multiple colored calls for each step
- β Good: Regular text for all intermediate steps
π Recommended Pattern
Minimal Colored Output (2-3 calls per operation):
# START: Colored header (1 call)
π§ [skill-name] Starting operation...
# MIDDLE: Regular Claude text (0 colored calls)
Analyzing 10 files...
Processing configurations...
Updating database...
Generating reports...
# END: Colored result (1-2 calls)
β
Operation complete!
π Summary: 10 files processed, 0 errors
π« Anti-Pattern (Causes Flickering)
Excessive Colored Output (10+ calls per operation):
π§ [skill-name] Starting operation... β Colored
βΆ Step 1: Analyzing files... β Colored (unnecessary)
βΉοΈ Found 10 files β Colored (unnecessary)
βΆ Step 2: Processing... β Colored (unnecessary)
βΉοΈ Processing file 1... β Colored (unnecessary)
βΉοΈ Processing file 2... β Colored (unnecessary)
... (8 more colored calls) ...
β
Operation complete! β Colored
Problem: Each bash call creates a new task in Claude CLI, causing screen flickering and visual noise.
π Target Metrics
- Maximum: 3-4 colored bash calls per operation
- Minimum: 2 colored bash calls (header + result)
- Ideal: Use colored output only for boundaries (start/end) and alerts
π¨ VISUAL OUTPUT FORMATTING
CRITICAL: This skill itself follows the minimal colored output pattern!
Self-Reference Pattern
When this skill responds, use the MINIMAL pattern:
# START: Header only
bash .claude/skills/colored-output/color.sh skill-header "colored-output" "Processing request..."
# MIDDLE: Regular text (no colored calls)
Analyzing color requirements...
Available message types: skill-header, agent-header, success, error, warning, info, progress...
# END: Result only
bash .claude/skills/colored-output/color.sh success "" "Formatting complete!"
DO NOT use excessive colored calls when demonstrating. Follow the 2-3 call guideline!
π¨ Color Scheme
Component Types
- Skills: π§ Bold Blue
\033[1;34m - Agents: π€ Bold Purple
\033[1;35m - Commands: β‘ Bold Green
\033[1;32m
Status Types
- Success: β
Bold Green
\033[1;32m - Error: β Bold Red
\033[1;31m - Warning: β οΈ Bold Yellow
\033[1;33m - Info: βΉοΈ Bold Cyan
\033[1;36m - Progress: βΆ Blue
\033[0;34m
π Usage
Basic Syntax
bash .claude/skills/colored-output/color.sh [type] [component-name] [message]
Examples
Skill Headers
bash .claude/skills/colored-output/color.sh skill-header "time-helper" "Processing time request..."
# Output: π§ [time-helper] Processing time request... (in blue)
Agent Headers
bash .claude/skills/colored-output/color.sh agent-header "eslint-fixer" "Analyzing code..."
# Output: π€ [eslint-fixer] Analyzing code... (in purple)
Command Headers
bash .claude/skills/colored-output/color.sh command-header "/commit" "Creating commit..."
# Output: β‘ [/commit] Creating commit... (in green)
Status Messages
bash .claude/skills/colored-output/color.sh success "" "File updated successfully"
# Output: β
File updated successfully (in green)
bash .claude/skills/colored-output/color.sh error "" "Failed to parse file"
# Output: β Failed to parse file (in red)
bash .claude/skills/colored-output/color.sh warning "" "This may take a while"
# Output: β οΈ This may take a while (in yellow)
bash .claude/skills/colored-output/color.sh info "" "Processing 5 files"
# Output: βΉοΈ Processing 5 files (in cyan)
bash .claude/skills/colored-output/color.sh progress "" "Step 1 of 3"
# Output: βΆ Step 1 of 3 (in blue)
π§ Integration Guide
How Skills Should Use This
OLD WAY (Don't do this):
Claude outputs: "Processing..."
(No colors, just plain text)
NEW WAY (Do this):
When skill starts:
1. Output colored header using this formatter
2. Output progress messages using this formatter
3. Output final status using this formatter
Example: time-helper Integration
# Start of skill
bash .claude/skills/colored-output/color.sh skill-header "time-helper" "Getting current time for Tokyo..."
# Progress
bash .claude/skills/colored-output/color.sh progress "" "Querying timezone database..."
# Result
bash .claude/skills/colored-output/color.sh info "" "Current time: 2025-10-22 14:30:00 JST"
# Success
bash .claude/skills/colored-output/color.sh success "" "Time retrieved successfully"
Output:
π§ [time-helper] Getting current time for Tokyo...
βΆ Querying timezone database...
βΉοΈ Current time: 2025-10-22 14:30:00 JST
β
Time retrieved successfully
π― Standard Workflow Pattern
Every skill/agent should follow this pattern:
1. Header (Start)
bash .claude/skills/colored-output/color.sh skill-header "SKILL-NAME" "Starting task..."
2. Progress (During)
bash .claude/skills/colored-output/color.sh progress "" "Processing step 1..."
bash .claude/skills/colored-output/color.sh progress "" "Processing step 2..."
3. Info (Results)
bash .claude/skills/colored-output/color.sh info "" "Found 10 items"
4. Status (End)
bash .claude/skills/colored-output/color.sh success "" "Task completed successfully"
# OR
bash .claude/skills/colored-output/color.sh error "" "Task failed: reason"
π§ͺ Testing
Test all color types:
cd .claude/skills/colored-output
# Test skill header
bash color.sh skill-header "test-skill" "This is a skill message"
# Test agent header
bash color.sh agent-header "test-agent" "This is an agent message"
# Test command header
bash color.sh command-header "/test" "This is a command message"
# Test statuses
bash color.sh success "" "Success message"
bash color.sh error "" "Error message"
bash color.sh warning "" "Warning message"
bash color.sh info "" "Info message"
bash color.sh progress "" "Progress message"
π Available Types
| Type | Usage | Example |
|---|---|---|
skill-header | Skill starting | π§ [skill-name] Message |
agent-header | Agent starting | π€ [agent-name] Message |
command-header | Command starting | β‘ [/command] Message |
success | Operation succeeded | β
Message |
error | Operation failed | β Message |
warning | Caution needed | β οΈ Message |
info | Informational | βΉοΈ Message |
progress | Step indicator | βΆ Message |
π How Other Skills Call This
In skill.md Instructions
Add this section to every skill/agent:
## π¨ Colored Output (Required)
**CRITICAL: Use colored-output skill for ALL user-facing messages!**
### Start of Skill
\`\`\`bash
bash .claude/skills/colored-output/color.sh skill-header "SKILL-NAME" "Starting..."
\`\`\`
### Progress Updates
\`\`\`bash
bash .claude/skills/colored-output/color.sh progress "" "Processing..."
\`\`\`
### Final Status
\`\`\`bash
bash .claude/skills/colored-output/color.sh success "" "Complete!"
# OR
bash .claude/skills/colored-output/color.sh error "" "Failed!"
\`\`\`
π¨ Customization
To change colors globally, edit color.sh:
# Change skill color from blue to cyan
SKILL_COLOR='\033[1;36m' # Was: \033[1;34m
# Change success icon
SUCCESS_ICON='π' # Was: β
All skills/agents immediately inherit the changes!
π¦ Files
.claude/skills/colored-output/
βββ skill.md # This documentation
βββ color.sh # Bash formatter script
π Rollout Strategy
Phase 1: Create Formatter (Done)
- β Created color.sh script
- β Created skill.md documentation
Phase 2: Test with One Skill
- π§ͺ Test with time-helper skill
- β Verify colors render properly
- β Confirm user experience improvement
Phase 3: Apply to All Skills
- Update all .claude/skills/* to use formatter
- Update all framework skills to use formatter
- Update all framework agents to use formatter
Phase 4: Maintain
- All new skills MUST use colored-output
- Updates to colors happen in ONE place
π‘ Best Practices
DO:
- β
Use
skill-headerat the start of every skill - β
Use
progressfor multi-step operations - β
Use
success/errorfor final status - β
Use
infofor important details
DON'T:
- β Duplicate ANSI codes in individual skills
- β Mix colored and uncolored output
- β Use too many colors (keep it clean)
π Benefits Summary
Before colored-output skill:
- Every skill had duplicate ANSI codes
- Inconsistent colors across skills
- Hard to maintain/update
- Lots of repeated code
After colored-output skill:
- β Single source of truth
- β Consistent UX everywhere
- β Easy to update colors globally
- β Clean, DRY code
Version History
v1.0.0 (2025-10-22)
- Initial release
- Support for skills, agents, commands
- 8 message types (headers + statuses)
- Bash script implementation
- Cross-platform support
GitHub Repository
Related Skills
moai-project-batch-questions
MetaThis skill provides standardized AskUserQuestion templates for batching multiple questions together, reducing user interactions by 60%. It offers reusable question patterns for common optimization scenarios while maintaining clarity. Developers should use it when they need to gather multiple related inputs efficiently in a single interaction.
moai-project-batch-questions
MetaThis skill provides standardized AskUserQuestion templates for batch optimization, reducing user interactions by up to 60%. It offers reusable question groups for common patterns, allowing developers to maintain clarity while minimizing repetitive prompts. Use it when you need to collect multiple related inputs from users in a single, efficient interaction.
content-collections
MetaThis skill provides a production-tested setup for Content Collections, a TypeScript-first tool that transforms Markdown/MDX files into type-safe data collections with Zod validation. Use it when building blogs, documentation sites, or content-heavy Vite + React applications to ensure type safety and automatic content validation. It covers everything from Vite plugin configuration and MDX compilation to deployment optimization and schema validation.
creating-opencode-plugins
MetaThis skill provides the structure and API specifications for creating OpenCode plugins that hook into 25+ event types like commands, files, and LSP operations. It offers implementation patterns for JavaScript/TypeScript modules that intercept and extend the AI assistant's lifecycle. Use it when you need to build event-driven plugins for monitoring, custom handling, or extending OpenCode's capabilities.
