.cursor/skills/ui-builder/SKILL.md
Builds Next.js + TypeScript UIs with modular components, clear layout hierarchy, card-based results, polished spacing and typography, async states (loading, empty, success, error), responsive behavior, and thin API integration. Use when implementing or polishing screens, building feature UI from scratch, wiring components to backend routes, or when the user asks for clean minimal UI, demo-ready pages, or step-by-step UI construction with manual test steps.
npx skillsauth add Volodymyr199606/payment-risk-reviewer ui-builderInstall 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.
Execute hackathon-ready frontend work: ship fast, look polished, one primary flow that demos well.
Pairs with frontend-architect for folder layout and state patterns; contract-architect for API shapes. This skill focuses on how to build: structure first, then files in order, then how to verify each step manually.
"use client" only where needed (forms, browser APIs, local UI state)app/api/.../route.ts) or Server Actions — client calls through lib/apigap-4 / gap-6, section padding p-6–p-8)Output a tree or bullet hierarchy that shows:
page.tsx (or segment) owns the flowcomponents/ui — primitives reused everywhere (Button, Card, Input, Skeleton, Alert)components/features/<feature> — domain sections (e.g. form, result stack, signal list)lib/api — function(s) that call the backend; no raw fetch in feature components if avoidabletypes — request/response types aligned with the APIKeep the tree shallow — no deep nesting of folders without reason.
Suggested order (skip steps already done):
lib/api — one function per operation; map errors to a small union or ApiErrorcomponents/ui — only what this screen needs first; expand laterpage.tsx — compose layout: header region → main column → cardsRules
md+ only if it helps the demoAfter each chunk of work, add short manual verification the user (or you) can run:
| After completing | Manual check |
|------------------|--------------|
| Types + API stub | pnpm dev, open page; confirm no type errors; optional network tab for mocked call |
| UI primitives | Story or page: buttons/inputs render; focus states work |
| Feature cards (static) | Fill props with mock data; layout matches skeleton spacing |
| Loading | Trigger slow response or temporary delay; skeleton matches card layout |
| Empty | Submit empty / reset; message + optional CTA visible |
| Error | Force 4xx/5xx or invalid body; inline alert + form values preserved |
| Success | Full card stack; typography hierarchy readable |
| Responsive | Resize to ~375px and ~1024px; no horizontal overflow; cards stack |
Use plain steps: “Open /, click Submit, expect …” — no automated test framework required for MVP unless the repo already uses one.
| State | UI | |-------|-----| | Loading | Skeletons that mirror final card layout; disable primary action | | Empty | Short message (“No review yet” / “Enter details to run analysis”) | | Success | Full card content; clear visual priority (recommendation before secondary detail) | | Error | Single alert or banner; actionable copy; retry when sensible; do not clear unrelated inputs |
Prefer one discriminated union (e.g. AsyncState<T>) or equivalent — see frontend-architect.
lib/api.ts (or lib/api/<feature>.ts if split)lib/api only — keeps components testable and swaps easy for demos (mock → real)page.tsx before listing components and ownershipfetch scattered across feature componentsOne flow: input → review → cards (risk level, signals, recommendation, short explanation). Keep navigation minimal; prioritize readability and a convincing loading → success transition for judges.
tools
Designs hackathon-ready frontend architecture: folder layout, page shell, component boundaries, state flow, API touchpoints, TypeScript types, async UI states, and responsive patterns. Optimized for Next.js MVPs, speed, and demo quality. Use when scaffolding or refactoring UI, planning pages and components, wiring client to API, or when the user mentions frontend structure, layout, state management, or implementation order for an MVP.
development
Audits an existing MVP for demo readiness: user flow clarity, visible value, visual polish, information scanability, first impression, and what to cut or simplify. Produces a prioritized list of practical, quick-win improvements only. Use when polishing for a demo, hackathon presentation, stakeholder walkthrough, or when the user asks for demo readiness, first impression, or what to remove before showing the product.
tools
Designs clean, stable MVP API and UI contracts: input/output shapes, TypeScript types, sample JSON, required vs optional fields, validation hints, and extension notes. Optimized for one-day builds and card-friendly UIs. Use when defining endpoints, request/response schemas, form models, shared types, or before wiring frontend to backend; when the user mentions contracts, DTOs, API design, or stable JSON shapes for an MVP.
tools
Connects Next.js frontends to backend Route Handlers with centralized fetch wrappers, TypeScript response types, simple async state (loading / empty / success / error), and debug-friendly single-module API code. Use when wiring client components to `app/api`, refactoring scattered fetch calls, defining request/response typing for API calls, or when the user mentions API integration, fetch patterns, or keeping the frontend decoupled from backend internals.