AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Frontend Patterns

skill-drag88-claude-dev-framework-frontend-patterns · by drag88

Activates for React component patterns, state management, hooks, and frontend performance optimization

No reviews yet
0 installs
24 views
0.0% view→install

Install

$ agentstack add skill-drag88-claude-dev-framework-frontend-patterns

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-drag88-claude-dev-framework-frontend-patterns)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
1mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Frontend Patterns? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Frontend Patterns Skill

Provide guidance on frontend architecture patterns, React best practices, and UI development.

When to Activate

  • During frontend implementation tasks
  • When building React components
  • When implementing state management
  • When working on performance optimization
  • When handling forms, animations, or accessibility

Pattern Index

Component Patterns

| Pattern | When to Use | |---------|-------------| | Composition over Props | Component has 5+ props controlling layout/content | | Compound Components | Related components share implicit state (Select/Option, Tabs/Tab) | | Render Props | Component needs to share behavior while letting consumer control rendering | | Error Boundary | Catching and recovering from render errors | | Form Handling (RHF + Zod) | Any form with validation requirements |

> See references/react-patterns.md for full code examples.

Custom Hooks

| Hook | Purpose | |------|---------| | useToggle | Boolean state with toggle/setTrue/setFalse | | useAsync | Async operation with loading/error/data states | | useDebounce | Debounce rapidly changing values | | useLocalStorage | Persist state to localStorage with type safety |

> See references/custom-hooks.md for implementations.

State Management

| Pattern | When to Use | |---------|-------------| | Context + Reducer | Shared state across component tree with complex updates | | Local state | State used by single component or parent-child | | URL state | Filters, pagination, search -- anything bookmarkable |

> See references/state-management.md for Context + Reducer implementation.

Performance

| Technique | When to Use | |-----------|-------------| | useMemo | Expensive computations that depend on specific inputs | | useCallback | Callbacks passed to memoized children | | React.memo | Components that re-render with same props | | lazy + Suspense | Route-based or component-based code splitting | | Virtualization | Lists with 100+ items |

> See references/performance-patterns.md for code splitting and virtualization examples.

Animation (Framer Motion)

| Pattern | When to Use | |---------|-------------| | Fade in/out | Page transitions, modal appearance | | List animations | Adding/removing items from lists | | Shared layout | Expanding cards, tab transitions |

> See references/animation-patterns.md for Framer Motion examples.

Accessibility

| Pattern | When to Use | |---------|-------------| | Focus management | Modals, drawers, any overlay | | ARIA labels | Loading states, form errors, navigation | | Skip links | Any page with navigation before main content |

> See references/accessibility-patterns.md for focus trapping, ARIA patterns, and skip links.


Key Principles

  • Composition over configuration -- Prefer composable components over prop-heavy ones
  • Colocation -- Keep state as close to where it's used as possible
  • Derived state -- Compute from existing state rather than syncing with useEffect
  • Progressive enhancement -- Start with semantic HTML, layer interactivity

Suggested Commands

  • /cdf:implement -- Build frontend features using these patterns
  • /cdf:design -- Design component architecture with pattern guidance
  • /cdf:analyze --focus performance -- Check frontend performance against standards

Opus 4.7 plays the frontend-engineer and performance-engineer roles from the Role line in CLAUDE.md when given pattern context — no dedicated stub agents needed.

Reference Files

| File | Contents | |------|----------| | references/react-patterns.md | Composition, compound components, render props, error boundaries, forms | | references/custom-hooks.md | useToggle, useAsync, useDebounce, useLocalStorage | | references/state-management.md | Context + Reducer pattern | | references/performance-patterns.md | Memoization, code splitting, virtualization | | references/animation-patterns.md | Framer Motion fade, list, shared layout animations | | references/accessibility-patterns.md | Focus management, ARIA labels, skip links |

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.