pf6-migrate
Skill2 starsChanged 7 months agoApache-2.0View on GitHub
Migrate a PatternFly 5 application to PatternFly 6 with visual verification. Use when upgrading a PatternFly 5 codebase to PatternFly 6, migrating PF5 to PF6, or when asked to upgrade PatternFly.
In this repository5 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- ralph/CLAUDE.mdCLAUDE.md
- code-migrationSkill
- code-migrationSkill
- migration-comparisonSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
33 rules. About 0 are common, 32 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈32
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Run a test to check if the Chrome MCP server is installed and accessible:
- Distinctive: line 17
Check if you have access to Chrome MCP tools.
- Distinctive: line 18
If Chrome MCP tools are NOT available, stop immediately and inform the user:
- Distinctive: line 32
Do NOT proceed with migration if Chrome MCP is unavailable.
- Distinctive: line 38
Create a new git branch for the migration work:
- Distinctive: line 44
If the branch already exists, ask the user how to proceed (checkout existing, create new name, or abort).
- Distinctive: line 50
Before making any changes, capture screenshots of the current PF5 application state:
- Distinctive: line 52
Start the development server for the application
- Distinctive: line 53
Use the Chrome MCP server to navigate to key pages/routes
- Distinctive: line 55
Document which URLs were captured
- Distinctive: line 66
Read and understand the upgrade steps, breaking changes, and migration patterns
- Very specific: line 81
Update dependencies: Update package.json with PF6 versions
- Distinctive: line 82
Run codemods: If PatternFly provides migration codemods, run them
- Distinctive: line 83
Fix imports: Update import paths as needed
- Distinctive: line 87
After each significant change:
- Distinctive: line 88
Ensure the application builds without errors
- Distinctive: line 89
Ensure TypeScript/linting passes
- Distinctive: line 99
Start the development server with the migrated code
- Distinctive: line 100
Use Chrome MCP to navigate to the same URLs captured in Step 2
- Distinctive: line 107
Look for visual differences:
- Distinctive: line 115
Document any differences found
- Distinctive: line 129
All pages visually match the baseline (SUCCESS), OR
- Distinctive: line 140
Run the full test suite (if available)
- Distinctive: line 141
Run linting and type checking
- Distinctive: line 142
Do a final visual sweep of all captured pages
- Distinctive: line 143
Commit all changes with a descriptive message:
- Distinctive: line 161
Stop immediately and inform the user.
- Distinctive: line 164
After 5 fix attempts on the same issue:
- Distinctive: line 166
Document the specific visual difference
- Distinctive: line 167
Document what was tried
- Distinctive: line 168
Ask the user how to proceed:
- Distinctive: line 174
Check build errors for PF6-specific issues
- Distinctive: line 176
If stuck, report the specific error to the user
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
PatternFly 5 to 6 Migration with Visual Verification
Migrate a PatternFly 5 application to PatternFly 6 using the official upgrade guide and visual comparison to ensure the migrated UI matches the original.
Prerequisites Check
CRITICAL: Before proceeding, verify the Chrome MCP server is available.
Run a test to check if the Chrome MCP server is installed and accessible:
- Check if you have access to Chrome MCP tools.
- If Chrome MCP tools are NOT available, stop immediately and inform the user:
ERROR: Chrome MCP server is not installed or not configured.
This skill requires the Chrome MCP server to perform visual comparison
between the original and migrated versions of the application.
To install the Chrome MCP server, add it to your Claude Code MCP configuration.
See: https://github.com/anthropics/claude-code/blob/main/docs/mcp.md
After installing, restart Claude Code and try again.Do NOT proceed with migration if Chrome MCP is unavailable.
Step 1: Create a Migration Branch
Create a new git branch for the migration work:
git checkout -b pf6-migrationIf the branch already exists, ask the user how to proceed (checkout existing, create new name, or abort).
Step 2: Capture Baseline Screenshots
Before making any changes, capture screenshots of the current PF5 application state:
- Start the development server for the application
- Use the Chrome MCP server to navigate to key pages/routes
- Take screenshots of each page and save them for comparison
- Document which URLs were captured
Store baseline information for later comparison.
Step 3: Fetch and Apply the PatternFly 6 Upgrade Guide
Fetch the official PatternFly 6 upgrade documentation:
- Navigate to https://www.patternfly.org/get-started/upgrade/
- Read and understand the upgrade steps, breaking changes, and migration patterns
- Identify which changes apply to this codebase
Key areas to address from the upgrade guide typically include:
- Package updates (
@patternfly/react-core,@patternfly/react-icons, etc.) - CSS/SCSS changes and design token updates
- Component API changes (renamed props, removed components, new patterns)
- Import path changes
Step 4: Perform the Migration
Apply the migration changes systematically:
- Update dependencies: Update package.json with PF6 versions
- Run codemods: If PatternFly provides migration codemods, run them
- Fix imports: Update import paths as needed
- Update component usage: Fix deprecated props and components
- Update styles: Migrate CSS/design tokens
After each significant change:
- Ensure the application builds without errors
- Ensure TypeScript/linting passes
Step 5: Visual Comparison Loop
This is the core verification step. Repeat until all pages match or you've exhausted fixes:
5.1 Capture Post-Migration Screenshots
- Start the development server with the migrated code
- Use Chrome MCP to navigate to the same URLs captured in Step 2
- Take new screenshots of each page
5.2 Compare Screenshots
For each page, visually compare the baseline (PF5) screenshot with the current (PF6) screenshot:
- Look for visual differences:
- Layout shifts or misalignments
- Color differences
- Missing or broken components
- Typography changes
- Spacing issues
- Icon differences
- Document any differences found
5.3 Fix Visual Differences
For each visual difference:
- Identify the root cause (CSS change, component change, prop change, etc.)
- Consult the upgrade guide for the correct PF6 approach
- Make the fix
- Rebuild and verify
5.4 Repeat Until Matching
Continue the compare-fix loop until:
- All pages visually match the baseline (SUCCESS), OR
- You've attempted fixes but differences persist after 5 iterations (ESCALATE)
[!important] Please make sure that the level of accessibility and usability is maintained or improved during the migration process. For example, ensure that there are no light fonts on light backgrounds or low contrast elements that could hinder readability, unless present in the original design.
Step 6: Final Verification
Once visual comparison passes:
- Run the full test suite (if available)
- Run linting and type checking
- Do a final visual sweep of all captured pages
- Commit all changes with a descriptive message:
git add -A
git commit -m "feat: Migrate from PatternFly 5 to PatternFly 6
- Updated all @patternfly/* packages to v6
- Fixed component API changes per upgrade guide
- Verified visual parity with original PF5 implementation
Co-Authored-By: Claude <noreply@anthropic.com>"Error Handling
If Chrome MCP is unavailable
Stop immediately and inform the user. Do not proceed with migration.
If visual differences cannot be resolved
After 5 fix attempts on the same issue:
- Document the specific visual difference
- Document what was tried
- Ask the user how to proceed:
- Accept the visual difference as expected PF6 behavior
- Provide guidance on how to fix
- Abort the migration
If the application fails to build
- Check build errors for PF6-specific issues
- Consult the upgrade guide
- If stuck, report the specific error to the user
Completion Criteria
The migration is complete when:
- Chrome MCP server availability was verified
- Migration branch was created
- Baseline screenshots were captured
- PatternFly 6 upgrade guide was consulted
- Dependencies were updated to PF6
- All visual differences have been resolved (or explicitly accepted)
- Application builds without errors
- TypeScript/linting passes
- Changes are committed
Tips
- Take screenshots at multiple viewport sizes if responsive design is important
- Focus on component-heavy pages first as they're most likely to have issues
- The PatternFly upgrade guide is authoritative - prefer its recommendations over other sources
- Some visual differences may be intentional PF6 design changes - these can be accepted after user confirmation
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

