gaming-ui-state-management
A pattern library for creating interactive, game-inspired UI bars such as health, mana, and XP.
Install
mkdir -p .claude/skills/gaming-ui-state-management && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/2217" && unzip -o skill.zip -d .claude/skills/gaming-ui-state-management && rm skill.zipInstalls to .claude/skills/gaming-ui-state-management
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Patterns for game-like interfaces - health bars, XP bars, mana bars. Apply when building RPG/retro gaming UI components with state-driven visuals.Key capabilities
- →Create health, XP, and mana bars with retro variants
- →Display animated level-up notifications
- →Apply conditional animations based on game state
- →Show compact enemy health displays
- →Use color coding for different game metrics
How it works
The skill builds on a base Progress component, applying game-specific variants, color coding, retro text, and state-driven animations to create game-like interfaces.
Inputs & outputs
When to use gaming-ui-state-management
- →Building health and mana bars
- →Creating animated level-up notifications
- →Developing RPG-style user interfaces
About this skill
Gaming UI State Management
Create game-like interfaces with state-driven visuals for health, XP, mana, and other game metrics.
Progress Bar Pattern
Build on the Progress component with game-specific variants:
import { Progress } from "@/components/ui/8bit/progress";
function HealthBar({ value = 100, ...props }: BitProgressProps) {
return (
<Progress
{...props}
value={value}
variant="retro"
progressBg="bg-red-500"
/>
);
}
function ManaBar({ value = 100, ...props }: BitProgressProps) {
return (
<Progress
{...props}
value={value}
variant="retro"
progressBg="bg-blue-500"
/>
);
}
function XpBar({ value = 0, ...props }: BitProgressProps) {
return (
<Progress
{...props}
value={value}
variant="retro"
progressBg="bg-yellow-500"
/>
);
}
Level Up Notification
Show animated messages when thresholds are reached:
function XpBar({
value,
levelUpMessage = "LEVEL UP!",
...props
}: XpBarProps) {
const isLevelUp = value === 100;
return (
<div className="relative">
<Progress
{...props}
value={value}
progressBg="bg-yellow-500"
className={cn(isLevelUp && "animate-pulse")}
/>
{isLevelUp && (
<div
className={cn(
"retro",
"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",
"text-[0.625rem] text-black",
"pointer-events-none whitespace-nowrap z-10",
"drop-shadow-[1px_1px_0_#fff] [text-shadow:1px_1px_0_#fff,-1px_-1px_0_#fff,1px_-1px_0_#fff,-1px_1px_0_#fff]",
"animate-[blink_0.5s_step-end_infinite]"
)}
>
{levelUpMessage}
</div>
)}
</div>
);
}
Conditional Animations
Use conditional classes for game state feedback:
<div
className={cn(
"transition-colors duration-300",
health <= 25 ? "animate-pulse bg-red-500/20" : "bg-green-500",
health > 25 && health <= 50 && "bg-yellow-500/20"
)}
/>
Enemy Health Display
Compact display for combat scenarios:
function EnemyHealth({ health, maxHealth }: EnemyHealthProps) {
const percentage = (health / maxHealth) * 100;
return (
<div className="retro text-xs">
<div className="flex justify-between mb-1">
<span>ENEMY</span>
<span>{health}/{maxHealth}</span>
</div>
<HealthBar value={percentage} className="h-2" />
</div>
);
}
Key Principles
- Base component - Extend Progress, don't reimplement
- Color coding - Red (health), Blue (mana), Yellow (XP), Green (stamina)
- Retro text - Use
.retroclass for pixel font numbers - State animations - Use
animate-pulse,animate-blinkfor feedback - Text shadows - White text-shadow for legibility on colored backgrounds
- Compact sizing - Smaller text (text-xs, text-[0.625rem]) for game UIs
Reference Components
components/ui/8bit/health-bar.tsx- Health bar implementationcomponents/ui/8bit/xp-bar.tsx- XP bar with level up notificationcomponents/ui/8bit/mana-bar.tsx- Mana bar implementation
How it compares
This skill provides specific patterns and components for retro gaming UI elements, unlike generic UI libraries.
Compared to similar skills
gaming-ui-state-management side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| gaming-ui-state-management (this skill) | 2 | 7mo | No flags | Beginner |
| screenshot-to-code | 204 | 2mo | No flags | Beginner |
| web-artifacts-builder | 49 | 3mo | Review | Intermediate |
| frontend-ui-dark-ts | 4 | 3mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by TheOrcDev
View all by TheOrcDev →You might also like
screenshot-to-code
OneWave-AI
Convert UI screenshots into working HTML/CSS/React/Vue code. Detects design patterns, components, and generates responsive layouts. Use this when users provide screenshots of websites, apps, or UI designs and want code implementation.
web-artifacts-builder
anthropics
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
frontend-ui-dark-ts
microsoft
Build dark-themed React applications using Tailwind CSS with custom theming, glassmorphism effects, and Framer Motion animations. Use when creating dashboards, admin panels, or data-rich interfaces with a refined dark aesthetic.
designer-skills
llama-farm
Designer subsystem patterns for LlamaFarm. Covers React 18, TanStack Query, TailwindCSS, and Radix UI.
heroui-react
heroui-inc
HeroUI v3 React component library (Tailwind CSS v4 + React Aria). Use when working with HeroUI components, installing HeroUI, customizing HeroUI themes, or accessing HeroUI component documentation. Keywords: HeroUI, Hero UI, heroui, @heroui/react, @heroui/styles.
retro-css-architecture
TheOrcDev
Organize 8-bit CSS with custom properties, pixel fonts, and responsive pixel art. Apply when creating or modifying retro-styled components and their CSS.