Semantic theme key rendering

From ychampion/cskill-agents · View interactive version

Semantic theme key rendering is an AI agent skill from the GitHub repository ychampion/cskill-agents. Resolve semantic theme keys into terminal-safe colors with contextual overrides before rendering text.

How to use this skill

Skill file

SKILL: Semantic Theme-Key Rendering

Domain: terminal-ui

Trigger: Use when terminal components accept semantic color names rather than hardcoded ANSI or RGB values.

Source Pattern: Distilled from reviewed themed terminal text and palette resolution patterns.

Core Method

Treat incoming color props as either literal color syntax or semantic theme keys that must be resolved through the active palette. Let contextual overrides such as hover, inactive, dim, inverse, or background state win before the final style reaches the renderer. This centralizes color logic in one path so components stay portable across palettes and state transitions.

Key Rules

Example Application

If a status label is configured as warning and becomes dim while idle, resolve warning through the current theme, then apply the idle override before rendering the final text.

Anti-Patterns (What NOT to do)

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.