frontend-patterns
Skill2 starsChanged 2 months agoMITView on GitHub
Language- and framework-neutral frontend architecture patterns. Use when designing or reviewing component interfaces, route boundaries, UI state ownership, server-data synchronization, rendering strategy, interaction and accessibility, browser performance, or client privacy and observability; choose patterns from explicit user, platform, and operational constraints, route specialized work to its owner, then map decisions to the project's existing stack.
87 other projects use a version of this.
Adopted by
Most recently taken up by
- Rojios/everything-claude-codetheir own version, first seen Nov 8, 2026
- lhbsaa/apex-unifiedtheir own version, first seen Nov 8, 2026
- ahmadvahidi/skill-atlastheir own version, first seen Nov 8, 2026
- smart-coder-labs/nexus-mindtheir own version, first seen Nov 8, 2026
- Ashfaqbs/ai-coding-agent-toolkittheir own version, first seen Nov 8, 2026
- KbWen/agentic-ostheir own version, first seen Nov 7, 2026
Used with
Projects with it also use brand-discovery, agent-sort and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
ysyecustSkillbrand-discovery
Use when a brand needs to discover or articulate its identity through structured multi-session interviews. Covers purpose, positioning, audience, personality, voice, narrative, and founder-brand tension across 8 modules using laddering, 5 Whys, and projective techniques. Produces a resumable session with disk-persisted state and a master brandbook (90_SYNTHESIS.md).
Also in 6 projects that use this
niloykumarbarmanSkillagent-sort
Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.
Also in 14 projects that use this
royaluniondesign-sysSkillconfigure-ecc
Interactive installer for Everything Claude Code — guides users through selecting and installing skills and rules to user-level or project-level directories, verifies paths, and optionally optimizes installed files.
Also in 12 projects that use this
loulanyueSkillnuxt4-patterns
Nuxt 4 app patterns for hydration safety, performance, route rules, lazy loading, and SSR-safe data fetching with useFetch and useAsyncData.
Also in 10 projects that use this
ronmkrSkillvite-patterns
Vite build tool patterns including config, plugins, HMR, env variables, proxy setup, SSR, library mode, dependency pre-bundling, and build optimization. Activate when working with vite.config.ts, Vite plugins, or Vite-based projects.
Also in 8 projects that use this
royaluniondesign-sysSkillcontent-hash-cache-pattern
Cache expensive file processing results using SHA-256 content hashes — path-independent, auto-invalidating, with service layer separation.
Also in 16 projects that use this
Other versions87 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 87
- affaan-m/ECC★ 246ksame name
- rommapp/romm★ 14ksame name
- xu-xiang/everything-claude-code-zh★ 1.9ksame name
- bybren-llc/safe-agentic-workflow★ 405same name
- loulanyue/awesome-claude-notes★ 272same name
- KbWen/agentic-os★ 229same name
- cloudnative-co/claude-code-starter-kit★ 153same name
- tpavanipradeep/everything-claude-code★ 104same name
- mturac/everything-openai-codex★ 89same name
- mit-network/everything-claude-code★ 76same name
77 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository25 other files it gives its agents.
- AGENTS.mdAGENTS.md
- humanizer-zhSkill
- backend-patternsSkill
- security-reviewSkill
- fastapiSkill
- python-projectSkill
- ts-backendSkill
- ts-frontendSkill
- readmeSkill
- codebase-designSkill
- code-reviewSkill
- coding-standardsSkill
- domain-modelingSkill
- fixSkill
- grillingSkill
- living-docs-governanceSkill
- planSkill
- prototypeSkill
- publish-ticketsSkill
- resilienceSkill
- session-handoffSkill
- specSkill
- systematic-debuggingSkill
- tddSkill
- verificationSkill
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 10 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 26 edited versions we read keep these.
10
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 24
Read canonical project vocabulary and accepted UX requirements when present.
- Distinctive: line 44
Read only the references needed for the active branch:
- Distinctive: line 75
Use the project's native routes, modules, components, browser APIs, framework primitives, design tokens, data clients, telemetry, and test …
- Distinctive: line 89
Read the Verification section of every selected branch reference.
- Distinctive: line 95
Treat components, hooks, stores, routes, and design systems as ownership mechanisms, not maturity levels.
- Distinctive: line 96
Keep state at the narrowest authoritative owner.
- Distinctive: line 97
Put navigable, shareable state in the URL when its representation and privacy permit it.
- Distinctive: line 98
Treat server-state caches and offline replicas as replicated views with freshness, conflict, invalidation, and recovery policies.
- Distinctive: line 100
Use optimistic presentation only when operation identity, duplicate safety, reconciliation, rejection, and user correction are defined.
- Distinctive: line 101
Prefer native platform semantics and progressive enhancement before recreating controls or navigation in script.
- Distinctive: line 102
Treat the browser as an untrusted, interruptible, resource-constrained client.
- Very specific: line 104
Keep remote failure policy singular: consume resilience budgets and classifications rather than inventing retries inside components or data …
“Common” is measured: kept by at least 6 in 10 of the 26 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Frontend Patterns
Choose frontend patterns from user-visible invariants and platform constraints. Preserve the project's framework, design system, browser policy, and established architecture unless evidence justifies a change.
Workflow
1. Establish the context
Inspect the repository and state:
- target journeys, interaction model, content hierarchy, and accepted behavior from a spec or other authoritative source;
- runtime and rendering model: browser-only, request-rendered, prerendered, streamed, hybrid, embedded, or native shell;
- component interfaces and seams; route, deployment, trust, and server/client boundaries; state and data ownership;
- data authority, mutation paths, cache ownership, network conditions, and offline expectations;
- supported browsers, devices, input modalities, locales, assistive technologies, and progressive-enhancement requirements;
- measured performance, bundle and asset constraints, privacy obligations, telemetry, and operational capabilities;
- existing framework, router, design-system, styling, testing, and delivery conventions.
Read canonical project vocabulary and accepted UX requirements when present. If desired behavior is unresolved, route it to spec; if one visual or state-model question needs throwaway evidence, invoke prototype rather than designing production architecture around a guess.
Completion criterion: every relevant constraint is supported by repository or authoritative product evidence, or explicitly marked as an assumption.
2. Define the problem and invariant
Describe the recurring pressure without naming a solution. State the user-visible or system invariant any acceptable design must preserve.
Examples:
- A slower search response can replace a newer result. Invariant: only the latest accepted query may update the visible result.
- A filter must survive reload and sharing. Invariant: the URL reconstructs the same navigable state.
- A dialog works with a pointer but loses keyboard focus. Invariant: every supported input modality can complete the action and focus returns predictably.
- Optimistic state diverges after rejection. Invariant: confirmed server state eventually becomes authoritative without duplicating the effect.
- Server and browser renders disagree. Invariant: the first client render preserves the server-rendered semantics and identity.
Completion criterion: the affected user journey, ownership seam, and observable correctness condition are explicit.
3. Select the relevant pattern family
Read only the references needed for the active branch:
| Problem branch | Reference or owner |
| Component, feature, design-system, or adapter interfaces and seams | references/composition-and-interfaces.md; consume codebase-design vocabulary for module depth and seams |
| Local, shared, URL, workflow, form, server, optimistic, or synchronized state | references/state-data-and-effects.md |
| Route and navigation architecture, client/request rendering, prerendering, streaming, hydration, assets, or browser delivery | references/rendering-and-delivery.md |
| Forms, keyboard, focus, announcements, motion, responsive interaction, or localization | references/interaction-and-accessibility.md |
| Rendering, loading, responsiveness, memory, bundle, or asset performance | references/performance.md |
| Client trust, sensitive data, third parties, analytics, or diagnostic signals | references/security-privacy-and-observability.md; invoke security-review for a deep review of changed trust boundaries |
| Remote-dependency or durable-work deadlines, cancellation, retries, overload, unknown mutation outcomes, or partial-failure recovery | Invoke resilience; browser-local effect cleanup and stale-result suppression remain in state-data-and-effects.md, while this Skill owns user-visible presentation |
| React-specific hooks, JSX, Suspense, RSC, or framework APIs | Invoke ts-frontend; it expresses the selected frontend architecture in React and TypeScript forms |
Completion criterion: candidates come from the problem branch rather than from framework habit or a preferred library.
4. Compare the smallest viable options
For each candidate, record:
- Context — conditions in which it applies.
- Forces — usability, correctness, accessibility, latency, complexity, privacy, and delivery trade-offs.
- Solution shape — ownership and relationships without framework syntax.
- Invariant — what users and systems can observe as true.
- Consequences — shipped code, render work, coupling, state synchronization, and operating cost.
- Failure modes — stale state, lost intent, hydration mismatch, inaccessible interaction, sensitive-data exposure, or degraded-network behavior.
- Verification — behavior, accessibility, browser, performance, privacy, and failure evidence.
Include the current design and a direct local implementation. Prefer the least complex option that satisfies the invariant.
5. Map the pattern to the codebase
Use the project's native routes, modules, components, browser APIs, framework primitives, design tokens, data clients, telemetry, and test infrastructure. Name:
- the authoritative owner of each mutable state and server-derived value;
- the component, route, cache, URL, or server enforcement point for each invariant;
- pending, empty, stale, success, error, unauthorized, and recovery states that are actually reachable;
- serializable and trust-boundary crossings;
- compatibility and delivery effects for existing users, sessions, cached assets, and deployed versions.
Hand file-level sequencing, rollout, and executable gates to plan; production implementation belongs to tdd. Framework syntax is an implementation map, not the pattern itself.
Completion criterion: the proposal names concrete integration points and ownership without pretending a component type, hook, store, or library is the architecture.
6. Define verification evidence
Read the Verification section of every selected branch reference. For each invariant and reachable user-visible state, record the starting condition, action or event, expected observation, prohibited side effect where material, representative environment, and evidence method.
Pass these requirements to plan for an executable contract before implementation or to verification when reviewing an existing change. Route changed trust boundaries to security-review and remote or durable failure scenarios to resilience. This Skill may identify design gaps; it does not execute gates or issue the implementation's READY, NOT READY, or BLOCKED verdict.
Pattern Selection Rules
- Treat components, hooks, stores, routes, and design systems as ownership mechanisms, not maturity levels.
- Keep state at the narrowest authoritative owner. Derive values instead of synchronizing duplicate state.
- Put navigable, shareable state in the URL when its representation and privacy permit it; keep ephemeral interaction state local.
- Treat server-state caches and offline replicas as replicated views with freshness, conflict, invalidation, and recovery policies.
- Make asynchronous states explicit. A spinner is not a policy for stale data, empty results, unknown mutation outcomes, or recovery.
- Use optimistic presentation only when operation identity, duplicate safety, reconciliation, rejection, and user correction are defined.
- Prefer native platform semantics and progressive enhancement before recreating controls or navigation in script.
- Treat the browser as an untrusted, interruptible, resource-constrained client. Client validation and hidden UI do not enforce authorization.
- Select rendering and performance controls from measured journeys and supported environments; memoization, virtualization, hydration, and code splitting are costs as well as tools.
- Keep remote failure policy singular: consume
resiliencebudgets and classifications rather than inventing retries inside components or data hooks.
Output Contract
Scale depth to scope: combine headings for a small local decision; use the full structure for cross-route, persistent-state, accessibility-critical, privacy-sensitive, or delivery-risk work. Mark a section not applicable rather than manufacturing concerns.
Context and constraints
User journey, problem, and invariant
Current design and ownership
Candidate options and trade-offs
Selected pattern and why
Rejected alternatives and why
Codebase and framework mapping
User-visible states and degradation
Accessibility, privacy, and delivery impact
Failure modes
Evidence requirements
Assumptions and open risksThe pattern is not complete until ownership, applicability boundary, user-visible failure behavior, cost, and verification method are stated.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

