Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Web Frontend Architecture?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/vectora-os-web-frontend-architecture)
---
name: web-frontend-architecture
description: Frontend architecture — rendering modes (CSR, SSR, SSG, streaming, islands), routing and code splitting, state categories (server, URL, local, global), performance budgets (Core Web Vitals), micro-frontends trade-offs, security (XSS, CSP). Use to structure frontends or choose rendering approaches (frontend architecture, SSR, code splitting, Core Web Vitals).
metadata:
category: languages-frameworks
---
# Web frontend architecture
## Purpose
Structure frontends for performance, maintainability and safety.
**Use when:** new frontends or major frontend restructuring.
**Not for:** single components; tokens and the component library (`design-system`).
## Inputs
- Product needs, SEO, performance budgets.
## Outputs
- Frontend architecture note, budgets, structure.
## Read first
- [Project Brain](../../../project-brain/README.md) — `npm run brain -- query "web frontend architecture"` for prior decisions, patterns and anti-patterns.
- [Performance standard](../../../standards/performance.md)
## Steps
1. **Rendering.** Pick rendering mode per route by SEO and interactivity.
Done when each route has a mode.
2. **State.** Classify state; keep server state in a cache library, filters in the URL.
Done when no global store for server data.
3. **Budgets.** Set bundle and Web Vitals budgets as CI checks.
Done when budgets enforced.
4. **Security.** CSP, no `innerHTML` with untrusted data, dependency hygiene.
Done when CSP deployed.
## Best practices
- Route-level code splitting by default.
- Design tokens as the single styling source.
## Common mistakes
- Micro-frontends for a single team.
- Global state for everything.
## Example
Marketing SSG, dashboard CSR with route splitting; LCP budget 2.5 s in CI via Lighthouse.
## Reusable prompt
```text
Apply the Web frontend architecture skill (.agents/skills/web-frontend-architecture/SKILL.md).
Context: {{task card or question; links to PRD, ADRs, code paths}}
Constraints: {{approved thresholds, deadlines, allowed files}}
Propose the frontend architecture: rendering per route, state categories, budgets and security headers.
Return: Frontend architecture note, budgets, structure..
Cite evidence (file:line, command output, source) for every claim; list open questions separately.
```