Syntic

Skills may execute instructions and code that could affect your environment. Marketplace scans reduce risk but do not guarantee safety. Always review files, run your own security checks, and use at your own risk.

EngineeringFree Safe

Frontend Architect

Security Scan Summary

Status: Safe

Source: Syntic Skills registry

Automated security scan completed with no high-risk patterns detected. Manual review is still required.

About This Skill

Use when architecting React/Next.js features, optimizing performance, or reviewing frontend design patterns.

Downloadable SKILL.md

Download SKILL.md and place it in your Syntic skills folder. For Syntic Code, install in your local skills directory, review contents, and run in a controlled environment first. Acknowledge the risk notice above to enable the download.

SKILL.md
---
name: Frontend Architect
description: Use when architecting React/Next.js features, optimizing performance, or reviewing frontend design patterns.
category: Engineering
version: 1.0.0
tools: []
---

# Frontend Architecture

Build fast, accessible, maintainable interfaces across React and Next.js.

## Core Stack

- **Framework**: Next.js 14+ App Router, React 18+ Server Components
- **Styling**: Tailwind CSS with design tokens, CSS Modules for animations
- **State**: TanStack Query (server), Zustand (client)
- **Forms**: React Hook Form + Zod validation
- **Testing**: Vitest (units), Playwright (e2e), Testing Library (integration)

## Component Architecture

- Default to Server Components. Add `'use client'` only for hooks/events/browser APIs.
- Structure: page > layout > feature > UI primitive.
- Co-locate: ComponentName/index.tsx, ComponentName.test.tsx, types.ts.
- Extract UI primitives → components/ui/.
- Keep components under 150 lines.

## Performance Standards

Core Web Vitals targets: LCP < 2.5s, FID < 100ms, CLS < 0.1.
- Use `next/image` with explicit width/height (prevent layout shift).
- Lazy load below-fold: `dynamic(() => import(...), { ssr: false })`.
- `React.memo` only on expensive renders with stable primitive props.
- Prefetch likely routes: `<Link prefetch>`.
- Bundle check: no chunk > 200KB gzipped.

## Rendering Strategy

- **SSG**: Content changing < 1/hour. Use `generateStaticParams`.
- **SSR**: Personalized or fresh data needed per request.
- **ISR**: Periodic changes. Set `revalidate` based on freshness needs.
- **Client-side fetch**: Real-time only (chat, notifications, live dashboards).

## Data Fetching

- Server Components: `async/await` direct fetch. No useEffect for initial loads.
- TanStack Query for client-side data: caching, refetching, optimistic updates.
- Suspense boundaries + `loading.tsx` for loading states.
- `error.tsx` boundary files for error handling.

## Accessibility

- Keyboard accessible: Tab, Enter, Space, Escape all work.
- Semantic HTML: `<button>` (actions), `<a>` (nav), `<nav>`, `<main>`, `<aside>`.
- Icon-only buttons: add `aria-label`.
- Dynamic regions: add `aria-live="polite"`.
- Color contrast WCAG AA: 4.5:1 (normal text), 3:1 (large).
- Test with VoiceOver (macOS), NVDA (Windows).

## Styling Conventions

- Tailwind for layout/spacing/typography.
- Extract repeated classes into component variants (not @apply).
- CSS custom properties for theme values.
- Dark mode via `dark:` variant. Respect `prefers-color-scheme`.
- Avoid inline styles except calculated positions.

## State Management

- Server state (API) → TanStack Query. Client state (UI toggles) → Zustand/context.
- Never duplicate server state into client stores.
- URL state (`useSearchParams`) for filters/pagination/view modes (shareable).
- Avoid global for single-subtree data; use composition instead.

## Before Completing

- Run `tsc --noEmit` for type safety.
- Check Lighthouse scores for affected pages.
- Verify keyboard navigation end-to-end.
- Test responsive: 320px, 768px, 1024px, 1440px breakpoints.

Bundle Download

Includes SKILL.md and bundled support files where provided. Risk acknowledgement is required.

Install Targets

Syntic App

  1. 1. Create a dedicated folder for this skill in your local skills library.
  2. 2. Place SKILL.md into that folder.
  3. 3. Restart Syntic and invoke this skill on matching tasks.

Syntic Code (CLI)

  1. 1. Save SKILL.md in your local Syntic Code skills directory.
  2. 2. Keep related files in the same skill folder.
  3. 3. Run in a safe environment and validate outputs.

Source

https://github.com/rohitg00/awesome-claude-code-toolkit/blob/main/agents/core-development/frontend-architect.md

Open Source Link
Engineering

Related Skills