Fluxwing enhancer

From jackspace/ClaudeSkillz · View interactive version

Fluxwing enhancer is an AI agent skill from the GitHub repository jackspace/ClaudeSkillz. Enhance uxscii components from sketch to production fidelity. Use when working with .uxm files marked as "fidelity: sketch" or when user wants to add detail and polish to components.

How to use this skill

Skill file

Fluxwing Enhancer

Progressively enhance uxscii components from sketch to production quality.

Data Location Rules

READ from:

WRITE to:

Fidelity Levels

sketch (Fast Scaffold Output)

Characteristics:

basic (First Enhancement)

Improvements over sketch:

detailed (Second Enhancement)

Improvements over basic:

production (Final Polish)

Improvements over detailed:

Your Task

Help users enhance components from current fidelity to target fidelity.

Workflow

Step 1: Inventory Components

Check what components exist and their current fidelity:

ls ./fluxwing/components/*.uxm

For each component, read fidelity level:

python3 -c "import json; print(json.load(open('./fluxwing/components/button.uxm'))['metadata'].get('fidelity', 'detailed'))"

List components by fidelity:

Step 2: Determine Target Fidelity

Ask user or use defaults:

User specifies:

Auto-select (if not specified):

Step 3: Spawn Enhancement Agents

If enhancing multiple components (3+):

If enhancing single component:

Enhancement Agent Prompt:

Task({
  subagent_type: "general-purpose",
  model: "sonnet", // Quality matters for enhancement
  description: "Enhance ${componentId} to ${targetFidelity}",
  prompt: `Enhance uxscii component from ${currentFidelity} to ${targetFidelity}.

Component: ${componentId}
Current fidelity: ${currentFidelity}
Target fidelity: ${targetFidelity}

Your task:
1. Read ./fluxwing/components/${componentId}.uxm
2. Read ./fluxwing/components/${componentId}.md (if exists)
3. Load enhancement patterns: {SKILL_ROOT}/docs/enhancement-patterns.md
4. Load state templates: {SKILL_ROOT}/../fluxwing-component-creator/templates/state-additions/

5. Enhance based on target fidelity:

   ${targetFidelity === 'basic' ? `
   For "basic" fidelity:
   - Improve metadata.description (1-2 sentences, specific)
   - Add specific tags (not just generic type)
   - Create/improve .md with clean ASCII art
   - Keep single default state
   - Update fidelity field to "basic"
   ` : ''}

   ${targetFidelity === 'detailed' ? `
   For "detailed" fidelity:
   - All "basic" enhancements (if not already done)
   - Add hover state (use {SKILL_ROOT}/../fluxwing-component-creator/templates/state-additions/hover.json)
   - Add focus state (use {SKILL_ROOT}/../fluxwing-component-creator/templates/state-additions/focus.json)
   - Polish ASCII art (smooth alignment, consistent spacing)
   - Add props.examples array (2-3 usage examples)
   - Update fidelity field to "detailed"
   ` : ''}

   ${targetFidelity === 'production' ? `
   For "production" fidelity:
   - All "detailed" enhancements (if not already done)
   - Add disabled state (if applicable for component type)
   - Add error state (if applicable for component type)
   - Complete accessibility metadata:
     - aria-label templates
     - keyboard shortcuts
     - screen reader descriptions
   - Add behavior.keyboardShortcuts (if interactive)
   - Publication-quality ASCII (pixel-perfect alignment)
   - Document edge cases in description
   - Update fidelity field to "production"
   ` : ''}

6. Save updated files (overwrite existing)
7. Verify JSON is valid
8. Return enhancement summary

Target time: ${targetTime[targetFidelity]} seconds

Return format:
"Enhanced ${componentId}: ${currentFidelity} → ${targetFidelity}
- Added X states
- Improved metadata
- Polished ASCII"
`
})
Step 4: Regenerate Screen (If Applicable)

If components belong to a screen, regenerate .rendered.md:

# Find which screen uses this component
grep -l "${componentId}" ./fluxwing/screens/*.uxm

If found, respawn composer to regenerate .rendered.md with enhanced components.

Step 5: Report Results
# Enhancement Complete ✓

## Components Enhanced

${enhancedComponents.map(c => `
### ${c.id}
- Before: ${c.oldFidelity}
- After: ${c.newFidelity}
- Time: ${c.time}s
- Changes:
  - ${c.changes.join('\n  - ')}
`).join('\n')}

## Total Time: ${totalTime}s

## Screens Updated
${updatedScreens.length > 0 ? updatedScreens.map(s => `- ${s}.rendered.md regenerated`).join('\n') : 'None'}

## Next Steps
1. Review enhanced components: \`ls ./fluxwing/components/\`
2. View updated screen: \`cat ./fluxwing/screens/${screenName}.rendered.md\`
3. Customize as needed

Example Usage

User: "Enhance all components in banking-chat to detailed"

Enhancer:

  1. Finds 6 sketch components
  2. Spawns 6 enhancement agents (parallel)
  3. Each agent: sketch → detailed (~90s)
  4. Regenerates banking-chat.rendered.md
  5. Total time: ~120 seconds

User: "Make submit-button production-ready"

Enhancer:

  1. Finds submit-button (detailed fidelity)
  2. Spawns 1 enhancement agent
  3. Agent: detailed → production (~180s)
  4. Updates screen if applicable
  5. Total time: ~180 seconds

Success Criteria

You are building a progressive enhancement system for maximum flexibility!

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.