/pf-react:pf-component-checkfrom pf-react
Audits PatternFly React component nesting, wrapper hierarchies, and layout structure. Detects hierarchy violations and missing wrappers that break spacing.
Ships in pf-react. 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.
Read when SKILL.md points to them.
Use this skill when you need a structural audit of PatternFly usage, or when fixing layouts caused by skipped wrappers. For day-to-day composition rules while writing UI, use the pf-component-structure-audit agent (react plugin) or your client’s equivalent subagent for PatternFly structure.
If @patternfly/patternfly-mcp is available, use it for current props, examples, and new components. This skill and the reference files define nesting and wrapper rules; the MCP fills in API details.
Layout CSS targets specific parent-child trees. Skipping wrappers (ToolbarContent, CardBody, PageSection, etc.) breaks spacing and alignment; custom CSS is usually papering over a wrong tree. Use every structural wrapper PatternFly provides for that region.
Reference files hold trees, props notes, examples, and anti-patterns — not duplicated here:
| Area | File |
|---|---|
| Page, PageSection, PageGroup, PageSidebar, PageHeader, PageFooter, Masthead | references/page-layout.md |
| Card, Modal, Drawer, EmptyState, Sidebar | references/containers.md |
| Table, DataList, DescriptionList | references/data-components.md |
| Nav, Tabs, Toolbar | references/navigation-toolbar.md |
Read the relevant file before suggesting structure for that family.
@patternfly/react-core or @patternfly/react-table.Use the same structural rules as the pf-component-structure-audit agent; during a scan, flag the issues below. Anti-pattern examples live in the reference files for each family.
| Area | Flag |
|---|---|
| Page layout | Direct <Page> children that aren’t <PageSection> / <PageGroup>; <PageSidebar> without <PageSidebarBody>; <PageSection hasBodyWrapper={false}> without <PageBody> (info) |
| Masthead | <MastheadBrand> / <MastheadToggle> not under <MastheadMain>; <MastheadLogo> outside <MastheadBrand> |
| Toolbar | <Toolbar> children aren’t <ToolbarContent>; controls in <ToolbarContent> / <ToolbarGroup> without <ToolbarItem> |
| Card | Raw content in <Card> outside <CardBody> / <CardHeader> / <CardFooter>; expandable card missing <CardExpandableContent> |
| Modal | Missing <ModalHeader> / <ModalBody> / <ModalFooter>; missing aria-labelledby or aria-label |
| Drawer | <DrawerPanelContent> as child of <DrawerContent> instead of panelContent; <DrawerContent> without <DrawerContentBody> (unless DrawerContent has no main-column children); <DrawerCloseButton> not under <DrawerActions> in <DrawerHead> |
| Navigation | <NavItem> not under <NavList>; extra <NavList> inside <NavGroup> |
| Table | <Tr> direct under <Table>; <Th> in body rows or <Td> in header rows; <Td> without dataLabel (WARN) |
| DataList | Missing aria-label on <DataList>; item without <DataListItemRow>; row without <DataListItemCells>; <DataListContent> inside <DataListItemRow> (should be sibling) |
| Tabs | Tab label as children instead of title; <Tab> without eventKey |
| EmptyState | <EmptyStateIcon> directly under <EmptyState>; mixing titleText/icon with explicit <EmptyStateHeader> |
| DescriptionList | Terms/descriptions directly under <DescriptionList> without <DescriptionListGroup> |
For each violation:
[ERROR|WARN] file/path.tsx:42 - <Toolbar> has direct children that are not <ToolbarContent>
Found: <Button> as direct child of <Toolbar>
Fix: Wrap children in <ToolbarContent><ToolbarItem>...</ToolbarItem></ToolbarContent>
Use ERROR for layout-breaking issues; WARN for best-practice gaps. End with a summary:
Scanned: 23 files
Errors: 7 (across 4 files)
Warnings: 3 (across 2 files)
Group by violation type so patterns are visible.
Usually safe: Wrapping in missing intermediates (ToolbarContent, ToolbarItem, CardBody, NavList, DescriptionListGroup, …); moving DrawerPanelContent to panelContent; adding <Thead> / <Tbody>.
Needs user input: New aria-label / aria-labelledby text; choosing titleText vs <EmptyStateHeader>; unclear nested intent.
During an audit: If spacing or padding overrides sit next to a structural issue, add an info line, e.g.:
[INFO] file/path.tsx:42 - Custom CSS spacing override near structural violation
.my-toolbar-fix { padding: 8px } may compensate for missing <ToolbarContent>
Before suggesting new overrides: Map the symptom to a missing wrapper when possible — page content → PageSection / PageBody; toolbar → ToolbarContent / ToolbarItem; card → CardBody; nav → NavList; description list → DescriptionListGroup; drawer panel → panelContent prop (see reference files for full trees).
eval/README.md (opens in a new tab)eval/cases/drawer-panel-as-child/DetailsDrawer.tsx (opens in a new tab)eval/cases/drawer-panel-as-child/annotations.yaml (opens in a new tab)eval/cases/drawer-panel-as-child/input.yaml (opens in a new tab)eval/cases/missing-card-body/ServiceSummaryCard.tsx (opens in a new tab)eval/cases/missing-card-body/annotations.yaml (opens in a new tab)eval/cases/missing-card-body/input.yaml (opens in a new tab)eval/cases/missing-page-section/DashboardPage.tsx (opens in a new tab)eval/cases/missing-page-section/annotations.yaml (opens in a new tab)eval/cases/missing-page-section/input.yaml (opens in a new tab)eval/cases/nav-without-navlist/SideNav.tsx (opens in a new tab)eval/cases/nav-without-navlist/annotations.yaml (opens in a new tab)eval/cases/nav-without-navlist/input.yaml (opens in a new tab)eval/cases/toolbar-spacing-bug/ResourceToolbar.tsx (opens in a new tab)eval/cases/toolbar-spacing-bug/annotations.yaml (opens in a new tab)eval/cases/toolbar-spacing-bug/input.yaml (opens in a new tab)eval/cases/valid-structure/WorkloadsPage.tsx (opens in a new tab)eval/cases/valid-structure/annotations.yaml (opens in a new tab)eval/cases/valid-structure/input.yaml (opens in a new tab)eval/eval.yaml (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
16 skills in this plugin
/pf-chart-genGenerate PatternFly chart components with theming, responsive sizing, and accessibility. Use when building charts, data visualizations, or dashboards with PatternFly./pf-chatbot-bundle-auditAudit PatternFly ChatBot imports for tree-shaking opportunities. Use when optimizing ChatBot bundle size or after upgrading @patternfly/chatbot.
/pf-component-reuse-checkDetects custom React components in newly created or modified (uncommitted) code that overlap with PatternFly React components, suggests the PatternFly equivalent, and can replace the custom component then build to verify. Use when creating UI components, reviewing uncommitted React changes, or when the user asks to prefer PatternFly instead of a custom component./pf-context-genGenerate AI-friendly context files for PatternFly components. Use when preparing context for AI-assisted PF development, onboarding AI tools to a PF codebase, or assembling component references for prompt engineering./pf-deployDeploy a PatternFly React project to GitHub Pages using pfcli deploy. Use when publishing a prototype, sharing a demo URL, deploying to GitHub Pages, or when the user mentions pfcli deploy./pf-design-comments-setupIntegrate @patternfly/design-comments into React apps for on-page design feedback, pinned comment threads, GitHub Issues sync, and Jira linking. Use when adding design comments, review overlays, or removing the commenting system from a PatternFly React project.npx claudepluginhub rh-uxd/ai-helpers --plugin pf-reactOther plugins' skills for the same job