Provide a consistent, maintainable baseline for building modern frontend applications with TypeScript: component patterns, data fetching, routing, styling, and UX states.
When to use
Use this skill when you are:
Building or refactoring UI components
Introducing or updating data fetching patterns
Designing feature/module structure
Implementing routing and lazy loading
Standardizing styling and theme usage
Handling loading, empty, and error states
Avoid using this skill when:
you are making a single small UI tweak (for example, a minor CSS change) with no structural impact
you only need to fix one isolated issue with a known solution and do not need broader consistency checks
A consistent implementation plan (component tree + data dependencies)
Component and hook scaffolds
A UX-state plan (loading/empty/error)
A minimal test strategy (where applicable)
Core rules
Components MUST have typed props and clear responsibilities.
Side effects MUST be isolated (prefer hooks or service modules).
Data fetching MUST have a consistent caching and invalidation strategy.
UI MUST handle loading, empty, and error states explicitly.
Styling MUST follow a single primary approach (theme-first where possible).
Steps
Identify the feature boundary and public API (what the feature exports).
Design the component tree and state boundaries.
Define data dependencies:
what is fetched
when it is fetched
how it is cached and invalidated
Implement components using:
typed props
composition over inheritance
small reusable hooks
Implement loading/error UX.
Add verification:
basic render
one representative interaction
one representative error path
Verification
Components have typed props (no implicit any)
Data fetching uses a consistent cache strategy
Loading, empty, and error states are explicitly handled
Basic render test passes
One representative interaction works
One error path renders correctly
Boundaries
MUST NOT use implicit any in props or state
MUST NOT fetch data without handling loading and error states
MUST NOT mix styling approaches within the same feature
SHOULD NOT bypass the caching layer for server state
SHOULD NOT embed business logic in UI components
SHOULD NOT skip accessibility considerations (focus, keyboard nav)
Included assets
Templates: ./templates/ provides component and hook scaffolds.
Examples: ./examples/ provides a feature layout blueprint.
1---2name: apply-frontend-ui-guidelines3description: Frontend UI Guidelines4---56# Frontend UI Guidelines78## Purpose9Provide a consistent, maintainable baseline for building modern frontend applications with TypeScript: component patterns, data fetching, routing, styling, and UX states.1011## When to use12Use this skill when you are:13- Building or refactoring UI components14- Introducing or updating data fetching patterns15- Designing feature/module structure16- Implementing routing and lazy loading17- Standardizing styling and theme usage18- Handling loading, empty, and error states192021Avoid using this skill when:22- you are making a single small UI tweak (for example, a minor CSS change) with no structural impact23- you only need to fix one isolated issue with a known solution and do not need broader consistency checks2425## Inputs26- Feature requirements and UX expectations27- Data sources (API endpoints, caching needs)28- Existing frontend stack (framework, router, query/cache library, UI kit)2930## Outputs31- A consistent implementation plan (component tree + data dependencies)32- Component and hook scaffolds33- A UX-state plan (loading/empty/error)34- A minimal test strategy (where applicable)3536## Core rules37- Components MUST have typed props and clear responsibilities.38- Side effects MUST be isolated (prefer hooks or service modules).39- Data fetching MUST have a consistent caching and invalidation strategy.40- UI MUST handle loading, empty, and error states explicitly.41- Styling MUST follow a single primary approach (theme-first where possible).4243## Steps441. Identify the feature boundary and public API (what the feature exports).452. Design the component tree and state boundaries.463. Define data dependencies:47 - what is fetched48 - when it is fetched49 - how it is cached and invalidated504. Implement components using:51 - typed props52 - composition over inheritance53 - small reusable hooks545. Implement loading/error UX.556. Add verification:56 - basic render57 - one representative interaction58 - one representative error path5960## Verification6162- [ ] Components have typed props (no implicit `any`)63- [ ] Data fetching uses a consistent cache strategy64- [ ] Loading, empty, and error states are explicitly handled65- [ ] Basic render test passes66- [ ] One representative interaction works67- [ ] One error path renders correctly6869## Boundaries7071- MUST NOT use implicit `any` in props or state72- MUST NOT fetch data without handling loading and error states73- MUST NOT mix styling approaches within the same feature74- SHOULD NOT bypass the caching layer for server state75- SHOULD NOT embed business logic in UI components76- SHOULD NOT skip accessibility considerations (focus, keyboard nav)7778## Included assets79- Templates: `./templates/` provides component and hook scaffolds.80- Examples: `./examples/` provides a feature layout blueprint.
Run npx skillmds@latest add willyu1007/apply-frontend-ui-guidelines in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Frontend UI Guidelines It is listed under Web & Frontend on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
willyu1007 (@willyu1007) published this skill. Their other Agent Skills are listed on their SkillMD profile.