skills/ui-fix/SKILL.md
Generate implementation instructions or code patches for UI issues identified by ui-review
npx skillsauth add 45black/uk-legal-plugins ui-fixInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Generate implementation instructions or code patches for UI issues. Works with output from /ui-review to create actionable fixes.
/ui-review with issues identifiedEither:
/ui-review was run first)Required information:
| Issue Type | Fix Approach | |------------|--------------| | Colour/token | Update CSS custom property or Tailwind class | | Spacing/sizing | Update padding/margin/size values | | Typography | Update font-family, weight, or size | | Structure | Modify HTML/JSX structure | | Accessibility | Add ARIA labels, semantic elements | | Animation | Update transition/animation duration |
For non-coders (instruction mode):
## Fix: [Issue Title]
### What Needs to Change
[Plain language explanation of the change]
### Step-by-Step Instructions
1. **Find the file**: [Path to file]
2. **Look for**: [What to search for - be specific]
3. **Change it to**: [What it should become]
4. **Why**: [Brief explanation of why this fixes the issue]
### Verification
After making this change:
- [ ] [Check 1]
- [ ] [Check 2]
### If You're Stuck
Tell Claude: "In [file], change [old] to [new] for [issue]"
For developers (code mode):
## Fix: [Issue Title]
### Files to Modify
- `src/components/[Component].tsx`
### Code Changes
\`\`\`diff
- className="bg-[#0F0F0F]"
+ className="bg-[#121210]"
\`\`\`
### Related Files (May Need Updates)
- `tailwind.config.js` (if adding new tokens)
- `src/styles/globals.css` (if using CSS variables)
### Tests
- [ ] Visual regression test
- [ ] Accessibility audit passes
Quick reference for common fixes:
| Issue | Fix |
|-------|-----|
| Wrong primary colour | Change to #1A4F7A |
| Background too dark | Change to #FFFFFF (Paper White) |
| Wrong font | Use font-family: 'Inter', -apple-system, sans-serif |
| Status badge wrong | Use compliance palette (see TRUSTEE.md) |
| Touch target too small | Add min-h-[44px] min-w-[44px] |
| Missing focus ring | Add focus:ring-[3px] focus:ring-[#1A4F7A] focus:ring-offset-2 |
| Missing print styles | Add @media print { ... } block |
| Issue | Fix |
|-------|-----|
| Wrong warm carbon | Change #0F0F0F to #121210 |
| Code bar too short | Change to height: 6px |
| Wrong code bar order | Green→Teal→Blue→Purple→Coral→Orange |
| Orange on small text | Only use #F57C00 at 19pt+ |
| Animation too long | Cap at 300ms |
| Border radius too big | Cap at 12px (Saville) or 8px (Trustee) |
| Missing matte (Core) | Add matte texture at 15% dark / 8% light |
| Has matte (Clarity) | Remove matte texture for data-dense views |
For multiple issues from a review report:
# UI Fix Batch: [Product Name]
Generated: [Date]
## Fixes by Priority
### Critical (Must Fix Now)
#### Fix 1: [Title]
[Instructions or code]
#### Fix 2: [Title]
[Instructions or code]
### Warnings (Fix Soon)
#### Fix 3: [Title]
[Instructions or code]
---
## Implementation Order
1. [Fix 1] - Foundation change
2. [Fix 3] - Depends on Fix 1
3. [Fix 2] - Independent
## Estimated Effort
- Non-coder with instructions: ~[X] hours
- Developer with patches: ~[Y] hours
For EU AI Act compliance issues:
// Add AI-Generated badge to AI outputs
<div className="relative">
<AIOutput content={response} />
<span className="absolute top-2 right-2 text-xs bg-purple-100 text-purple-800 px-2 py-1 rounded">
AI-Generated
</span>
</div>
// Add verification footer
<footer className="text-xs text-gray-500 mt-4 border-t pt-2">
Generated with Claude | Always verify AI suggestions
</footer>
// Add human approval step
const handleAISuggestion = (suggestion: string) => {
setShowApprovalDialog(true);
setPendingSuggestion(suggestion);
// Never auto-apply
};
Common accessibility fixes:
// Missing alt text
<img src={src} alt="" /> // ❌
<img src={src} alt="Compliance status chart for Q4 2025" /> // ✅
// Missing form labels
<input type="text" placeholder="Name" /> // ❌
<label>
<span className="sr-only">Name</span>
<input type="text" placeholder="Name" />
</label> // ✅
// Missing focus visible
className="..." // ❌
className="... focus-visible:ring-2 focus-visible:ring-offset-2" // ✅
// Insufficient contrast
<p className="text-gray-400">...</p> // ❌ (may fail 4.5:1)
<p className="text-gray-600">...</p> // ✅ (usually passes)
// Touch target too small
<button className="p-1">...</button> // ❌
<button className="p-3 min-h-[44px] min-w-[44px]">...</button> // ✅
Based on user preference:
| Mode | Trigger | Output | |------|---------|--------| | Instructions | Default, or "explain how to fix" | Plain language steps | | Code | "generate code", "show me the patch" | Diff-style patches | | Both | "full fix" | Instructions + Code |
/ui-review → Identifies issues
/ui-fix → Generates fixes (THIS SKILL)
sonnet - Fix generation is procedural, not reasoning-heavy
Part of 45Black UI Expert Devstack For non-coders: This skill tells you exactly how to fix UI problems
development
Plain English writing coach trained on Zinsser (On Writing Well) and Orwell ('Politics and the English Language'). Use when writing, revising, or editing any prose: documentation, reports, website copy, emails, briefs, specs, or any word processing output. Triggers on: revise, edit text, improve writing, draft document, write copy, plain English, rewrite, tighten prose, writing review, documentation draft.
development
Assess and classify legal risks under English law (England & Wales) using a severity-by-likelihood framework with escalation criteria. References UK regulatory bodies (ICO, FCA, TPR, SFO), legal professional privilege, Companies Act duties, and UK-specific enforcement landscape. Use when evaluating contract risk, deal exposure, regulatory matters, or determining whether a matter needs senior counsel or external solicitor review.
testing
Screen incoming NDAs under English law (England & Wales), classify as GREEN (standard), YELLOW (needs review), or RED (significant issues). Applies English law tests for enforceability, restrictive covenants, penalty doctrine, and injunctive relief. Use when triaging NDAs for a UK-based organisation.
development
Prepare structured briefings for meetings with legal relevance under English law (England & Wales). Covers board meetings (Companies Act 2006 duties), regulatory meetings (ICO, FCA, TPR, CMA, SFO), contract negotiations, and compliance reviews. Tracks action items with CPR-aware litigation context and legal professional privilege considerations.