mcpbeat

Update Package

openshift/update-package

Expert package update assistant for OpenShift Console. Update packages safely with automated testing, building, and fixing.

1k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
458
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/openshift/console --skill update-package

What it tells the agent to use

found in the instruction text
WebFetch fetches pages from the network

The instruction itself

12 sections, as written by the author

/update-package

Mission

Update the specified package to its reasonably latest stable version or to the version specified by the user, ensuring builds and tests pass through automated fixing of breaking changes.

Process

Phase 1: Analysis & Update

  • Identify: Read package.json for current version (dependencies/devDependencies/resolutions)
  • Research: Use yarn npm info <package> --json | jq -r '.["dist-tags"].latest' to find latest version; compare with current version; determine if update is needed
  • Interactive Gather: Ask user:
  • "Do you have a migration guide URL for this update?" (optional)
  • "Do you have a changelog/release notes URL?" (optional)
  • "Any specific breaking changes you're aware of?" (optional)
  • If provided, fetch and analyze these resources using WebFetch
  • Update: Modify package.json and resolutions; run yarn install; report peer dependency warnings

Phase 2: Build

  • Build: Run yarn build; capture all errors with file paths and line numbers
  • Analyze: On success → Phase 3. On failure → categorize errors (TypeScript/import/API) → Phase 4

Phase 3: Test

  • Test: Run yarn test; capture failures, deprecations, stack traces
  • Analyze: On success → Phase 5. On failure → identify API changes → Phase 4

Phase 4: Auto-Fix

  • Fix Build Errors:
  • For each error, read file and identify issue (import/type/API change)
  • Use migration guide/changelog (if provided) to inform fixes
  • Apply fixes: update imports, types, method calls
  • If stuck, ask user: "I'm seeing error X in file Y. The migration guide doesn't cover this. Do you know the fix or have additional documentation?"

10. Fix Tests: Read test files, update expectations/mocks for API changes

11. Verify: Re-run build → tests. If new errors appear, repeat the full fix cycle (Phase 4 → verify). Max 3 complete cycles of fixing all errors → build → test (then ask user for guidance)

Phase 5: Complete

12. Final Check: Run yarn build and yarn test - verify both pass

13. Report:

  • Package: <package> <old><new>
  • Files modified, errors fixed, breaking changes
  • Build ✓ | Tests ✓

14. Commit:

    Update <package> from <old> to <new>

    - Updated package.json and yarn.lock
    - Fixed <N> build errors
    - Fixed <N> test failures
    - Breaking changes: <summary>

Guidelines

Code Standards:

  • For coding patterns and project structure: Read STYLEGUIDE.md, AGENTS.md, and other relevant documentation
  • Follow existing code patterns found in the codebase

Package Update Rules:

  • Only update specified package; no unrelated changes
  • Don't modify config files (.gitignore, eslintrc, tsconfig) unless required
  • Never skip/suppress errors - address or document all
  • All tests must pass; only change expectations if package behavior legitimately changed
  • Interactive approach: Ask user for migration docs, changelogs, or specific fixes when needed
  • Use WebFetch to analyze provided documentation URLs
  • Provide progress updates during long operations (build: 2-5min, tests: 1-3min)
  • Use TaskCreate/TaskUpdate to track phases (these are Claude Code tools for tracking workflow phases with states: pending, in_progress, completed)

Special Cases:

  • PatternFly: May need coordinated @patternfly/* updates; check peer deps
  • TypeScript: Update @types/* alongside runtime packages
  • Workspace: Changes affect packages/*; build from frontend directory

Success Criteria

✓ Package updated in package.json + yarn.lock

yarn build passes

yarn test passes

✓ Breaking changes fixed

✓ Committed with descriptive message

Failure After 3 Iterations

  • Document issues with file paths and errors
  • Provide manual fix recommendations
  • List breaking changes needing review
  • Suggest rollback if critical

Example: Interactive Flow

User: /update-package @patternfly/react-core
Assistant: Current version: 6.2.2, Latest: 6.3.0

Before I proceed, do you have:
1. Migration guide URL? (optional)
2. Changelog/release notes URL? (optional)
3. Known breaking changes? (optional)

User: Yes, https://github.com/patternfly/patternfly-react/releases/tag/v6.3.0

Assistant: [Fetches and analyzes release notes]
Found breaking changes:
- hideTitle prop → isHeaderHidden
- NavList moved to @patternfly/react-core/deprecated

Proceeding with update...
[Updates package, builds, fixes errors using migration info, tests, commits]

How to use it

Copy the folder

Take openshift/update-package from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.