/pf-react:pf-import-checkfrom pf-react
Audits PatternFly imports for correctness and bundle-size anti-patterns. Detects invalid subpaths, barrel imports, full CSS bundles, and duplicate modules.
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.
Find and report invalid PatternFly import patterns and bundle-size anti-patterns.
If PatternFly documentation tools are available, use them to confirm current package paths and import subpaths before flagging. Without documentation available, rely on the import rules and examples in this skill.
The user provides a file path, directory, or component to check. Default to scanning the project source directory. Adapt search paths to the project structure (src/, app/, packages/*/src/).
@patternfly/react-charts root (must use /victory subpath).@patternfly/chatbot/dist/dynamic/* (barrel imports are acceptable for @patternfly/chatbot >= 6.8.0-prerelease.9, which added exports and sideEffects for tree-shaking; four modules — CodeModal, PreviewAttachment, AttachmentEdit, tracking — are excluded from the barrel and always require dynamic subpath imports).@patternfly/react-component-groups/dist/dynamic/*.@patternfly/react-icons — importing from the package root pulls in the entire icon set (~1.8MB per SSR chunk). Each icon must be imported individually from its deep path.@patternfly/patternfly/patternfly.css or @patternfly/patternfly/patternfly-base.css pulls the entire stylesheet. Import only the CSS modules needed: base.css + feature-specific CSS (patternfly-charts.css, patternfly-addons.css).@patternfly/react-core and @patternfly/react-core/dist/esm/...) inflates the bundle with duplicate modules.# Import correctness
rg "@patternfly/react-charts['\"]" <source-dir>
rg "@patternfly/chatbot['\"]" <source-dir> # only flag if chatbot < 6.8.0-prerelease.9; always flag CodeModal/PreviewAttachment/AttachmentEdit/tracking from barrel
rg "@patternfly/react-component-groups['\"]" <source-dir>
# Bundle-size anti-patterns
rg "from ['\"]@patternfly/react-icons['\"]" <source-dir>
rg "patternfly\.css|patternfly-base\.css" <source-dir>
rg "@patternfly/react-core/dist/" <source-dir>
// Charts — use /victory subpath
import { ChartDonut } from "@patternfly/react-charts/victory";
// Chatbot — barrel import OK for >= 6.8.0-prerelease.9
import { Chatbot } from "@patternfly/chatbot";
// Chatbot — dynamic subpath (required for older versions or barrel-excluded modules)
import { Chatbot } from "@patternfly/chatbot/dist/dynamic/Chatbot";
import CodeModal from "@patternfly/chatbot/dist/dynamic/CodeModal"; // always subpath
// Component groups — use /dist/dynamic/ subpath
import { BulkSelect } from "@patternfly/react-component-groups/dist/dynamic/BulkSelect";
// Bad — barrel import pulls entire icon set (~1.8MB)
import { CogIcon, BellIcon } from "@patternfly/react-icons";
// Good — deep imports, tree-shakeable
import CogIcon from "@patternfly/react-icons/dist/dynamic/icons/cog-icon";
import BellIcon from "@patternfly/react-icons/dist/dynamic/icons/bell-icon";
// Bad — pulls entire PF stylesheet
import "@patternfly/patternfly/patternfly.css";
// Good — base + only what you need
import "@patternfly/react-core/dist/styles/base.css";
import "@patternfly/patternfly/patternfly-charts.css"; // only if using charts
import "@patternfly/chatbot/dist/css/main.css"; // only if using chatbot
import "@patternfly/react-component-groups/dist/css/main.css"; // only if using component groups
@patternfly/react-core barrel imports — this package is designed for tree-shaking and barrel imports are the correct pattern@patternfly/react-table barrel imports — same as react-core, tree-shakeable by designFor each finding, provide:
Group findings by severity (high first). End with a summary count: Found N import issues: X high, Y medium, Z low.
eval/cases/barrel-icon-import/SettingsToolbar.tsx (opens in a new tab)eval/cases/barrel-icon-import/annotations.yaml (opens in a new tab)eval/cases/barrel-icon-import/input.yaml (opens in a new tab)eval/cases/duplicate-module-import/NotificationBar.tsx (opens in a new tab)eval/cases/duplicate-module-import/annotations.yaml (opens in a new tab)eval/cases/duplicate-module-import/input.yaml (opens in a new tab)eval/cases/full-css-import/App.tsx (opens in a new tab)eval/cases/full-css-import/annotations.yaml (opens in a new tab)eval/cases/full-css-import/input.yaml (opens in a new tab)eval/cases/invalid-charts-import/ChartsDashboard.tsx (opens in a new tab)eval/cases/invalid-charts-import/annotations.yaml (opens in a new tab)eval/cases/invalid-charts-import/input.yaml (opens in a new tab)eval/cases/invalid-chatbot-import/AssistantPanel.tsx (opens in a new tab)eval/cases/invalid-chatbot-import/annotations.yaml (opens in a new tab)eval/cases/invalid-chatbot-import/input.yaml (opens in a new tab)eval/cases/valid-pf6-imports/SettingsPage.tsx (opens in a new tab)eval/cases/valid-pf6-imports/annotations.yaml (opens in a new tab)eval/cases/valid-pf6-imports/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
npx claudepluginhub rh-uxd/ai-helpers --plugin pf-react16 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-checkAudit PatternFly React component nesting, wrapper hierarchies, and layout structure. Use when scanning for hierarchy violations or debugging spacing caused by missing wrapper components./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.Other plugins' skills for the same job