pf-component-structure

Audits and enforces proper structural nesting in PatternFly React components.

10|26|Updated Jul 8, 2025
One-click install
npx skills add https://github.com/patternfly/ai-helpers --skill pf-component-structure
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pf-component-structure
Source: https://github.com/patternfly/ai-helpers/tree/main/plugins/react/skills/pf-component-structure
Command: npx skills add https://github.com/patternfly/ai-helpers --skill pf-component-structure

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

PatternFly React projects often suffer from misnested components and inconsistent layout wrappers, leading to spacing issues and hard-to-maintain code.

Core Features & Use Cases

  • Audits and enforces proper nesting for PatternFly React components (e.g., Card with CardBody, PageSection, DescriptionListGroup, etc.).
  • Detects common anti-patterns such as missing wrappers or incorrect hierarchy across Page, Card, Table, and DescriptionList families.
  • Provides guidance and references to established patterns to accelerate correct UI assembly.

Quick Start

Audit a PatternFly React codebase to identify and fix structural nesting issues, applying the correct wrappers and layout primitives.

Frequently Asked Questions about pf-component-structure

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

FAQPage Schema
How do I fix misnested PatternFly React components causing spacing issues?

Fix misnested PatternFly React components by auditing your codebase for incorrect component hierarchy and applying the correct layout wrappers. This Skill detects missing wrappers across Page, Card, and Table families and references established patterns to correct structural nesting problems.

What are common anti-patterns when assembling PatternFly layouts?

Common PatternFly layout anti-patterns include missing wrappers like CardBody, incorrect hierarchy within Page or Table families, and inconsistent layout primitives. These structural nesting issues lead to spacing problems and hard-to-maintain React code.

How do I audit a React codebase for incorrect PatternFly component hierarchy?

Audit a React codebase for incorrect PatternFly component hierarchy by checking component nesting against reference patterns. This Skill enforces proper hierarchy rules for Page, Card, Table, and DescriptionList families to identify and guide fixes for structural anti-patterns.

Does this PatternFly component structure audit work with DescriptionList and Table families?

Yes, the PatternFly component structure audit works with DescriptionList and Table families. It checks for proper nesting and correct wrapper usage across these component families, ensuring consistent layout primitives and resolving spacing issues during UI assembly.

When should I audit my PatternFly React component nesting?

Audit your PatternFly React component nesting when you encounter spacing issues during UI assembly or notice missing layout wrappers. The Skill applies reference patterns to debug incorrect hierarchy and enforces proper component structure across Page, Card, and Table families.

What's the best way to ensure correct wrappers in PatternFly React components?

The best way to ensure correct wrappers in PatternFly React components is to audit your code against established hierarchy reference patterns. This Skill detects missing wrappers and incorrect layout primitives, providing guidance to accelerate correct UI assembly.