/frontend:frontend-component-patternsfrom frontend
Defines when to split React components and extract hooks using Container/Presentation patterns. Covers extraction criteria for hooks, markup (150+ lines), and domain services.
Ships in frontend. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Apply only on projects that already follow Container/Presentation patterns. If the project does not use these patterns, ask the user before refactoring.
Container components:
ReceiptFormIsland — uses useReceiptForm(), renders DocumentAsForm or success screenPresentation components:
onChange, onSubmit, onFieldFocus)BailleurSection — receives landlordName, errors, emits onChangeExtract when 3 or more related state variables are managed together:
useState + useState + useState for related concerns → useFeatureName()Do NOT extract a hook for:
useStateSplit a component when:
Each extracted section should be 30-60 lines of JSX.
Move to domain/<concern>.service.ts when:
parseFloat(), arithmetic, or formatting appears inline in JSXinterface SectionProps {
// Section-specific data
fieldName: string;
// ...
// Error display
errors: Partial<Record<string, string>>;
// Spotlight/focus system
isActive: boolean;
// Event callbacks
onChange: (field: string, value: string | boolean) => void;
onFieldFocus: (field: string) => void;
onFieldBlur: (field: string) => void;
}
Use a declarative mapping (in domain service) instead of inline prefix matching:
// Domain service — pure mapping
const SECTION_FIELDS: Record<SectionKey, string[]> = {
bailleur: ['landlordName', 'landlordEmail'],
// ...
};
function isSectionActive(currentField: string, section: SectionKey): boolean {
if (!currentField) return true;
return SECTION_FIELDS[section].includes(currentField);
}
{(parseFloat(a) + parseFloat(b)).toFixed(2)} → extract to domain serviceWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub fabiensalles/claude-marketplace --plugin frontend3 skills in this plugin
/frontend-best-practicesACTIVATE when modifying existing frontend components/styles (CSS/SCSS, Twig, HTML, React, Vue), when encountering visual bugs, or when the user describes multiple constraints that may conflict. ACTIVATE for 'modify existing', 'side effect', 'régression', 'existing component', 'composant existant', 'bug visuel', 'visual bug', 'devtools', 'inspection', 'contraintes Figma', 'too small', 'misaligned', 'pixel-perfect'. Covers: avoiding side effects on existing UI by adding-not-modifying, lifting incompatible constraints to the user before coding, autonomous visual debugging via Chrome DevTools MCP (never ask for inspectable sizes/colors/positions). DO NOT use for: clean-architecture decisions (see frontend-clean-architecture), Container/Presentation split (see frontend-component-patterns), Twig component rules (see symfony:twig-conventions), where JS/CSS/Twig live in Symfony (see symfony:symfony-frontend), or non-visual bug root-cause (see superpowers:systematic-debugging)./frontend-clean-architectureACTIVATE when creating or modifying frontend features in projects with domain/infrastructure layered architecture. ACTIVATE for 'frontend architecture', 'domain layer', 'hexagonal frontend', 'features/ folder', 'repository interface', 'mapper'. Covers: features/{feature-name}/domain + infrastructure structure, strict dependency direction (domain never imports infrastructure), domain models/repositories/services/referentials, API repositories, mappers, hooks as orchestrators. DO NOT use for: projects without this architecture (ask user first), general React patterns (see frontend-component-patterns).Other plugins' skills for the same job