Fluxwing Component Viewer
Scannednpx machina-cli add skill trabian/fluxwing-skills/fluxwing-component-viewer --openclawFluxwing Component Viewer
View detailed information about a specific uxscii component from any source.
Data Location Rules
READ from (bundled templates - reference only):
{SKILL_ROOT}/../uxscii-component-creator/templates/- 11 component templates{SKILL_ROOT}/../uxscii-screen-scaffolder/templates/- 2 screen examples (if available)
READ from (project workspace):
./fluxwing/components/- Your created components./fluxwing/library/- Customized template copies./fluxwing/screens/- Your created screens
NEVER write - this is a read-only viewer!
Your Task
Display comprehensive details about a single uxscii component, including metadata, ASCII template preview, and context-appropriate actions.
Component Lookup Process
1. Parse Component Name
- Extract component name from user request
- If no name provided: Ask "Which component would you like to view?"
- Normalize name to lowercase with hyphens
2. Search Priority Order (Stop at First Match)
Search these locations in order and stop at the first match:
-
Project Components:
./fluxwing/components/[name].uxm- User/agent-created custom components
- Fully editable
- Tag as: "Your Component"
-
Project Library:
./fluxwing/library/[name].uxm- Customized copies of bundled templates
- Fully editable
- Tag as: "Your Library"
-
Bundled Templates:
{SKILL_ROOT}/../uxscii-component-creator/templates/[name].uxm- Read-only reference templates
- Must be copied to edit
- Tag as: "Bundled Template"
Important: Stop searching after first match. If found in bundled templates, check if it also exists in user's project and add a note: "π‘ You also have a customized version in ./fluxwing/library/"
3. Read Component Files
For the matched component, read both files:
[name].uxm- JSON metadata[name].md- ASCII template
Display Format
Concise View (Default)
Present component information in a clean, scannable format:
π PRIMARY-BUTTON
βββββββββββββββββββββββββββββββββββββββββββββββββββββ
π¦ Source: Bundled Template
π Location: Component Creator Templates
β±οΈ Modified: 2024-10-11 10:30:00
π Version: 1.0.0
Description:
Standard clickable button with hover, focus, and disabled states
Component Details:
β’ Type: button
β’ Props: text (string), variant (string), disabled (boolean)
β’ States: default, hover, focus, disabled
β’ Accessibility: β Role (button), β Focusable, β Keyboard (Space, Enter)
ASCII Template Preview (first 20 lines):
Default State:
ββββββββββββ
β {{text}} β
ββββββββββββ
Hover State:
βββββββββββββ
ββ {{text}} ββ
ββββββββββββ
Disabled State:
β β β β β ββ
β {{text}} β
β β β β β ββ
[... 1 more state]
Template has 4 states total. View full template?
βββββββββββββββββββββββββββββββββββββββββββββββββββββ
Format Guidelines
Header Section:
- Component name in CAPS
- Emoji indicators:
- π¦ = Bundled Template
- βοΈ = Your Library
- π¨ = Your Component
- Full file path for clarity
- Last modified timestamp (if available)
- Version from metadata
Description:
- Use the
metadata.descriptionfield from .uxm file - Keep it concise (1-2 lines)
Component Details:
- Type: Direct from .uxm
typefield - Props: List prop names with types in parentheses
- Format:
propName (type) - Example:
text (string), disabled (boolean)
- Format:
- States: Comma-separated list of state names
- Accessibility: Show checkmarks for present features
- Role, Focusable, Keyboard shortcuts, ARIA labels
ASCII Template Preview:
- Show first 20 lines by default
- If template has multiple states, show state labels
- If template exceeds 20 lines, add:
[... N more states/lines] - Preserve exact spacing and box-drawing characters
- Show variables as
{{variableName}}
Truncation Logic
If .md template exceeds 20 lines:
- Count total states/sections in template
- Show first 2-3 states completely
- Add summary line:
[... N more states] - Offer: "View full template?" as interactive option
Interactive Options
After displaying the component, offer context-appropriate actions:
For Bundled Templates (read-only)
What would you like to do?
1οΈβ£ Copy to project library (makes it editable)
2οΈβ£ View full template file (all states)
3οΈβ£ View full metadata (complete .uxm)
4οΈβ£ Browse all components
Action Details:
- Copy: Copy both .uxm and .md to
./fluxwing/library/ - View full template: Display complete .md file (no truncation)
- View full metadata: Display complete .uxm JSON
- Browse: Return to library browser
For Project Files (./fluxwing/library/ or ./fluxwing/components/)
What would you like to do?
1οΈβ£ Edit component (modify .uxm and .md)
2οΈβ£ View full template file (all states)
3οΈβ£ View full metadata (complete .uxm)
4οΈβ£ Delete component (manual: remove files from filesystem)
5οΈβ£ Browse all components
Action Details:
- Edit: Open both .uxm and .md for editing
- Delete: Don't automatically delete - instruct user:
To delete this component, remove these files from your filesystem: β’ ./fluxwing/components/[name].uxm β’ ./fluxwing/components/[name].md
Error Handling
No Component Name Provided
Which component would you like to view?
Example:
"Show me primary-button"
"View details for user-card"
View all available components: Ask me to "show me all components"
Component Not Found
β Component '[name]' not found.
Searched in:
- ./fluxwing/components/
- ./fluxwing/library/
- Bundled templates
Available components:
[List first 10 components found]
Did you mean one of these?
- primary-button
- submit-button
- user-card
Fuzzy search: If component name is close to an existing component, suggest it:
β Component 'primry-button' not found.
Did you mean 'primary-button'?
File Read Errors
β Found component but couldn't read files.
Location: ./fluxwing/components/[name].uxm
Error: [specific error message]
Please check file permissions and try again.
Example Interactions
Example 1: View Bundled Template
User: Show me the primary-button
Skill: π PRIMARY-BUTTON
βββββββββββββββββββββββββββββββββββββββββββββββββββββ
π¦ Source: Bundled Template
π Location: Component Creator Templates
Description:
Standard clickable button with hover, focus, and disabled states
Component Details:
β’ Type: button
β’ Props: text (string), variant (string), disabled (boolean)
β’ States: default, hover, focus, disabled
β’ Accessibility: β Full support
[ASCII preview shown...]
What would you like to do?
1οΈβ£ Copy to project library
2οΈβ£ View full template
3οΈβ£ View metadata
4οΈβ£ Browse all components
Example 2: View User Component
User: What's in my submit-button component?
Skill: π SUBMIT-BUTTON
βββββββββββββββββββββββββββββββββββββββββββββββββββββ
π¨ Source: Your Component
π Location: ./fluxwing/components/submit-button.uxm
β±οΈ Modified: 2024-10-15 14:23:00
Description:
Custom submit button for forms
Component Details:
β’ Type: button
β’ Props: text (string)
β’ States: default
β’ Accessibility: β Basic support
[ASCII preview shown...]
π‘ Tip: Add more states with "expand submit-button with hover and disabled"
Resources
- Core Concepts: See
{SKILL_ROOT}/docs/02-core-concepts.mdfor component fundamentals
You're helping users understand their uxscii components in detail!
Source
git clone https://github.com/trabian/fluxwing-skills/blob/main/skills/fluxwing-component-viewer/SKILL.mdView on GitHub Overview
Fluxwing Component Viewer lets you inspect a single uxscii component by showing its metadata, states, props, and an ASCII template preview. Itβs a read-only tool designed for .uxm work, helping you understand a componentβs structure without editing it. It searches project components, your library, and bundled templates, stopping at the first match.
How This Skill Works
When invoked, the tool normalizes the component name to lowercase-hyphen form, then searches in this order: project components, library, then bundled templates. Once a match is found, it reads the [name].uxm JSON metadata and the [name].md ASCII template, and renders a concise, scannable view with a header, description, type, props, states, accessibility notes, and an ASCII preview of the component.
When to Use It
- You need metadata and an ASCII preview for a specific .uxm component.
- Youβre deciding between a user-created component and a bundled template.
- You want to document or audit a componentβs props, states, and accessibility features.
- Youβre debugging how a component renders across default, hover, and disabled states via ASCII preview.
- A collaborator requests quick details for a particular .uxm component.
Quick Start
- Step 1: Request the component name to view
- Step 2: The tool searches ./fluxwing/components, then ./fluxwing/library, then bundled templates
- Step 3: Read metadata and review the ASCII Template Preview
Best Practices
- Always normalize the component name to lowercase with hyphens before searching.
- Understand the search priority: first project components, then library, then bundled templates.
- Treat this tool as read-only; no edits are performed on files.
- Use the ASCII template preview to validate layout and state changes quickly.
- Cross-check metadata fields (type, props, states) against the .uxm for accuracy.
Example Use Cases
- Inspect a newly created component in ./fluxwing/components for quick documentation.
- Compare a custom variant with the bundled template to decide on overrides.
- Audit critical props like text, variant, and disabled for accessibility considerations.
- Preview the ASCII layout to verify default, hover, and disabled states.
- Document a component for a design-system wiki with precise metadata and preview.