/pf-react:pf-component-reuse-checkfrom pf-react
Detects custom React components in uncommitted code that overlap with PatternFly React components, suggests the PatternFly equivalent, and can replace the custom component then build to verify.
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, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Prefer existing PatternFly React components over custom ones that reinvent the same UI role.
Analyze only files that are newly created or currently modified and not yet committed. The user has already decided on committed code — do not scan or refactor it.
Identify scope with git:
git status --short
git diff --name-only HEAD
git ls-files --others --exclude-standard
Include:
M, A, staged or unstaged)Exclude:
node_modules, dist, build, coverage)If there is no git repo, ask the user which new/changed files to check. Never invent a whole-repo audit.
Limit analysis to component-relevant extensions: .tsx, .jsx, .ts, .js (and co-located styles only when tied to a candidate component).
Track progress:
- [ ] 1. Collect uncommitted candidates
- [ ] 2. Match against PatternFly React
- [ ] 3. Report suggestions (ask before replacing)
- [ ] 4. Replace (only if requested)
- [ ] 5. Build and verify
From scoped files, find custom components being introduced or substantially changed:
function / const components and default exportsSkip:
For each candidate, capture: name, file path, props surface, and intended UI role (1 short sentence).
Use PatternFly documentation as the source of truth (PatternFly MCP when available; otherwise patternfly.org docs and package source/types):
@patternfly/react-core, @patternfly/react-table, @patternfly/react-charts, @patternfly/chatbot, and @patternfly/react-component-groups as appropriate.Match confidence:
| Level | Meaning |
|---|---|
| High | Same UI role and enough prop coverage to replace without inventing a new abstraction |
| Medium | Same role, but some custom behavior needs PatternFly props, composition, or a small wrapper |
| Low | Related family only — mention as optional alternative, do not push replacement |
Do not suggest a match on name similarity alone. Confirm role + interaction model from docs/examples.
For each High/Medium match, present before changing anything:
### [ComponentName] → PatternFly [PFComponent]
- File: path/to/file.tsx
- Confidence: High | Medium
- Why: <one sentence on overlapping role>
- Import: `import { PFComponent } from '@patternfly/...'`
- Docs: <patternfly.org or MCP docs link when available>
- Gaps: <custom behavior not covered, or "none">
Replace with PatternFly? (yes / no / adjust)
End with a short summary: candidates checked, matches found, no-match custom components kept.
If no matches: say so briefly and stop. Do not force PatternFly onto domain-specific UI.
When the user confirms replacement (or says to replace / use PatternFly instead):
pf-import-check rules for charts, chatbot, component-groups).After replacement:
package-lock.json → npm, yarn.lock → yarn, pnpm-lock.yaml → pnpm).@patternfly/* dependencies exist; install only what the replacement needs.package.json (build, else compile / tsc as available).# examples — use the project's actual scripts
npm run build
# or: yarn build | pnpm run build
Do not claim success without a successful build (or a clear blocker outside the replacement, such as pre-existing project failures — distinguish those).
pf-import-check — after adding/changing @patternfly/* importspf-component-check — when composing nested PatternFly wrapperspf-project-gen — when the project is missing PatternFly setupeval/cases/committed-only-components/annotations.yaml (opens in a new tab)eval/cases/committed-only-components/input.yaml (opens in a new tab)eval/cases/custom-modal-overlap/annotations.yaml (opens in a new tab)eval/cases/custom-modal-overlap/input.yaml (opens in a new tab)eval/cases/no-uncommitted-changes/annotations.yaml (opens in a new tab)eval/cases/no-uncommitted-changes/input.yaml (opens in a new tab)eval/eval.yaml (opens in a new tab)references/role-aliases.md (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.Other plugins' skills for the same job