agentleFS
basidiocarpbasidiocarp/pileus/.claude/skills/frontend-patterns/SKILL.md

frontend-patterns

Skill0 starsChanged 6 months agoMITView on GitHub

Applies modern frontend architecture patterns.

87 other projects use a version of this.

Adopted by

Most recently taken up by

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.
  • ysyecustSkill

    brand-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

  • niloykumarbarmanSkill

    agent-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-sysSkill

    configure-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

  • loulanyueSkill

    nuxt4-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

  • ronmkrSkill

    vite-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-sysSkill

    content-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

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 26 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use @tanstack/react-virtual for long lists (1000+ items).

    line 77

“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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Frontend Development Patterns

Contents

  • When to Use
  • Component Patterns
  • Custom Hooks
  • Performance Optimization
  • References

Modern frontend patterns for React, Next.js, and performant user interfaces.

When to Use

  • Building React components (composition, props, rendering)
  • Managing state (useState, useReducer, Zustand, Context)
  • Implementing data fetching (SWR, React Query, server components)
  • Optimizing performance (memoization, virtualization, code splitting)
  • Working with forms (validation, controlled inputs, Zod schemas)
  • Building accessible, responsive UI patterns
  • Implementing error boundaries and fallback UIs
  • Creating distinctive, polished frontend interfaces with strong aesthetics
  • Reviewing visual evidence to confirm that a UI change actually achieved its goal
  • Deciding whether 3D is justified or whether a simpler visual approach would work better

Component Patterns

PatternUse Case
CompositionBuilding flexible, reusable components (Card, CardHeader, CardBody)
Compound ComponentsRelated components sharing state (Tabs, TabList, Tab)
Render PropsFlexible data/UI separation (DataLoader with children function)
Error BoundaryCatching and handling component errors gracefully

See references/component-patterns.md for full examples.

Custom Hooks

HookPurpose
useToggleBoolean state with toggle function
useQueryAsync data fetching with loading/error states
useDebounceDebounce value changes (search inputs)
Context + ReducerComplex state management with actions

See references/hooks.md for implementations.

Performance Optimization

Memoization

// useMemo for expensive computations
const sorted = useMemo(() => items.sort(...), [items])

// useCallback for functions passed to children
const handleClick = useCallback(() => ..., [])

// React.memo for pure components
export const Item = React.memo(({ data }) => <div>{data}</div>)

Code Splitting

const HeavyComponent = lazy(() => import('./HeavyComponent'))

<Suspense fallback={<Skeleton />}>
  <HeavyComponent />
</Suspense>

Virtualization

Use @tanstack/react-virtual for long lists (1000+ items).

See references/performance.md for full examples.

References

  • Component Patterns - Composition, compound components, render props, error boundaries
  • Hooks - useToggle, useQuery, useDebounce, Context+Reducer
  • Performance - Memoization, code splitting, virtualization
  • Forms & Accessibility - Form validation, animations, keyboard nav, focus management
  • Error Boundaries - React error boundaries, Next.js error handling, async error patterns, error reporting
  • Design Aesthetics - Distinctive UI design, typography, color, motion, spatial composition
  • Visual Validation - Adversarial screenshot review, visual QA checklists, and evidence-first UI verification
  • 3D Experience - When 3D belongs in the interface, stack selection, and GLB pipeline checks

Remember: Choose patterns that fit your project complexity. Start simple, optimize when needed.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.