agentleFS
konveyor-ecosystemkonveyor-ecosystem/playpen-pf-mig-skills/skills/pf6-chrome-migrate/SKILL.md

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.

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
  1. Distinctive:

    Run a test to check if the Chrome MCP server is installed and accessible:

    line 15
  2. Distinctive:

    Check if you have access to Chrome MCP tools.

    line 17
  3. Distinctive:

    If Chrome MCP tools are NOT available, stop immediately and inform the user:

    line 18
  4. Distinctive:

    Do NOT proceed with migration if Chrome MCP is unavailable.

    line 32
  5. Distinctive:

    Create a new git branch for the migration work:

    line 38
  6. Distinctive:

    If the branch already exists, ask the user how to proceed (checkout existing, create new name, or abort).

    line 44
  7. Distinctive:

    Before making any changes, capture screenshots of the current PF5 application state:

    line 50
  8. Distinctive:

    Start the development server for the application

    line 52
  9. Distinctive:

    Use the Chrome MCP server to navigate to key pages/routes

    line 53
  10. Distinctive:

    Document which URLs were captured

    line 55
  11. Distinctive:

    Read and understand the upgrade steps, breaking changes, and migration patterns

    line 66
  12. Very specific:

    Update dependencies: Update package.json with PF6 versions

    line 81
  13. Distinctive:

    Run codemods: If PatternFly provides migration codemods, run them

    line 82
  14. Distinctive:

    Fix imports: Update import paths as needed

    line 83
  15. Distinctive:

    After each significant change:

    line 87
  16. Distinctive:

    Ensure the application builds without errors

    line 88
  17. Distinctive:

    Ensure TypeScript/linting passes

    line 89
  18. Distinctive:

    Start the development server with the migrated code

    line 99
  19. Distinctive:

    Use Chrome MCP to navigate to the same URLs captured in Step 2

    line 100
  20. Distinctive:

    Look for visual differences:

    line 107
  21. Distinctive:

    Document any differences found

    line 115
  22. Distinctive:

    All pages visually match the baseline (SUCCESS), OR

    line 129
  23. Distinctive:

    Run the full test suite (if available)

    line 140
  24. Distinctive:

    Run linting and type checking

    line 141
  25. Distinctive:

    Do a final visual sweep of all captured pages

    line 142
  26. Distinctive:

    Commit all changes with a descriptive message:

    line 143
  27. Distinctive:

    Stop immediately and inform the user.

    line 161
  28. Distinctive:

    After 5 fix attempts on the same issue:

    line 164
  29. Distinctive:

    Document the specific visual difference

    line 166
  30. Distinctive:

    Document what was tried

    line 167
  31. Distinctive:

    Ask the user how to proceed:

    line 168
  32. Distinctive:

    Check build errors for PF6-specific issues

    line 174
  33. Distinctive:

    If stuck, report the specific error to the user

    line 176

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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:

  1. Check if you have access to Chrome MCP tools.
  2. 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-migration

If 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:

  1. Start the development server for the application
  2. Use the Chrome MCP server to navigate to key pages/routes
  3. Take screenshots of each page and save them for comparison
  4. 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:

  1. Navigate to https://www.patternfly.org/get-started/upgrade/
  2. Read and understand the upgrade steps, breaking changes, and migration patterns
  3. 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:

  1. Update dependencies: Update package.json with PF6 versions
  2. Run codemods: If PatternFly provides migration codemods, run them
  3. Fix imports: Update import paths as needed
  4. Update component usage: Fix deprecated props and components
  5. 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

  1. Start the development server with the migrated code
  2. Use Chrome MCP to navigate to the same URLs captured in Step 2
  3. Take new screenshots of each page

5.2 Compare Screenshots

For each page, visually compare the baseline (PF5) screenshot with the current (PF6) screenshot:

  1. Look for visual differences:
    • Layout shifts or misalignments
    • Color differences
    • Missing or broken components
    • Typography changes
    • Spacing issues
    • Icon differences
  2. Document any differences found

5.3 Fix Visual Differences

For each visual difference:

  1. Identify the root cause (CSS change, component change, prop change, etc.)
  2. Consult the upgrade guide for the correct PF6 approach
  3. Make the fix
  4. 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:

  1. Run the full test suite (if available)
  2. Run linting and type checking
  3. Do a final visual sweep of all captured pages
  4. 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:

  1. Document the specific visual difference
  2. Document what was tried
  3. 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

  1. Check build errors for PF6-specific issues
  2. Consult the upgrade guide
  3. 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

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.