frontend-implementation-guard

Enforce React component design and data flow best practices.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/lgerard314/global-plugin --skill frontend-implementation-guard
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: frontend-implementation-guard
Source: https://github.com/lgerard314/global-plugin/tree/main/plugin/skills/frontend-implementation-guard
Command: npx skills add https://github.com/lgerard314/global-plugin --skill frontend-implementation-guard

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Component logic often sprawls across render methods and event handlers, making components hard to test and reuse. This guard helps keep React components focused, with business logic moved to hooks, and with state placed at the appropriate scope.

Core Features & Use Cases

  • Enforces single-responsibility component design and clean separation of concerns.
  • Encourages moving business logic to custom hooks or services, and using TanStack Query for server data.
  • Guides proper state placement, avoids overuse of Context for frequently-updated data, and promotes discriminated props for variant rendering.
  • Applies to writing or reviewing component-level code, hooks, and client-side data fetching in React projects.

Quick Start

Create or review a small React component that follows the guard's rules for focused state, hook discipline, and client-side data fetching.

Frequently Asked Questions about frontend-implementation-guard

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I keep React components focused and well-structured?

To keep React components focused, enforce single-responsibility design by moving business logic to custom hooks or services, placing state at the appropriate scope, and using discriminated props for variant rendering.

What is the best way to manage server state in React components?

The best way to manage server state in React components is using TanStack Query for client-side data fetching, which separates server data from local component state and reduces unnecessary prop drilling.

How do I organize state placement in React to avoid Context overuse?

Organize React state placement by keeping it at the lowest necessary scope and avoiding Context for frequently-updated data, instead relying on local state and custom hooks to prevent unnecessary re-renders.

Why should I use custom hooks for business logic in React?

You should use custom hooks for business logic in React because they enforce clean separation of concerns, making components easier to test and reuse by extracting sprawled event handler and render logic.

Does this React architecture guard work with standard ESLint hook rules?

Yes, this React architecture guard works with standard ESLint hook rules, actively requiring adherence to them alongside discriminated props patterns and single-responsibility component design.

When should I use discriminated props for React component variants?

You should use discriminated props for React component variants when rendering distinct UI states, as it enforces clean component design and prevents prop combinations that violate single-responsibility principles.