$npx -y skills add educlopez/ui-craft --skill heuristicProduce a scored heuristic critique of the UI using Nielsen's 10 + 6 design laws + optional persona walkthroughs. Outputs a machine-parseable scorecard plus a 0-100 UsabilityScore (the judged companion to the deterministic UICraftScore). Invoke when the user asks for heuristic on
| 1 | <!-- HARNESS MIRROR — do not edit here. Canonical source: skills/ or commands/. After editing source, copy into cli/assets/<harness>/ and repo-root harness mirrors. --> |
| 2 | |
| 3 | **Context:** this sub-skill is one lens of the broader `ui-craft` skill. If the `ui-craft` skill is also installed, read its SKILL.md first for Discovery + Anti-Slop + Craft Test, then apply the specific lens below. |
| 4 | |
| 5 | Score the UI at the target the user described against Nielsen's 10 + 6 design laws. Load the `ui-craft` skill. |
| 6 | |
| 7 | **Step 1 — Load the methodology.** Read `references/heuristics.md` for the full rubric, scoring definitions, design law details, and the required output format. Do NOT invent a new format or a new scale. |
| 8 | |
| 9 | **Step 2 — Walk Nielsen's 10 heuristics.** Score each 1-5 per the rubric: |
| 10 | - **1** blocks users · **2** severe friction · **3** works but confusing · **4** works, minor polish · **5** best-in-class |
| 11 | |
| 12 | For every heuristic, write a concrete finding — quote text, count elements, name the broken flow. Vague findings are rejected. |
| 13 | |
| 14 | **Step 3 — Audit the 6 design laws.** PASS / FAIL each with a specific detail: |
| 15 | - Fitts's Law — touch target sizing, CTA placement |
| 16 | - Hick's Law — choice density, nav + select sizing |
| 17 | - Doherty Threshold — perceived latency, optimistic UI |
| 18 | - Cleveland-McGill — chart encoding choice |
| 19 | - Miller's Law — nav depth, form section counts |
| 20 | - Tesler's Law — where complexity lives |
| 21 | |
| 22 | **Step 4 — Persona walkthrough (if `--persona=` present).** If the args include `--persona=<name>`, load `references/personas.md` and run the matching walkthrough checklist. Supported: `priya`, `jordan`, `adaeze`, `kwame`, `margo`, `all`. Output the walkthrough as a `| Checklist item | Pass/Fail | Finding | Impact |` table. Without the flag, skip this step. |
| 23 | |
| 24 | **Step 5 — Rank findings by impact tag.** Impact order: `blocks-conversion > adds-friction > reduces-trust > minor-polish`. Include at most 5 findings in the ranked list; cut anything at `minor-polish` unless there are no higher-impact findings. |
| 25 | |
| 26 | **Step 6 — Compute the UsabilityScore.** Roll the scorecard into a 0-100 number + grade per the **UsabilityScore** formula in `references/heuristics.md`: `heuristic_base = round(((mean(nielsen_scores) − 1) / 4) × 100)`, minus `5 × (failed design laws)`, clamped [0,100]. Same A/B/C/D/F bands as UICraftScore. Always label it `(judged)` — it is **not** deterministic and must never gate CI. If the args include `--json`, also emit the machine-readable block. If the user asks for the full picture, build the **Extended quality report** by fetching the deterministic UICraftScore (`node scripts/eval.mjs <path> --json` or the `score_ui` MCP tool) and placing both side by side — never average them. |
| 27 | |
| 28 | **Step 7 — Output.** Use the exact scorecard format in `references/heuristics.md`: |
| 29 | |
| 30 | 1. `## Heuristic Scorecard` table |
| 31 | 2. `## Design Law Audit` table |
| 32 | 3. `## Persona Walkthrough` table (only if `--persona=` was passed) |
| 33 | 4. `## Top findings (ranked by impact)` — numbered list, 3-5 items |
| 34 | 5. `## UsabilityScore` block — the 0-100 score + grade + component breakdown |
| 35 | |
| 36 | **Knob awareness:** knob-agnostic. Usability is not a knob — a 2 is a 2 whether `CRAFT_LEVEL` is 3 or 9. Do not soften scores based on `CRAFT_LEVEL`. |
| 37 | |
| 38 | **Output contract:** |
| 39 | - This command produces a **critique artifact**, not code. No edits unless the user explicitly asks in a follow-up. |
| 40 | - The scorecard is machine-parseable markdown. A PM can paste it into any issue tracker and file tickets row-by-row. Frame it that way in any preamble. |
| 41 | - No "First Impressions" paragraph, no hedging, no praise padding. Tables + ranked list only. |
| 42 | |
| 43 | Do NOT edit code. This is a scored critique. |