Back to list
vasilyu1983

software-frontend

by vasilyu1983

25🍴 6📅 Jan 23, 2026

SKILL.md


name: software-frontend description: 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.

Frontend Engineering Skill — Quick Reference

This skill equips frontend engineers with execution-ready patterns for building modern web applications with Next.js, React, TypeScript, and Tailwind CSS. Apply these patterns when you need component design, state management, routing, forms, data fetching, animations, accessibility, or production-grade UI architectures.

Modern Best Practices (January 2026): Next.js 16 with Turbopack (stable, default bundler), middleware.ts → proxy.ts migration (clarifies network boundary, runs on Node.js runtime), DevTools MCP (AI agent integration), Cache Components ("use cache" directive for opt-in caching), React Compiler (automatic re-render optimization), React 19.2 with Server Components, Actions, Activity component, enhanced ISR/SSR/SSG, partial prerendering (PPR), Zustand/Recoil as Redux alternatives (Redux declining), TanStack Query (React Query) for server-state, TypeScript 5.9+ strict mode (TypeScript 7 "Corsa" Go-based 10x faster compiler mid-2026), satisfies operator, Tailwind CSS v4 (CSS-first config, 5x faster builds), Vitest 4.0 Browser Mode (stable), and progressive enhancement patterns.

Next.js 16 Breaking Changes: Upgrade Guide | Declining in 2026: Redux, CSS-in-JS, Create React App


Quick Reference

TaskTool/FrameworkCommandWhen to Use
Next.js AppNext.js 16 + Turbopacknpx create-next-app@latestFull-stack React apps, SEO, SSR/SSG
Vue AppNuxt 4npx nuxi@latest initVue ecosystem, auto-imports, Nitro server
Angular AppAngular 21ng newEnterprise apps, zoneless change detection, esbuild
Svelte AppSvelteKit 2.49+npm create svelte@latestPerformance-first, minimal JS, Svelte 5 runes
React SPAVite + Reactnpm create vite@latestClient-side apps, fast dev server
UI Componentsshadcn/ui + Radix UInpx shadcn@latest initAccessible components, Tailwind v4 styling
FormsReact Hook Form + Zodnpm install react-hook-form zodType-safe validation, performance
State ManagementZustand/Recoilnpm install zustandLightweight global state
Server StateTanStack Querynpm install @tanstack/react-queryAPI caching, server-state sync
TestingVitest + Testing Libraryvitest runUnit/component tests, fast execution

When to Use This Skill

Use this skill when you need:

  • Next.js 16 application architecture and setup (Turbopack stable, App Router, React 19)
  • React component design and patterns (functional components, hooks, Server Components)
  • TypeScript type definitions for UI (strict mode, satisfies operator, discriminated unions)
  • Tailwind CSS styling and responsive design (utility-first, dark mode variants)
  • shadcn/ui component integration (Radix UI + Tailwind)
  • Form handling and validation (React Hook Form + Zod, Server Actions)
  • State management (Zustand/Recoil for client state, TanStack Query for server state)
  • Data fetching (Server Components, TanStack Query/SWR, Server Actions, streaming)
  • Authentication flows (NextAuth.js, Clerk, Auth0)
  • Route handling and navigation (App Router, parallel routes, intercepting routes)
  • Performance optimization (Turbopack, Image optimization, code splitting, ISR/SSR/SSG)
  • Accessibility (WCAG 2.2, ARIA, keyboard navigation, screen reader testing) https://www.w3.org/TR/WCAG22/
  • Animation and transitions (Framer Motion, Tailwind animations)
  • Testing (Vitest for unit tests, Testing Library for components, Playwright for E2E)

Decision Tree: Frontend Framework Selection

