fluxwing-validator

Validate uxscii components and screens against schema with interactive menu or direct script calls

15 stars

Best use case

fluxwing-validator is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Validate uxscii components and screens against schema with interactive menu or direct script calls

Teams using fluxwing-validator should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/fluxwing-validator/SKILL.md --create-dirs "https://raw.githubusercontent.com/trabian/fluxwing-skills/main/skills/fluxwing-validator/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/fluxwing-validator/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How fluxwing-validator Compares

Feature / Agentfluxwing-validatorStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Validate uxscii components and screens against schema with interactive menu or direct script calls

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Fluxwing Validator

Validate uxscii components and screens against JSON Schema with interactive workflows.

## Overview

This skill provides two modes of operation:

1. **Interactive Mode**: User invocation with menu and minimal output
2. **Direct Mode**: Script calls from other skills with verbose output

## When to Use This Skill

**User says:**
- "Validate my components"
- "Check if everything is valid"
- "Run validation on my screens"
- "Validate the project"

**Other skills:** Call validator scripts directly (see Technical Reference below)

## Interactive Validation Workflow

### Step 1: Present Validation Options

Use AskUserQuestion to present menu:

```
What would you like to validate?
```

**Options:**
1. **Everything in this project** - Validates all components and screens
2. **Just components** - Validates `./fluxwing/components/*.uxm`
3. **Just screens** - Validates `./fluxwing/screens/*.uxm`
4. **Let me specify a file or pattern** - Custom path/glob pattern

### Step 2: Check What Exists

Before running validation, check if directories exist:

```bash
# Check for components
test -d ./fluxwing/components

# Check for screens
test -d ./fluxwing/screens
```

**If neither exists:**
- Inform user: "No components or screens found. Create some first!"
- Exit cleanly

**If option 4 (custom) selected:**
- Ask user for the pattern/file path
- Validate it's not empty
- Proceed with user-provided pattern

### Step 3: Run Validation

Based on user selection:

**Option 1: Everything**
```bash
# Validate components
node {SKILL_ROOT}/validate-batch.js \
  "./fluxwing/components/*.uxm" \
  "{SKILL_ROOT}/../fluxwing-component-creator/schemas/uxm-component.schema.json" \
  --json

# Validate screens
node {SKILL_ROOT}/validate-batch.js \
  "./fluxwing/screens/*.uxm" \
  "{SKILL_ROOT}/../fluxwing-component-creator/schemas/uxm-component.schema.json" \
  --screens \
  --json
```

**Option 2: Just components**
```bash
node {SKILL_ROOT}/validate-batch.js \
  "./fluxwing/components/*.uxm" \
  "{SKILL_ROOT}/../fluxwing-component-creator/schemas/uxm-component.schema.json" \
  --json
```

**Option 3: Just screens**
```bash
node {SKILL_ROOT}/validate-batch.js \
  "./fluxwing/screens/*.uxm" \
  "{SKILL_ROOT}/../fluxwing-component-creator/schemas/uxm-component.schema.json" \
  --screens \
  --json
```

**Option 4: Custom pattern**
```bash
# Use user-provided pattern
node {SKILL_ROOT}/validate-batch.js \
  "${userPattern}" \
  "{SKILL_ROOT}/../fluxwing-component-creator/schemas/uxm-component.schema.json" \
  --json
```

### Step 4: Parse Results and Show Minimal Summary

Parse JSON output from validator to extract:
- `total`: Total files validated
- `passed`: Number of valid files
- `failed`: Number of failed files
- `warnings`: Total warning count

**Display minimal summary:**

```
✓ 12/14 components valid
✗ 2/14 components failed
⚠ 3 warnings total
```

**If all passed:**
```
✓ All 14 components valid
⚠ 3 warnings
```

**If everything failed:**
```
✗ All 14 components failed
```

**If nothing to validate:**
```
No files found matching pattern
```

### Step 5: Ask About Details

Use AskUserQuestion to ask:

```
Show error details?
```

**Options:**
1. **Yes** - Display full validation output
2. **No** - Clean exit

### Step 6: Display Details (if requested)

If user selects "Yes", show full validation output including:

**Failed files section:**
```
Failed Files:

  ✗ broken-button (./fluxwing/components/broken-button.uxm)
    Errors: 2
      1. must have required property 'fidelity'
      2. ASCII template file not found

  ✗ old-card (./fluxwing/components/old-card.uxm)
    Errors: 1
      1. invalid version format
```

**Passed with warnings section:**
```
Passed with Warnings:

  ✓ login-screen (2 warnings)
  ✓ dashboard (1 warning)
```

**Fully passed section (optional, only if not too many):**
```
Fully Passed:

  ✓ primary-button
  ✓ secondary-button
  ✓ email-input
  ...
```

## Edge Cases

### No fluxwing directory exists
```
No components or screens found. Create some first!
```

### Empty directories
```
✓ 0/0 components valid
```

### Invalid glob pattern (option 4)
```
No files found matching pattern: ${pattern}
```

### Validation script fails to execute
```
Error: Cannot execute validator. Node.js required.
```

## Technical Reference (For Other Skills)

### Direct Script Calls

Other skills (component-creator, screen-scaffolder) call validator scripts directly:

