aiskillstore/marketplace/frontend-component
Claude Code and agent skill by aiskillstore/marketplace
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Author "aiskillstore" has blocked skill(s)
Next.js 16+ uses App Router with Server Components by default. Client Components are only used when interactivity is needed (hooks, event handlers, browser APIs).
Install
npx vskill@latest install aiskillstore/marketplace/frontend-componentSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as aiskillstore/marketplace/frontend-component.
Frontend Component Skill
Purpose: Guidance for creating Next.js components following server/client patterns and existing component structures.
Overview
Next.js 16+ uses App Router with Server Components by default. Client Components are only used when interactivity is needed (hooks, event handlers, browser APIs).
Server vs Client Components
Server Components (Default)
When to Use:
- Pages and layouts
- Static content
- Data fetching from API (when possible)
- SEO-optimized content
Pattern:
Example: frontend/app/layout.tsx, frontend/app/page.tsx
Client Components (When Needed)
When to Use:
- Interactive elements (buttons, forms, inputs)
- Event handlers (onClick, onChange, etc.)
- React hooks (useState, useEffect, useRouter, etc.)
- Browser APIs (localStorage, window, document, etc.)
- Real-time updates
- Drag and drop functionality
Pattern:
Example: frontend/components/ProtectedRoute.tsx, frontend/app/signup/page.tsx
Component Structure Template
Specific Component Patterns
1. ProtectedRoute Pattern
From: frontend/components/ProtectedRoute.tsx
Pattern:
- Check authentication on mount
- Show loading spinner during check
- Store intended destination in sessionStorage
- Redirect to
/signinif not authenticated - Only render children if authorized
2. LoadingSpinner Pattern
From: frontend/components/LoadingSpinner.tsx
Pattern:
- Multiple sizes (small, medium, large)
- Multiple colors (blue, gray, white)
- Accessibility labels (
role="status",aria-label,aria-live) - Screen reader text with
sr-onlyclass
3. Form Handling Pattern
From: frontend/app/signup/page.tsx
Pattern:
- Separate state for form data, errors, loading, API errors
- Validation function that returns boolean
- Clear errors on input change
- Loading state during submission
- Try-catch for error handling
- Redirect on success
4. ToastNotification Pattern
From: frontend/components/ToastNotification.tsx
Pattern:
- Custom hook for toast management
- Auto-dismiss with duration
- Stack multiple toasts
- Helper methods (success, error, warning, info)
Tailwind CSS Patterns
1. Utility Classes Only
Pattern: Use Tailwind utility classes, no inline styles
2. Conditional Classes with cn() Utility
Pattern: Use cn() from @/lib/utils for conditional classes
3. Dark Mode Support
Pattern: Use dark: prefix for dark mode styles
4. Responsive Design
Pattern: Use breakpoint prefixes (sm:, md:, lg:, xl:)
Accessibility Patterns (WCAG 2.1 AA)
1. ARIA Labels
Pattern: Always provide aria-label for icon-only buttons
2. Semantic HTML
Pattern: Use semantic HTML elements (nav, main, section, article, etc.)
3. Keyboard Navigation
Pattern: Ensure keyboard accessibility for all interactive elements
4. Screen Reader Text
Pattern: Use sr-only class for screen reader-only text
5. Focus Management
Pattern: Always provide visible focus indicators
File Naming Conventions
- Pages: kebab-case (e.g.,
signup.tsx,signin.tsx) - Components: PascalCase (e.g.,
TaskList.tsx,TaskItem.tsx) - Layouts:
layout.tsx - Error Pages:
error.tsx,not-found.tsx
Constitution Requirements
- FR-033: Next.js 16+ App Router structure ✅
- FR-034: Server components default, client when needed ✅
- FR-035: Error boundaries ✅
- FR-036: WCAG 2.1 AA compliance ✅
- FR-037: TypeScript strict mode ✅
- FR-038: Prettier formatting ✅
- FR-039: ESLint rules ✅
References
- Specification:
specs/002-frontend-todo-app/spec.md- Component specifications - Existing Components:
frontend/components/*.tsx- Component examples - Existing Pages:
frontend/app/*.tsx- Page examples
Advanced Component Patterns
1. Drag and Drop Pattern (Phase 7 - T065)
Library: @dnd-kit/core
This is the start of the file. Read the full SKILL.md on GitHub.
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/asmayaseen/frontend-component/SKILL.md
Popularity
- Repository stars
- 429
- Repository forks
- 45
- 7-day trend score
- 30
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/aiskillstore/marketplace/frontend-component)