Project needs: [Framework Choice]
    ├─ React ecosystem?
    │   ├─ Full-stack + SEO → Next.js 16 (App Router, React 19.2, Turbopack stable)
    │   ├─ Progressive enhancement → Remix (loaders, actions, nested routes)
    │   └─ Client-side SPA → Vite + React (fast dev, minimal config)
    │
    ├─ Vue ecosystem?
    │   ├─ Full-stack + SSR → Nuxt 4 (auto-imports, Nitro server, file-based routing)
    │   └─ Client-side SPA → Vite + Vue 3.5+ (Composition API, script setup)
    │
    ├─ Angular preferred?
    │   └─ Enterprise app → Angular 21 (zoneless change detection, esbuild, signals)
    │
    ├─ Performance-first?
    │   └─ Minimal JS bundle → SvelteKit 2.49+ (Svelte 5.45 runes, compiler magic)
    │
    ├─ Component library?
    │   ├─ Headless + customizable → shadcn/ui + Radix UI + Tailwind
    │   ├─ Material Design → MUI (Material-UI)
    │   └─ Enterprise UI → Ant Design
    │
    ├─ State management?
    │   ├─ Server data → TanStack Query/SWR (caching, sync)
    │   ├─ Global client state → Zustand (lightweight) or Jotai (atomic)
    │   ├─ Complex state logic → XState (state machines)
    │   ├─ URL-based state → useSearchParams (shareable filters)
    │   └─ ⚠️ DECLINING: Redux (use Zustand instead)
    │
    ├─ Styling approach?
    │   ├─ Utility-first → Tailwind CSS v4 (CSS-first config, 5x faster builds)
    │   ├─ CSS Modules → Built-in CSS Modules
    │   └─ ⚠️ DECLINING: CSS-in-JS (Styled Components, Emotion)
    │
    └─ Testing strategy?
        ├─ Unit/Component → Vitest + Testing Library (fast, modern)
        ├─ E2E → Playwright (cross-browser, reliable)
        └─ Visual regression → Chromatic or Percy

Framework Selection Factors:

  • Team experience: Choose what the team knows or can learn quickly
  • SSR/SSG requirements: Next.js, Nuxt, Remix for server-side rendering
  • Performance constraints: SvelteKit for minimal JS, Next.js for optimization
  • Ecosystem maturity: React has largest ecosystem, Vue/Angular are also mature

See references/ for framework-specific best practices.


Next.js 16 Migration: middleware.ts → proxy.ts

Breaking Change (Dec 2025): The middleware convention is renamed to proxy in Next.js 16.

Why the Change?

  • Clarity: "Proxy" better describes the network boundary behavior (runs in front of the app)
  • Runtime: proxy.ts runs on Node.js runtime (not Edge by default)
  • Avoid confusion: Prevents confusion with Express.js middleware patterns

Migration Steps

# 1. Run the codemod (recommended)
npx @next/codemod@canary upgrade latest

# 2. Or manually rename
mv middleware.ts proxy.ts
// Before (Next.js 15)
export function middleware(request: Request) {
  // ... logic
}

// After (Next.js 16)
export function proxy(request: Request) {
  // ... logic
}
// next.config.ts - Update config option
const nextConfig: NextConfig = {
  skipProxyUrlNormalize: true, // was: skipMiddlewareUrlNormalize
}

Runtime Considerations

Featureproxy.ts (Next.js 16)middleware.ts (legacy)
Default RuntimeNode.jsEdge
Edge SupportNot supportedSupported
Use CaseAuth, rewrites, redirectsEdge-first apps

⚠️ Keep using middleware.ts if you need Edge Runtime. The proxy convention does NOT support Edge.

  • Async Request APIs: cookies(), headers(), params, searchParams are now async
  • Turbopack default: Remove --turbopack flags from scripts
  • Parallel routes: Require explicit default.js files
  • Image changes: domains deprecated (use remotePatterns), new default cache TTL

Next.js 16 New Features (January 2026)

DevTools MCP Integration

Next.js 16 introduces DevTools MCP (Model Context Protocol), connecting AI agents directly to your application's runtime context.

FeatureAI Capability
Routing contextAI understands App Router structure automatically
Caching semanticsAI knows when/how cache invalidates
Rendering behaviorAI explains SSR/SSG/ISR decisions
Component hierarchyAI navigates Server/Client component boundaries

Benefit: Your AI assistant (Copilot, Cursor, Claude) understands Next.js framework concepts without manual explanation.

Cache Components ("use cache")

Next.js 16 replaces implicit caching with explicit opt-in caching. Dynamic code executes at request time by default — no surprise caching.

// Cache a page
export default async function Page() {
  "use cache";
  const data = await fetchData();
  return <ProductList data={data} />;
}

// Cache a function
async function getProducts() {
  "use cache";
  return db.query('SELECT * FROM products');
}

// Cache a component
async function ExpensiveComponent() {
  "use cache";
  const result = await heavyComputation();
  return <div>{result}</div>;
}
Caching ApproachNext.js 15Next.js 16
Default behaviorImplicit cachingNo caching (explicit opt-in)
Cache directiveN/A"use cache"
GranularityRoute-levelPage, component, or function level
PredictabilitySurprise cachingExplicit, predictable

React Compiler Integration

