joabgonzalez/ai-agents-skills/frontend-dev
Claude Code and agent skill by joabgonzalez/ai-agents-skills
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Frontend workflow with componentization and state management. Trigger: When building, refactoring, or scaling frontend apps.
Install
npx vskill@latest install joabgonzalez/ai-agents-skills/frontend-devSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as joabgonzalez/ai-agents-skills/frontend-dev.
Frontend Development
Universal frontend workflow guiding componentization, state management, testing, and deployment. Technology-agnostic, orchestrates technical skills (react, typescript, a11y) without duplicating patterns.
When to Use
- Building, refactoring, or scaling frontend apps
- Managing state, side effects, or data flow
- Preparing for deployment or CI/CD
- Reviewing code quality
Don't use for:
- Technology-specific code (use react, typescript skills)
- Backend development (use backend-dev skill)
Critical Patterns
✅ REQUIRED: Componentization with Single Responsibility
Build small, reusable components that do one thing well.
Decision Tree:
- Component doing >1 thing? → Split into focused components
- Logic mixed with presentation? → Extract custom hooks
- Component >100 lines? → Decompose into smaller units
Implementation: Delegate to react for component patterns
Example Decomposition:
When to Stop Decomposing:
- Component <30 lines AND single responsibility
- No reusable parts remain
- Further splitting hurts readability
✅ REQUIRED: State Management with Colocated State
Keep state as local as possible. Lift to global only when necessary.
Decision Tree:
Implementation: Delegate to react for state patterns
✅ REQUIRED: Testing with User-Centric Approach
Test behavior, not implementation. Simulate real user interactions.
Decision Tree:
Implementation: Delegate to react-testing-library and unit-testing
Testing Priorities:
- Critical user flows (login, checkout, payment)
- Error states (network failure, validation errors)
- Edge cases (empty state, loading, no permissions)
- Accessibility (keyboard navigation, screen reader)
✅ REQUIRED: Environment-Based Configuration
Use environment variables for configuration. Never hardcode.
Decision Tree:
Implementation: Delegate to framework-specific skills (next, vite)
Configuration Pattern:
✅ REQUIRED: Component Hierarchy
When designing component tree:
- Identify data flow: Where does data originate? Where is it consumed?
- Find common ancestor: Lowest component that can own state
- Minimize prop drilling: If passing props >2 levels, consider context
- Separate concerns: Layout components (div, flex) vs logic components (data fetching, state)
Red Flags:
- Props passed through 3+ levels without being used
- Parent component knowing too much about child internals
- Component receiving >8 props (too many responsibilities)
✅ REQUIRED: Data Fetching Strategy
Decision Tree:
Implementation: Delegate to framework skills (next, react)
✅ REQUIRED: Performance Optimization
When to optimize:
- Measure FIRST (React DevTools Profiler, Lighthouse)
- Identify bottlenecks (slow renders, large bundles)
- Apply targeted fixes (NOT premature optimization)
Common Optimizations:
- Lazy load routes → React.lazy + Suspense
- Lazy load images → Intersection Observer
- Memoize expensive calculations → useMemo
- Prevent unnecessary re-renders → React.memo, useCallback
- Code splitting → Dynamic imports
Red Flags (Premature Optimization):
- Using React.memo everywhere "just in case"
- useCallback for simple functions
- Optimizing before measuring
Decision Tree
Example
Building a product list page: component decomposition, state, data fetching, and testing.
Patterns applied: component decomposition by responsibility, local state for UI, React Query for server state, derived state computed during render, getByRole accessible queries.
Edge Cases
- State sync bugs: Race conditions occur when async operations complete out of order. Use cleanup functions in useEffect. Consider using state management libraries (Redux, Zustand) for complex async flows.
- Build pipeline failures: Environment variables not set cause production builds to fail. Validate required env vars at build time. Use .env.example to document required variables.
- Cross-browser or device-specific issues: Test on multiple browsers (Chrome, Firefox, Safari) and devices (mobile, tablet, desktop). Use feature detection instead of browser detection. Polyfill missing APIs.
- Memory leaks: Event listeners, subscriptions, and timers not cleaned up cause memory leaks. Always return cleanup function from useEffect. Unsubscribe from observables.
- Bundle size bloat: Importing entire libraries increases bundle size. Use tree-shaking compatible libraries. Import only what you need (import { Button } from 'library' not import * as Library).
Checklist
- [ ] Components follow single responsibility principle
- [ ] State colocated (local when possible, global only when shared)
- [ ] Prop drilling avoided (context, stores, or composition)
- [ ] User-centric tests written (unit + integration)
- [ ] Accessibility requirements met (a11y skill)
- [ ] Environment variables for all configuration
- [ ] Loading and error states handled
- [ ] Form inputs validated (client-side + server-side)
- [ ] Images optimized and lazy-loaded
- [ ] Bundle size analyzed and optimized
- [ ] TypeScript strict mode enabled
- [ ] CI/CD pipeline configured (lint, test, build, deploy)
- [ ] Responsive design tested on mobile and desktop; browser compatibility verified (Chrome, Firefox, Safari)
Workflow
E2E Development Workflow:
- brainstorming → Evaluate alternatives, high-level planning
- writing-plans → Break into executable tasks (2-5 min, file paths)
- frontend-dev (this skill) → Apply Frontend Developer thinking and architecture
- plan-execution → Execute in batches of 3 with checkpoints
- verification-protocol → Verify each task (IDENTIFY → RUN → READ → VERIFY → CLAIM)
- code-review → Two-stage review (spec compliance → code quality)
Resources
- code-conventions - Code organization and naming
- architecture-patterns - Design patterns (Composition, HOC, Render Props)
- screaming-architecture - Domain-first folder structure (backend + React/frontend)
- state-machines-pattern - Explicit state modeling for async flows and workflows
- result-pattern - Typed error handling in hooks and services
- composition-pattern - Flexible, composable component APIs
- react - React patterns and hooks
- typescript - Type-safe frontend development
- a11y - Accessibility requirements
- interface-design - UI/UX design patterns
- tailwindcss - Utility-first CSS
- form-validation - Form validation patterns
- react-testing-library - User-centric testing
- https://web.dev/patterns/ - Web platform patterns
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/frontend-dev/SKILL.md
Popularity
- Repository stars
- 9
- 7-day trend score
- 12
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/joabgonzalez/ai-agents-skills/frontend-dev)