Frontend development skill for React, Next.js, Tailwind CSS, and TypeScript. Use when implementing web frontend features.
Implements React/Next.js features using TypeScript and Tailwind CSS. Use when building web UI components, pages, or handling client/server component patterns.
/plugin marketplace add shabaraba/shabaraba-cc-plugins/plugin install claude-org@shabaraba-cc-pluginsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Platform-specific knowledge for web frontend development.
| Component | Technology |
|---|---|
| Framework | Next.js 14+ (App Router) |
| Language | TypeScript (strict mode) |
| Styling | Tailwind CSS |
| State | React hooks, Zustand (if needed) |
| Testing | Vitest, Playwright |
| Deployment | Cloudflare Pages |
PascalCasekebab-case.tsx or PascalCase.tsx (follow project)camelCaseSCREAMING_SNAKE_CASE// 1. External imports
import { useState } from 'react'
import { clsx } from 'clsx'
// 2. Internal imports
import { Button } from '@/components/ui/button'
import { useUser } from '@/hooks/use-user'
// 3. Types
interface Props {
title: string
onSubmit: () => void
}
// 4. Component
export function FeatureCard({ title, onSubmit }: Props) {
const [isOpen, setIsOpen] = useState(false)
return (
// ...
)
}
// Prefer composition over props drilling
export function Card({ children }: { children: React.ReactNode }) {
return <div className="rounded-lg border p-4">{children}</div>
}
Card.Header = function CardHeader({ children }: { children: React.ReactNode }) {
return <div className="font-bold">{children}</div>
}
Card.Body = function CardBody({ children }: { children: React.ReactNode }) {
return <div className="mt-2">{children}</div>
}
// Use clsx for conditional classes
import { clsx } from 'clsx'
<button
className={clsx(
'rounded px-4 py-2',
isActive ? 'bg-blue-500 text-white' : 'bg-gray-200'
)}
/>
// Extract common patterns
const buttonVariants = {
primary: 'bg-blue-500 text-white hover:bg-blue-600',
secondary: 'bg-gray-200 text-gray-800 hover:bg-gray-300',
}
# Install dependencies
pnpm install # or npm install
# Development
pnpm dev
# Type check
pnpm typecheck # or tsc --noEmit
# Lint
pnpm lint
# Build
pnpm build
# Test
pnpm test
app/
├── layout.tsx # Root layout
├── page.tsx # Home page
├── (marketing)/ # Route group (no URL segment)
│ ├── about/
│ │ └── page.tsx
│ └── pricing/
│ └── page.tsx
├── dashboard/
│ ├── layout.tsx # Dashboard layout
│ └── page.tsx
└── api/
└── route.ts # API route
// Server Component (default) - no 'use client'
async function ServerComponent() {
const data = await fetch('...') // Can fetch directly
return <div>{data}</div>
}
// Client Component - needs interactivity
'use client'
import { useState } from 'react'
function ClientComponent() {
const [count, setCount] = useState(0)
return <button onClick={() => setCount(c => c + 1)}>{count}</button>
}
// Server Component
async function Page() {
const data = await fetch('https://api.example.com/data', {
next: { revalidate: 60 } // ISR: revalidate every 60s
})
return <div>{data}</div>
}
// Client Component with SWR
'use client'
import useSWR from 'swr'
function ClientPage() {
const { data, error } = useSWR('/api/data', fetcher)
if (error) return <div>Error</div>
if (!data) return <div>Loading...</div>
return <div>{data}</div>
}
import { describe, it, expect } from 'vitest'
import { render, screen } from '@testing-library/react'
import { Button } from './button'
describe('Button', () => {
it('renders children', () => {
render(<Button>Click me</Button>)
expect(screen.getByText('Click me')).toBeInTheDocument()
})
})
import { test, expect } from '@playwright/test'
test('home page', async ({ page }) => {
await page.goto('/')
await expect(page.getByRole('heading', { name: 'Welcome' })).toBeVisible()
})
suppressHydrationWarning for dynamic contentcontent paths in tailwind.config.jsThis skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.