Next.js 16 includes built-in support for the React Compiler (formerly React Forget). It automatically optimizes components by reducing unnecessary re-renders.

// next.config.ts
const nextConfig: NextConfig = {
  experimental: {
    reactCompiler: true, // Enable React Compiler
  },
};

What it does:

  • Automatically memoizes components (no manual useMemo/useCallback)
  • Eliminates re-renders from unchanged props
  • Zero config — compiler analyzes and optimizes automatically

Migration: Remove manual useMemo, useCallback, React.memo — the compiler handles it.

Next.js 15 → 16 Migration Checklist

StepActionCommand/Change
1Update Next.jsnpm install next@16
2Update Node.jsNode 20.9+ required
3Rename middlewaremv middleware.ts proxy.ts
4Update exportexport function proxy()
5Make APIs asyncawait cookies(), await headers()
6Remove Turbopack flagDelete --turbopack from scripts
7Add default.jsRequired for parallel routes
8Update image configremotePatterns instead of domains
9Run codemodnpx @next/codemod@canary upgrade latest
10Test thoroughlyVerify caching behavior changed

TypeScript 7 "Corsa" (Mid-2026)

TypeScript 7, codenamed Project Corsa, is a complete rewrite of the compiler in Go.

FeatureTypeScript 5.9TypeScript 7 "Corsa"
Compiler languageJavaScriptGo
Build speedBaseline10x faster
Strict modeOpt-inDefault
ES5 targetSupportedDropped
AMD/UMD/SystemJSSupportedRemoved
Classic Node resolutionSupportedRemoved

TypeScript 5.9 Features (Current)

// Import defer — deferred module evaluation
import defer * as analytics from './analytics';

// Module loads only when accessed
function trackEvent(event: string) {
  analytics.track(event); // Loads analytics module here
}

// Expandable hovers in VS Code
// Click + to expand type details, - to collapse

Migration Path

TypeScript 5.9 (current) → TypeScript 6.0 (bridge) → TypeScript 7.0 (Corsa)
                           Deprecation warnings        Breaking changes

Prepare now: Enable strict mode, remove ES5 targets, migrate from AMD/UMD.


Vitest 4.0 Browser Mode (Stable)

Vitest Browser Mode is now stable in Vitest 4.0, enabling real browser-based component testing.

// vitest.config.ts
import { defineConfig } from 'vitest/config';

export default defineConfig({
  test: {
    browser: {
      enabled: true,
      provider: 'playwright', // or 'webdriverio'
      name: 'chromium',
    },
  },
});
// Button.test.tsx — runs in real browser
import { render, screen } from '@testing-library/react';
import { Button } from './Button';

test('renders button with text', async () => {
  render(<Button>Click me</Button>);
  await expect.element(screen.getByRole('button')).toHaveTextContent('Click me');
});
Testing LayerToolEnvironmentSpeed
Unit testsVitestNode/jsdomFastest
Component testsVitest Browser ModeReal browserFast
E2E testsPlaywrightReal browserSlower

Best practice: Use Vitest for unit/component tests, Playwright for E2E. They complement each other.


React 19.2 Patterns (January 2026)

Security Note (React Server Components)

Partial Prerendering (PPR)

Pre-render static shell, stream dynamic content.

// Next.js 16 with PPR enabled
// next.config.js
export default {
  experimental: {
    ppr: true, // Enable Partial Prerendering
  },
};

// Page component
export default async function Page() {
  return (
    <main>
      <Header /> {/* Static: pre-rendered */}
      <Suspense fallback={<Skeleton />}>
        <DynamicContent /> {/* Dynamic: streamed */}
      </Suspense>
      <Footer /> {/* Static: pre-rendered */}
    </main>
  );
}

use() Hook Pattern

Promise resolution in components with Suspense.

// Before: useEffect + useState
const [data, setData] = useState(null);
useEffect(() => {
  fetchData().then(setData);
}, []);

// After: use() hook (React 19+)
const data = use(fetchDataPromise);

Error Boundary Patterns

'use client';

import { ErrorBoundary } from 'react-error-boundary';

function ErrorFallback({ error, resetErrorBoundary }) {
  return (
    <div role="alert">
      <p>Something went wrong:</p>
      <pre>{error.message}</pre>
      <button onClick={resetErrorBoundary}>Try again</button>
    </div>
  );
}

export default function App() {
  return (
    <ErrorBoundary FallbackComponent={ErrorFallback}>
      <MyComponent />
    </ErrorBoundary>
  );
}

Performance Budgets