**Validate single component:**
```bash
node {SKILL_ROOT}/../fluxwing-validator/validate-component.js \
  ./fluxwing/components/button.uxm \
  {SKILL_ROOT}/schemas/uxm-component.schema.json
```

**Validate single screen:**
```bash
node {SKILL_ROOT}/../fluxwing-validator/validate-screen.js \
  ./fluxwing/screens/login-screen.uxm \
  {SKILL_ROOT}/schemas/uxm-component.schema.json
```

**Batch validate:**
```bash
node {SKILL_ROOT}/../fluxwing-validator/validate-batch.js \
  "./fluxwing/components/*.uxm" \
  {SKILL_ROOT}/schemas/uxm-component.schema.json
```

**Output modes:**
- Default: Human-readable (verbose, full errors/warnings)
- `--json`: Machine-readable JSON

**Exit codes:**
- `0`: All files valid
- `1`: One or more files invalid
- `2`: Missing dependencies or invalid arguments

### Validator Scripts

**Available scripts:**
- `validate-component.js` - Validate single component file
- `validate-screen.js` - Validate single screen file (with screen-specific checks)
- `validate-batch.js` - Validate multiple files with glob patterns
- `test-validator.js` - Test component templates
- `test-screen-validator.js` - Test screen templates

### npm Scripts (for testing)

```bash
cd {SKILL_ROOT}

# Run tests
npm test                    # Test component templates
npm run test:screens       # Test screen templates

# Batch validation
npm run validate:components  # Validate all components
npm run validate:screens     # Validate all screens
npm run validate:all         # Validate everything
```

## Example Interactions

### Example 1: Validate Everything

**User:** "Validate my components"

**Skill:**
```
What would you like to validate?

1. Everything in this project
2. Just components
3. Just screens
4. Let me specify a file or pattern
```

**User selects:** Option 1

**Skill runs validation and shows:**
```
✓ 12/14 components valid
✗ 2/14 components failed
⚠ 3 warnings total

✓ 2/2 screens valid
⚠ 1 warning

Show error details?
```

**User:** "yes"

**Skill shows full error details for failed files**

### Example 2: Validate Specific Pattern

**User:** "Validate my components"

**Skill:** (presents menu)

**User selects:** Option 4 (custom pattern)

**Skill:** "What file or pattern would you like to validate?"

**User:** "./fluxwing/components/*-button.uxm"

**Skill validates and shows:**
```
✓ 3/3 files valid

Show error details?
```

## Implementation Notes

**Parse JSON output:**
```javascript
const result = JSON.parse(bashOutput);
const total = result.total;
const passed = result.passed;
const failed = result.failed;
const warnings = result.warnings;
```

**Summary formatting:**
- Show passed/failed ratio for quick scan
- Highlight failures prominently
- Warnings shown but not intrusive
- Clean, minimal output by default

**Error detail formatting:**
- Group by status (failed, warnings, passed)
- Show file path and error count
- Display first 2-3 errors per file
- Indicate if more errors exist

---

**Skill Status:** Ready for use
**Version:** 1.0.0

Related Skills

Fluxwing Screenshot Importer

15
from trabian/fluxwing-skills

Import UI screenshots and generate uxscii components automatically using vision analysis. Use when user wants to import, convert, or generate .uxm components from screenshots or images.

Fluxwing Screen Scaffolder

15
from trabian/fluxwing-skills

Build complete UI screens by composing multiple uxscii components. Use when working with .uxm files, when user wants to create, scaffold, or build .uxm screens like login, dashboard, profile, settings, or checkout pages.

Fluxwing Library Browser

15
from trabian/fluxwing-skills

Browse and view all available uxscii components including bundled templates, user components, and screens. Use when working with .uxm files, when user wants to see, list, browse, or search .uxm components or screens.

Fluxwing Enhancer

15
from trabian/fluxwing-skills

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.

Fluxwing Component Viewer

15
from trabian/fluxwing-skills

View detailed information about a specific uxscii component including metadata, states, props, and ASCII preview. Use when working with .uxm files, when user wants to see, view, inspect, or get details about a .uxm component.

Fluxwing Component Expander

15
from trabian/fluxwing-skills

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.

Fluxwing Component Creator

15
from trabian/fluxwing-skills

Create uxscii components with ASCII art and structured metadata when user wants to create, build, or design UI components. Use when working with .uxm files, when user mentions .uxm components, or when creating buttons, inputs, cards, forms, modals, or navigation.

reverse-derivative-validator

16
from plurigrid/asi

Triadic skill (validation)

paperproof-validator

16
from plurigrid/asi

Formal Proof Visualization and Verification for Lean 4

manifest-privilege-validator

16
from plurigrid/asi

Validates tizen-manifest.xml privilege declarations. Checks privilege correctness, required privilege levels, and manifest conformance.

cynara-policy-validator

16
from plurigrid/asi

Validates Cynara privilege access control policies. Checks policy syntax, logical consistency, and permission accuracy.

preflight-validator

14
from nguyenthienthanh/aura-frog

On-demand wrapper over scripts/preflight/run-all.sh. Runs Tier 1 bash linters against a file, command, or arbitrary content. Returns 0 pass / 1 warn / 2 fail. Used by /aura-frog:preflight check and contributors authoring custom hooks.