Frontend Engineering
Installation
SKILL.md
Frontend Engineering
When to use
Use this skill when a project needs frontend engineering as a defined workstream: component boundaries, state ownership, data fetching, rendering strategy, or performance work. Combine it with project-orchestration for multi-discipline tasks, and with ux-ui-design / accessibility when the work is design- or WCAG-driven.
Workflow
- Inspect before changing: read the existing framework, conventions, dependencies, component library, and real user flows first. Do not propose a rewrite of patterns that already work.
- Pick the rendering strategy per route, not per app: static, ISR, SSR, client-only, or streaming. Criteria: data freshness, personalization, SEO, and time-to-first-byte budget.
- Define the data layer: server state (query cache) vs client state (UI) vs URL state (shareable) vs form state. Mixing these is the root cause of most frontend bugs.
- Draw the component tree by ownership of state; keep state as low as possible and as close to the consumer as possible. Translate UX specs into semantic components and reusable tokens.
- Model UI state explicitly: loading, empty, failure, retry, stale, and offline for every async view — design all of them before coding.
- Validate input at boundaries and render untrusted text safely; never inject unsanitized input into the DOM.
- Keep components focused: avoid duplicate state and premature abstractions; extract only after the second real use.
- Set budgets up front: JS shipped per route, LCP, INP, CLS. Enforce in CI.
- Run formatter, lint, type checks, and relevant tests, and report the exact results — never claim a check passed unless it ran.