/pf-migration:pf-react-migration-scanfrom pf-migration
Scans code for @patternfly/react-* API breaking changes (removed props, renamed components, import path changes) and produces a markdown report. Use when upgrading PatternFly React versions.
Ships in pf-migration. 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.
Identify @patternfly/react- API breaking changes* in a codebase and deliver a markdown report. Do not include CSS class migrations, @patternfly/patternfly changes, or non-React packages (for example @patternfly/chatbot).
For CSS class and token name migrations, use pf-css-migration-scan instead.
Packages matching @patternfly/react-*, including:
@patternfly/react-core, @patternfly/react-table, @patternfly/react-charts@patternfly/react-component-groups, @patternfly/react-drag-drop, @patternfly/react-tokens@patternfly/react-* extension packagesBreaking change types:
| Category | Examples |
|---|---|
| Removed or deprecated components | Chip → Label, deprecated Modal import path |
| Renamed components or subcomponents | Text → Content, KebabToggle → MenuToggle |
| Removed, renamed, or retyped props | isActive removed, isDisabled → behavior change |
| Import or export path changes | @patternfly/react-charts → @patternfly/react-charts/victory |
| Composition or API structure changes | EmptyStateHeader no longer exported; new required wrappers |
| Renamed TypeScript types or enums | SplitButtonOptions deleted, enum value removed |
| Hook or render-prop signature changes | Callback arity or argument shape changed |
pf-v5-*, pf-c-*, pf-v6-u-*, etc.)@patternfly/react-tokens)@patternfly/patternfly, @patternfly/chatbot, @patternfly/patternfly-mcpConfirm with the user (or infer from package.json / git diff):
src/)6.2.0 → 6.3.0)@patternfly/react-* packages are in useRead package.json (and lockfile if needed) for installed @patternfly/react-* versions.
Search the scan path for imports and API usage:
rg "@patternfly/react-" --glob "*.{ts,tsx,js,jsx}" <scan-path>
rg "from ['\"]@patternfly/react-" --glob "*.{ts,tsx,js,jsx}" <scan-path>
Build a list of:
Group by file for cross-referencing.
Use the PatternFly MCP server before guessing:
searchPatternFlyDocs with queries like upgrade, upgradeguide, release notes, or specific component names.usePatternFlyDocs for:
upgradeguide — PF6 upgrade guide and codemod rule listIf the PatternFly MCP server is unavailable, continue without stalling: reference the pf-codemods README rule list and the PatternFly upgrade guide directly, and check GitHub release notes for the target version range.
For PF5 → PF6, also reference the pf-codemods README rule list — each rule maps to a documented breaking change with PR links.
For minor/patch upgrades, check the target release notes and GitHub PRs for @patternfly/react-core and related packages.
When upgrading to PF6 (or when the user asks for machine verification), run a dry run (no --fix):
npx @patternfly/pf-codemods@latest --v6 <scan-path>
Use codemod output to supplement MCP findings. Codemod hits are in scope because they flag React API breaking changes. Do not auto-fix unless the user requests it.
For each known breaking change in the version range:
Search the inventory for affected components, props, imports, or types.
Record file path, line number, current usage, and required change.
Assign severity:
@patternfly/react-core/deprecated; manual follow-up advisedAssign confidence:
Do not invent breaking changes. If MCP/docs do not document a change for the stated version range, omit it or mark as "unverified — manual review".
Write the report to a file the user can share (default: pf-react-migration-scan-report.md in the project root unless the user specifies otherwise).
Use the template in references/report-template.md.
Present the report to the user and summarize the highest-severity items.
When MCP/docs identify a breaking change, search the codebase with targeted patterns.
The examples below use PF5 → PF6 component and prop names (Chip, KebabToggle, Tile). For minor/patch upgrades (for example 6.2.0 → 6.3.0), derive search patterns from the breaking changes documented in release notes — do not blindly search for these PF5→PF6 names.
# Removed or deprecated components
rg "\bChip\b|\bKebabToggle\b|\bTile\b" --glob "*.{ts,tsx}" <scan-path>
# Renamed components
rg "\bText\b.*@patternfly/react-core|\bContentHeader\b" --glob "*.{ts,tsx}" <scan-path>
# Removed props (examples — extend per version docs)
rg "isActive|isHidden|hasNoPadding|backgroundColor|leftBorderVariant" --glob "*.{ts,tsx}" <scan-path>
# Import path changes
rg "from ['\"]@patternfly/react-charts['\"]" --glob "*.{ts,tsx}" <scan-path>
rg "from ['\"]@patternfly/react-core/deprecated['\"]" --glob "*.{ts,tsx}" <scan-path>
# React tokens
rg "@patternfly/react-tokens" --glob "*.{ts,tsx}" <scan-path>
Adapt patterns to the breaking changes documented for the user's version range — do not rely on this fixed list alone.
| Tool | When to use |
|---|---|
pf-css-migration-scan | CSS class and legacy token names in markup/styles |
pf-import-check | Invalid import paths after upgrade |
pf-codemods | Automated fixes for many PF5 → PF6 React API changes |
| PatternFly MCP | Authoritative upgrade guide, release notes, component schemas |
Before delivering the report:
@patternfly/react-* API change@patternfly/patternfly findings includedeval/cases/css-only-changes/annotations.yaml (opens in a new tab)eval/cases/css-only-changes/input.yaml (opens in a new tab)eval/cases/minor-version-upgrade/annotations.yaml (opens in a new tab)eval/cases/minor-version-upgrade/input.yaml (opens in a new tab)eval/cases/pf5-to-pf6-codebase/annotations.yaml (opens in a new tab)eval/cases/pf5-to-pf6-codebase/input.yaml (opens in a new tab)eval/eval.yaml (opens in a new tab)references/report-template.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-migration3 skills in this plugin
/pf-css-migration-scanScan code for legacy PatternFly CSS classes and recommend PF6-safe replacements. Use when upgrading from PF4/PF5 or auditing a codebase for deprecated class names./pf-release-candidate-updateUpdate @patternfly/* npm dependencies to the latest release candidate versions. Use when testing the next PF release or bumping to RC packages.Other plugins' skills for the same job