skills/frontend-architecture/SKILL.md
Recommends and scaffolds frontend technology stack for new projects. Use when starting a new frontend project, selecting a framework, setting up a web app from scratch, or when the user asks about frontend tech stack, scaffolding, or architecture selection. Covers React/Next.js/Astro/Vue, TypeScript, Tailwind CSS, state management, data fetching, UI components, testing, and monorepo setup.
npx skillsauth add hicker-kin/ai-context frontend-architectureInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Guides frontend technology stack selection and project scaffolding for new or empty projects.
Before recommending a stack, MUST ask (or infer from context):
| Question | Options | Impact | |----------|---------|--------| | Rendering mode | SPA / SSR / SSG / Hybrid | Determines framework | | Content type | Dashboard / Landing / Docs / App | Determines UI library | | SEO required? | Yes / No | SSR vs SPA decision | | Backend API | REST / GraphQL / gRPC-Web | Data layer strategy | | Team size | Solo / Small / Large | Monorepo strategy | | Backend stack | Go / Node / Other | Type-safe client gen |
When requirements are general-purpose (no strong constraints), recommend this stack:
Framework: Next.js 15 (App Router) # SSR + SPA hybrid, SEO-friendly
Language: TypeScript 5.x (strict) # Non-negotiable
Build: Turbopack (built-in Next.js) / Vite (standalone SPA)
Styling: Tailwind CSS v4
UI Components: Ant Design v5
Global State: Zustand
Server State: TanStack Query v5
Forms: React Hook Form + Zod
Package Mgr: pnpm (preferred)
Testing: Vitest + Testing Library + Playwright (E2E)
Linting: ESLint v9 (flat config) + Prettier
Use the decision tree below, then see stacks.md for full matrices.
New Frontend Project
│
├─ SEO / SSR required? ──────▶ Next.js 15 (App Router)
│
├─ Content / Docs / Blog? ───▶ Astro 5
│
├─ Vue team? ────────────────▶ Nuxt 3 (mirrors Next.js)
│
└─ General SPA ──────────────▶ React 19 + Vite + Ant Design v5
After the user confirms the tech stack, MUST update (or create) the project's README.md with a Tech Stack section.
Template to insert/append:
## Tech Stack
| Layer | Choice |
|-------|--------|
| Framework | <!-- e.g. Next.js 15 (App Router) --> |
| Language | TypeScript 5.x (strict) |
| Build | <!-- e.g. Turbopack / Vite --> |
| Styling | <!-- e.g. Tailwind CSS v4 --> |
| UI Components | <!-- e.g. Ant Design v5 --> |
| Global State | <!-- e.g. Zustand --> |
| Server State | <!-- e.g. TanStack Query v5 --> |
| Forms | <!-- e.g. React Hook Form + Zod --> |
| Package Manager | pnpm |
| Testing | Vitest + Testing Library + Playwright |
| Linting | ESLint v9 + Prettier |
Rules:
README.md already exists: append the Tech Stack section; do NOT overwrite existing content.README.md does not exist: create it with project name as heading and the Tech Stack section.When the backend is Go (common in this workspace):
defaultOptions or axios interceptorAfter README.md is updated, run the appropriate init commands.
See templates/nextjs.md, templates/vite-spa.md, or templates/astro.md for exact commands.
Follow Feature-Sliced Design (aligned with Go Clean Architecture on the backend):
src/
├── app/ # App-level setup: providers, router, global styles
├── pages/ # Route-level components (or Next.js app/ dir)
├── features/ # Feature modules: each has ui/, model/, api/
├── shared/ # Reusable: ui components, lib, types, hooks
└── entities/ # Domain models (aligned with backend domain layer)
strict: true enabled in tsconfig@/) configured in tsconfig and build toolenv.d.ts or t3-env)queryKeys.ts filedevelopment
Guides Go development to follow project architecture and code style rules. Use when implementing or reviewing Go code, adding features, refactoring, or when the user asks to follow project rules or standards. Ensures compliance with ai_go/v1/rules (project_architecture.md, code_style.md) and .cursor/rules.
development
Use when adding or configuring structured logging in Go projects, integrating zap-based log with request context, or when the user asks about logging. Places log package under pkg/logs for new projects.
development
Use when implementing JWT token signing or verification in Go projects. Covers ES256 (ECDSA, recommended), PS256/RS256 (RSA asymmetric), and HS256 (HMAC symmetric) signing methods, with keys loaded from file path or inline string. Places the jwt package under pkg/jwt for new projects.
tools
Use when writing or reviewing Go imports, especially when a repository has existing formatting automation or import-grouping conventions that must be preserved.