frontend-patterns

Standardize Next.js App Router frontend patterns with Clerk, shadcn/Radix UI, and PostHog analytics.

395|84|Updated Oct 5, 2025
One-click install
npx skills add https://github.com/bybren-llc/wtfb-safe-agentic-workflow --skill frontend-patterns-bybren-llc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: frontend-patterns
Source: https://github.com/bybren-llc/wtfb-safe-agentic-workflow/tree/main/.claude/skills/frontend-patterns
Command: npx skills add https://github.com/bybren-llc/wtfb-safe-agentic-workflow --skill frontend-patterns-bybren-llc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Frontend patterns for Next.js App Router, Clerk auth, shadcn/Radix UI, and PostHog analytics. Use when building UI components, creating pages, implementing auth flows, or adding analytics events. Ensures consistent UX patterns and accessibility standards.

Core Features & Use Cases

  • Next.js App Router Patterns: server/client components
  • Clerk Authentication: server and client patterns
  • Shadcn UI Patterns: form and component patterns
  • PostHog Analytics: event naming and tracking

Quick Start

Create a protected page using Clerk and track an event with PostHog

Frequently Asked Questions about frontend-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I standardize UI patterns across Next.js App Router with Clerk authentication?

Frontend patterns standardize UI development by enforcing consistent server/client component usage, Clerk authentication flows, and shadcn/ui conventions across Next.js App Router. This ensures secure, accessible components and protected routes follow the same structure throughout your application.

What's the best way to implement protected pages with Clerk in Next.js?

Use dynamic routing with Clerk auth checks on protected pages. The pattern enforces server-side authentication verification and client-component separation, ensuring only authenticated users access sensitive pages while maintaining accessibility standards.

How do I create forms with validation in Next.js using shadcn/ui?

Forms follow React Hook Form and Zod validation patterns with shadcn/ui components. This approach standardizes form structure, error handling, and UX consistency while maintaining accessibility through Radix UI primitives.

Can I track user events with PostHog in a Next.js app using these patterns?

Yes. The pattern defines event naming conventions and tracking integration for PostHog within Next.js components. Events standardize analytics instrumentation across your frontend for consistent data collection.

What's the difference between server and client components in Next.js App Router?

Server components run on the server and reduce client-side JavaScript; client components run in the browser for interactivity. The pattern enforces when to use each based on authentication needs, form handling, and analytics requirements.

Do I need shadcn/ui to build accessible components with these patterns?

Yes. The pattern relies on shadcn/ui's Radix UI foundation for accessibility compliance. Radix provides WCAG-compliant primitives that standardize component behavior and keyboard navigation across your app.