Fluxwing component expander

From jackspace/ClaudeSkillz · View interactive version

Fluxwing component expander is an AI agent skill from the GitHub repository jackspace/ClaudeSkillz. Add interaction states like hover, focus, disabled, active, error to existing uxscii components. Use when working with .uxm files, when user wants to expand, enhance, or add states to .uxm components.

How to use this skill

Skill file

Fluxwing Component Expander

Expand existing uxscii components by adding interaction states.

Data Location Rules

READ from:

WRITE to:

Your Task

Expand an existing uxscii component by adding interaction states.

Workflow

1. Locate Component

Ask for the component name if not provided:

2. Determine States to Add

Default behavior (no instructions): Add ALL standard states for component type

Smart defaults by type:

User can override: "Only add hover and focus" or "Add error state only"

3. Read Existing Component Files

Read both files:

Extract:

4. Generate New States

For each new state to add:

A. Add state definition to .uxm file

Insert into the behavior.states array. Each state needs:

{
  "name": "hover",
  "properties": {
    "border": "heavy",
    "background": "primary-dark",
    "textColor": "default"
  },
  "triggers": ["mouseenter"]
}

State property patterns by state name:

B. Generate ASCII for new state in .md file

Use appropriate box-drawing characters for each state:

Template for new state section in .md file:

## {State Name} State

\`\`\`
{ASCII art using appropriate border style}
\`\`\`

5. Update Files

Write updated files:

Preserve:

Update:

Important: When updating the .md file, insert new state sections AFTER existing state sections but BEFORE the Variables, Accessibility, and Usage sections.

5a. Validate Expanded Component

After updating the files, validate the expanded component to ensure quality:

uv run {SKILL_ROOT}/../uxscii-component-creator/scripts/quick_validate.py \\
  ./fluxwing/components/{component-name}.uxm \\
  {SKILL_ROOT}/../uxscii-component-creator/schemas/uxm-component.schema.json

Validation checks:

If validation fails:

  1. Read the error messages
  2. Fix the issues in the .uxm or .md files
  3. Re-validate before confirming to user

Performance: ~100ms (very fast!)

6. Confirm Expansion

Show summary:

✓ Expanded: ./fluxwing/components/{component-name}
✓ Added states: hover, active, disabled
✓ Total states: 4 (default, hover, active, disabled)

Preview of hover state:
┏━━━━━━━━━━━━━━━━━━━━┓
┃   {{text}}         ┃
┗━━━━━━━━━━━━━━━━━━━━┛

Resources Available

Example Interaction

User: Expand submit-button with hover state

Skill: I found `submit-button` in ./fluxwing/components/

Current states: default

I'll add the hover state to make the button interactive.

[Reads submit-button.uxm and submit-button.md]
[Generates hover state]
[Updates both files]

✓ Expanded: ./fluxwing/components/submit-button
✓ Added states: hover
✓ Total states: 2 (default, hover)

Preview of hover state:
┏━━━━━━━━━━━━━━━━━━━━┓
┃   Submit Form      ┃
┗━━━━━━━━━━━━━━━━━━━━┛

Next steps:
- Add more states (active, disabled)
- Use this button in a screen
- View all components

Example with Custom States

User: Add focus and error states to email-input

Skill: I found `email-input` in ./fluxwing/components/

Current states: default

I'll add the requested states: focus, error

[Generates only focus and error states]

✓ Expanded: ./fluxwing/components/email-input
✓ Added states: focus, error
✓ Total states: 3 (default, focus, error)

Note: Standard input states also include 'disabled'.
Let me know if you want to add it!

Quality Standards

Ensure expanded components include:

Important Notes

Error Handling

If component not found:

✗ Component '{component-name}' not found.

Searched in:
- ./fluxwing/components/
- ./fluxwing/library/

Available components:
[List first 10 components found]

Please check the component name and try again.

If state already exists:

⚠ State 'hover' already exists in {component-name}.
Skipping duplicate state.

Current states: default, hover
Adding: active, disabled

If file write fails:

✗ Failed to update {component-name}.

Error: [specific error message]

The component files remain unchanged.
Please check file permissions and try again.

You're helping users create fully interactive uxscii components!

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.