MetricTargetToolSEO Impact
LCP (Largest Contentful Paint)<= 2.5sLighthouse / web-vitalsMobile-first indexing threshold
INP (Interaction to Next Paint)<= 200msChrome DevTools / web-vitals https://web.dev/vitals/User engagement signals
CLS (Cumulative Layout Shift)<= 0.1Lighthouse / web-vitalsCore Web Vitals ranking factor
TTFB (Time to First Byte)< 600msLighthouseCrawl rate — slow servers = fewer pages crawled
Bundle size (JS)Project budget [Inference]bundle analyzerAffects LCP and crawlability

SSR/SSG and SEO Indexation

Rendering StrategySEO BenefitWhen to Use
SSG (Static)Pre-rendered HTML, fastest TTFB, best crawlabilityContent that rarely changes
SSR (Server)Fresh content, good crawlabilityDynamic but SEO-critical pages
ISR (Incremental)Static + freshness, balanced crawlabilityFrequently updated content
CSR (Client)Poor crawlability without workaroundsNon-SEO apps, dashboards

Key insight: Google crawls rendered HTML. Server-rendered content indexes faster and more reliably than client-rendered JavaScript.


Production Deployment Checklist

Pre-Deployment

  • Run npm run build — verify no build errors
  • Run npm run lint — zero ESLint errors
  • Run npm run typecheck — zero TypeScript errors
  • Run vitest run — all tests passing
  • Run playwright test — E2E tests passing
  • Check bundle size — within project budget
  • Verify environment variables — all required vars set

Performance Audit

  • Lighthouse score >= 90 (Performance)
  • LCP <= 2.5s on mobile
  • INP <= 200ms
  • CLS <= 0.1
  • No layout shifts from dynamic content
  • Images optimized (WebP/AVIF, responsive)
  • Fonts preloaded or using font-display: swap

Security Audit

  • CSP headers configured
  • No secrets in client bundle
  • API routes protected (auth checks)
  • HTTPS enforced
  • Rate limiting on API routes
  • Input validation on all forms

Accessibility Audit

  • axe DevTools — zero critical issues
  • Keyboard navigation works
  • Focus indicators visible
  • Screen reader tested (VoiceOver/NVDA)
  • Color contrast >= 4.5:1
  • Alt text on all images

SEO Checklist

  • Metadata API configured (title, description)
  • Open Graph images generated
  • sitemap.xml generated
  • robots.txt configured
  • Canonical URLs set
  • Structured data (JSON-LD) where applicable

Optional: AI/Automation Extensions

Note: AI design and development tools. Skip if not using AI tooling.

AI Design Tools

ToolUse Case
v0.devUI generation from prompts
Vercel AI SDKStreaming UI, chat interfaces
Figma AIDesign-to-code prototypes
VisilyWireframe generation

AI-Powered Testing

ToolUse Case
Playwright AISelf-healing selectors
TestimAI-generated test maintenance
ApplitoolsVisual AI testing

Optional Related Skills


Resources (Framework-specific best practices)

Shared Utilities (Centralized patterns — extract, don't duplicate)

Templates (Production-ready starters by framework)

Related Skills


Trend Awareness Protocol

IMPORTANT: When users ask recommendation questions about frontend development, you MUST use WebSearch to check current trends before answering.

Trigger Conditions

  • "What's the best frontend framework for [use case]?"
  • "What should I use for [state management/routing/styling]?"
  • "What's the latest in React/Next.js/Vue?"
  • "Current best practices for [SSR/RSC/hydration]?"
  • "Is [framework/library] still relevant in 2026?"
  • "[Next.js] vs [Remix] vs [Nuxt]?"
  • "Best component library for [framework]?"

Required Searches

  1. Search: "frontend development best practices 2026"
  2. Search: "[React/Next.js/Vue] updates January 2026"
  3. Search: "frontend framework comparison 2026"
  4. Search: "[specific library] vs alternatives 2026"

What to Report

After searching, provide:

  • Current landscape: What frameworks/libraries are popular NOW
  • Emerging trends: New patterns or tools gaining traction
  • Deprecated/declining: Approaches that are losing relevance
  • Recommendation: Based on fresh data and recent releases
  • React 19 features and adoption
  • Next.js 15/16 updates and App Router patterns
  • Vue 3 Composition API vs Options API
  • Server Components and streaming SSR
  • Tailwind CSS v4 and styling trends
  • Component libraries (shadcn/ui, Radix, Ark UI)

Operational Playbooks

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon