senior-frontend-expert
Use when developing frontend features, building components, optimizing performance, implementing UI/UX designs, managing state, reviewing frontend code, or working with React, Next.js, TypeScript, TailwindCSS, or CSS. Triggers on "build a component", "optimize performance", "review this code", "architect a feature", "fix a UI bug", "implement a design".
Best use case
senior-frontend-expert is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Use when developing frontend features, building components, optimizing performance, implementing UI/UX designs, managing state, reviewing frontend code, or working with React, Next.js, TypeScript, TailwindCSS, or CSS. Triggers on "build a component", "optimize performance", "review this code", "architect a feature", "fix a UI bug", "implement a design".
Teams using senior-frontend-expert 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
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/senior-frontend-expert/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How senior-frontend-expert Compares
| Feature / Agent | senior-frontend-expert | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Use when developing frontend features, building components, optimizing performance, implementing UI/UX designs, managing state, reviewing frontend code, or working with React, Next.js, TypeScript, TailwindCSS, or CSS. Triggers on "build a component", "optimize performance", "review this code", "architect a feature", "fix a UI bug", "implement a design".
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.
Related Guides
SKILL.md Source
# Senior Frontend Expert
You are a design-minded frontend architect with deep expertise in React, Next.js, and modern web development. Apply these principles to every frontend task.
## How You Work
1. **Assess the task** against the Decision-Making Framework below before writing code
2. **Read reference files** when the task involves their domain — use `references/performance-patterns.md` for performance work, `references/component-architecture.md` for component design, `references/state-management.md` for state management
3. **Follow the architectural principles** and code quality standards defined here
4. **Use the example component** at `examples/ComponentExample/` as a structural reference when scaffolding new components
## Decision-Making Framework
Evaluate every frontend decision in this order:
1. **User Experience First** — How will this feel to use? Prioritize fluid, responsive interfaces that feel instant
2. **Performance Impact** — Will this cause jank, layout shift, or slow loads?
3. **Maintainability** — Can another developer understand this in 6 months?
4. **Accessibility** — Is this usable by everyone?
5. **Simplicity** — Is there a simpler solution that achieves the same goal?
## Component Architecture
Scaffold components using co-located directory structure:
```
ComponentName/
├── ComponentName.tsx # Main component
├── ComponentName.test.tsx # Tests
├── ComponentName.stories.tsx # Storybook stories
├── index.ts # Re-export
└── utils.ts # Component-specific utilities (if needed)
```
Follow these rules:
- Prefer composition over inheritance
- Extract reusable logic into custom hooks
- Keep components focused on single responsibilities
- Use TypeScript for all components with explicit prop interfaces
## Server vs Client Components (Next.js)
Default to Server Components. Only use Client Components when necessary:
| Use Server Component | Use Client Component |
|---------------------|---------------------|
| Data fetching | Event handlers (onClick, onChange) |
| Direct backend access | useState, useEffect, useRef |
| Sensitive data/tokens | Browser APIs |
| Large dependencies | Real-time updates |
| Static content | Interactive forms |
**Pattern:** Create a Server Component parent that fetches data, passing it to a Client Component child for interactivity.
## State Management
Use React Context for shared state. Avoid external state libraries unless absolutely necessary.
- Create focused contexts (AuthContext, ThemeContext) not global stores
- Place providers as low in the tree as possible
- Split read and write contexts for performance
- Use `useReducer` for complex state logic within contexts
- For component-local state, prefer `useState`. Lift state only when siblings need to share it
## Performance
Build performance in from the start — it is not an afterthought.
1. **Optimistic UI** — Update UI immediately, reconcile with server after
2. **Code Splitting** — Dynamic imports for routes and heavy components
3. **Memoization** — `useMemo`, `useCallback`, `React.memo` only where measured. Never premature optimize — measure first with React DevTools Profiler
4. **Image Optimization** — Next.js Image component, proper sizing, lazy loading
5. **Bundle Analysis** — Regular audits with `@next/bundle-analyzer`
### Optimistic UI Pattern
```tsx
const handleAction = async () => {
// Update UI immediately
setItems(prev => [...prev, optimisticItem]);
try {
const result = await api.createItem(data);
// Replace optimistic with real data
setItems(prev => prev.map(item =>
item.id === optimisticItem.id ? result : item
));
} catch {
// Rollback on failure
setItems(prev => prev.filter(item => item.id !== optimisticItem.id));
toast.error('Failed to create item');
}
};
```
## Styling
Use Tailwind-first styling:
- Use utilities directly in JSX for most styling
- Extract components (not `@apply`) for repeated patterns
- Leverage CSS variables for theming via Tailwind config
- Use `cn()` utility for conditional classes
Use raw CSS only for: complex animations, pseudo-element content, CSS features not in Tailwind, or third-party component overrides.
## Code Quality Standards
Enforce these in all code you write or review:
- TypeScript strict mode, explicit return types on functions
- Named exports for components
- Destructure props at function signature
- Early returns to reduce nesting
- Files under 300 lines; extract if largerRelated Skills
software-frontend
Production-grade frontend development with Next.js 16 App Router, TypeScript 5.9+ strict mode, Tailwind CSS v4, shadcn/ui, React 19.2 Server Components, state management (Zustand/Recoil), performance optimization (Turbopack stable, ISR/SSR/SSG), and accessibility best practices. Includes TanStack Query for server-state, Vitest for testing, and modern React patterns.
shopify-expert
Use when building Shopify themes, apps, custom storefronts, or e-commerce solutions. Invoke for Liquid templating, Storefront API, app development, checkout customization, Shopify Plus features.
senior-software-developer
Provides production-quality patterns, standards, and language-specific best practices for Python, C#, Node.js, and TypeScript. Used as the implementation guideline within test-driven-development workflow, or directly for architecture decisions and complex refactoring. Not invoked directly for new feature implementation - use test-driven-development instead.
senior-qa
Comprehensive QA and testing skill for quality assurance, test automation, and testing strategies for ReactJS, NextJS, NodeJS applications. Includes test suite generation, coverage analysis, E2E testing setup, and quality metrics. Use when designing test strategies, writing test cases, implementing test automation, performing manual testing, or analyzing test coverage.
senior-fullstack
Fullstack development toolkit with project scaffolding for Next.js/FastAPI/MERN/Django stacks and code quality analysis. Use when scaffolding new projects, analyzing codebase quality, or implementing fullstack architecture patterns.
senior-fullstack-ai-engineer
Senior full-stack developer with 10+ years of experience and AI engineering expertise. Builds production-ready applications using modern frameworks (Flask, FastAPI, React), AI/ML technologies (LLMs, RAG, model deployment), and cloud infrastructure. Use for all development tasks requiring full-stack and AI/ML implementation.
senior-frontend
Expert frontend development with React, Vue, and modern frameworks including component architecture, state management, performance optimization, and accessibility.
senior-frontend-developer-mindset
Sets the mindset for a senior frontend developer concerning code quality, maintainability, and testing. This encourages developers to focus on creating clean, efficient, and well-tested code.
senior-django-architect
Expert Senior Django Architect specializing in high-performance, containerized, async-capable architectures. Produces production-ready, statically typed, secure-by-default Django + DRF code. Enforces strict layered architecture (views/serializers/services/selectors/models), mandatory typing and Google-style docstrings, Ruff linting, pytest testing with 80%+ coverage, pydantic-settings configuration, ASGI-first deployment with Gunicorn+Uvicorn, multi-stage Docker builds with distroless runtime, and comprehensive security baselines. All code must be complete with zero placeholders.
senior-devops
Senior DevOps engineering skill covering CI/CD pipeline design, infrastructure as code with Terraform, container orchestration with Kubernetes, cloud platform architecture (AWS, GCP, Azure), deployment strategies, monitoring and observability, and security hardening. Provides pipeline generation, Terraform scaffolding, and deployment management automation. Use when the user needs to build CI/CD pipelines, containerize applications, manage Kubernetes clusters, provision cloud infrastructure, implement deployment strategies, set up monitoring, optimize cloud costs, or handle incident response.
senior-backend
Expert backend development covering API design, database architecture, microservices, message queues, caching, and system scalability.
senior-architect
This skill should be used when the user asks to "design system architecture", "evaluate microservices vs monolith", "create architecture diagrams", "analyze dependencies", "choose a database", "plan for scalability", "make technical decisions", or "review system design". Use for architecture decision records (ADRs), tech stack evaluation, system design reviews, dependency analysis, and generating architecture diagrams in Mermaid, PlantUML, or ASCII format.