upgrade
Skill6 starsChanged 28 days agoMITView on GitHub
Upgrade an existing Magento 2 module to a newer Magento version, newer PHP version, or newer framework dependency. Use when the user wants to bump Magento support, update PHP constraints, replace deprecated API usage, or scan for and remediate BC breaks. Drives: deprecation scan → BC-break detection → patch generation → review → test → report. Calls magento2-tools:review (diff mode) and magento2-tools:test-generate.
We split this skill into the rules it gives an agent
7 rules. 0 are common, 4 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 23 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Target before scan: Always resolve the upgrade target in Phase 1.
- Very specific: line 28
Output budget: Follow context/references/output-budget.md — targeted reads, summary-first test/lint output, long logs to files.
- Distinctive: line 52
Run scanners in order; record what was available and what wasn't.
- Distinctive: line 84
Run unit tests; fix breaks introduced by changes.
- Very specific: line 85
If module has no tests: invoke test-generate --types=unit for the changed files before applying further changes.
- Distinctive: line 87
Run integration tests if available.
- Very specific: line 88
If the module declares webapi.xml or schema.graphqls: run API tests.
“Common” is measured: kept by at least 6 in 10 of the 23 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Magento 2 Module Upgrade
Bring an existing module up to a newer Magento or PHP target. The change list is derived (from scans), not user-described.
Core Rules
- Target before scan. Always resolve the upgrade target in Phase 1; never scan without a concrete target.
- Auto-fix only known-safe Rector rules. Manual approval required for non-trivial rewrites.
- BC-breaks are documented, not silently fixed. A BC-break may break callers; surface
it in
UPGRADE.mdso the consumer knows. - Per-task commits. Each Rector rule run, each manual edit, each BC-break note is its own commit. Reverting one shouldn't lose others.
- Test before declare-done. A passing test suite is the gate to Phase 7.
- Output budget. Follow
context/references/output-budget.md— targeted reads, summary-first test/lint output, long logs to files.
Workflow
Phase 0 — Context Resolution
Invoke context. Capture current Magento + PHP versions, framework constraint,
runner, tools (rector, phpstan, semgrep).
Phase 1 — Target Resolution
Determine the upgrade target from the user request:
| Phrase | Resolves to |
| "to Magento 2.4.7" | magento_target=2.4.7, keep PHP target |
| "to Magento 2.5" | magento_target=2.5.0, may force PHP bump |
| "drop PHP 8.1" | php_min=8.2, keep Magento target |
| "compatibility scan" | No target; full report on current code |
State the target explicitly. Ask for clarification if multiple targets fit.
Phase 2 — Scan
Run scanners in order; record what was available and what wasn't.
| Scanner | Purpose |
Adobe UCT (vendor/bin/uct upgrade:check, edition-gated) | First-party compatibility scan |
Rector (core rector/rector + hand-listed rules) | Identify rewritable deprecations |
vendor/bin/phpcs --standard=Magento2 (if magento/magento-coding-standard installed) | Magento-specific lints |
Custom AST scan (per references/deprecation-map.md) | Removed classes/methods per Magento version |
| Composer constraint scan | Detect constraints incompatible with target |
| PHPStan | Errors that surface only at the new PHP/Magento level |
Emit a scan report: each finding categorized as:
auto-fixable(Rector can do it)manual-fixable(needs human/LLM intervention)bc-break(caller must update; surfaces an API change)
Phase 3 — Plan (APPROVAL GATE)
Present the scan report grouped by category. Wait for "proceed."
The user can opt into --include-bc-breaks if they want the skill to attempt automated
BC-break remediation; default is "report only."
Phase 4 — Apply
- Auto-fixable: run Rector with the relevant rule set. One commit per rule set applied.
- Manual-fixable: edit each file directly. One commit per logical change.
- BC-break: write a note in
UPGRADE.md(template attemplates/upgrade-md.md) and skip the code change.
Phase 5 — Test
- Run unit tests; fix breaks introduced by changes.
- If module has no tests: invoke
test-generate --types=unitfor the changed files before applying further changes. - Run integration tests if available; fix breaks.
- If the module declares
webapi.xmlorschema.graphqls: run API tests.
Phase 6 — Review
Invoke review --diff against the pre-upgrade ref. Fix Critical/High
findings.
Phase 7 — Report
Save to {output_root}/upgrades/{Vendor}_{Module}-{from}-to-{to}-{date}.md, where
{output_root} is the --docs-root value when the caller passed one, else
{ctx.docs_root} (see "Output Root" below):
- Scope (versions, modules, scanners run)
- Findings (auto-fixed, manually-fixed, BC-breaks)
- BC-break consumer notice (paste of
UPGRADE.md) - Test results
- Recommended next steps
Also emit the JSON + SARIF siblings. Assemble the findings array per the shared schema
(context/references/findings-schema.md; category = deprecation / bc_break /
magento_compat / php_compat, severity per context/references/severity.md),
write it to a temp file, then run ${CLAUDE_SKILL_DIR}/scripts/emit-report.sh with
FINDINGS_FILE, TARGET_MODULE, TARGET_PATH, OUTPUT_BASENAME=<Vendor>_<Module>-<from>-to-<to>-<date>,
and DOCS_ROOT=<output_root>. It routes through the shared context hub emitter, so
the JSON is schema-valid and the .sarif sibling feeds CI / GitHub Code Scanning like every
other findings skill. (Previously an inline emitter wrote JSON only — no SARIF.)
Inputs
/upgrade --to-magento=2.4.7 --to-php=8.3 [--docs-root=<path>] <Vendor>_<Module>[,<Module>]Flags:
--to-magento=X.Y.Z--to-php=X.Y--scan-only— Phases 0-2 only; no edits.--auto-fix— Apply Rector without approval (Phase 3 skipped).--include-bc-breaks— Attempt automated BC-break remediation.--docs-root=<path>— output-root override; see "Output Root" below.
Outputs
{output_root}/upgrades/{Vendor}_{Module}-{from}-to-{to}-{date}.md
{output_root}/upgrades/{Vendor}_{Module}-{from}-to-{to}-{date}.json
{output_root}/upgrades/{Vendor}_{Module}-{from}-to-{to}-{date}.sarif
{ctx.magento_root}/app/code/{Vendor}/{Module}/UPGRADE.md # Consumer notice (always present after upgrade){output_root} (.docs by default, {ctx.docs_root}) is anchored at the project root,
never under {ctx.magento_root}, app/code, or a module dir. See the Artifact location
rule in context/SKILL.md.
Output root (--docs-root)
This skill accepts --docs-root=<path> (see context/references/artifact-layout.md).
The MD report is authored in-conversation and written under <path>/upgrades/; the JSON + SARIF
are produced by scripts/emit-report.sh, which passes DOCS_ROOT=<path> to the shared
context hub emitter so both land under <path>/upgrades/. When unset they default to
{ctx.docs_root}/upgrades/. Orchestrators such as feature pass this to
collect a run's artifacts under one folder.
Reference Files
references/magento-version-matrix.md— known BC breaks by Magento version.references/php-version-matrix.md— known BC breaks by PHP version.references/deprecation-map.md— deprecated → replacement API mapping.references/rector-rule-sets.md— Rector sets by Magento version.references/bc-break-notification.md— how to write UPGRADE.md entries.references/scanner-tools.md— tool probe catalogue.${CLAUDE_SKILL_DIR}/scripts/emit-report.sh— emits the findings JSON + SARIF via the sharedcontexthub emitter (emit-findings.sh).context/references/severity.md— shared five-point severity scale for findings.context/references/findings-schema.md— JSON findings-document structure and theoutputKindenum (upgradefor this skill).
Templates
templates/upgrade-md.md— module-level UPGRADE.mdtemplates/report.md— upgrade report
Edge Cases
| Case | Behaviour |
| Module has no tests | Phase 5 invokes test-generate to generate a smoke test before applying changes; subsequent fixes are validated against it. |
| Rector rule set isn't available | Skip auto-fix; report all findings as manual-fixable. |
| Module composer.json constraints can't accept the target Magento version | Phase 1 stops; user must accept a multi-target strategy or narrow scope. |
| Multi-module upgrade where modules depend on each other | Order topologically; one report per module; share an UPGRADE.md preface. |
Related Skills
| Phase | Skill |
| 0 | context |
| 5 | test-generate (when coverage gaps prevent safe upgrade) |
| 6 | review --diff |
Other versions28 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 28
- langwatch/langwatch★ 5ksame name
- nowork-studio/notfair-plugin★ 4.1ksame name
- nowork-studio/toprank★ 4ksame name
- agenticnotetaking/arscontexta★ 3.5ksame name
- heyitsnoah/claudesidian★ 2.6ksame name
- TokenRollAI/cc-plugin★ 483same name
- dcb/homeassistant-claude-kit★ 125same name
- rust-off-rails/rustoffrails★ 49same name
- jamillazarev/multica-ops★ 11same name
- rvdbreemen/adr-kit★ 10same name
18 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use new, init and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
codebycoreySkillnew
Start a new change with a proposal. Use when starting a feature, creating a proposal, or beginning planned work.
Also in 4 projects that use this
MicrosoftSkillinit
Also in 6 projects that use this
AnthropicSkillstatus
Case status summary by audience — client-facing (plain language), internal (for the professor), or court-ready (formal caption format per local rules). Same facts, different framing and depth. Use when a student needs to update the client, brief the professor, or prepare a court status report.
Also in 5 projects that use this
In this repository35 other files it gives its agents.
- a11y-auditSkill
- admin-formSkill
- admin-listingSkill
- auditSkill
- breeze-adaptSkill
- breeze-compatSkill
- breeze-themeSkill
- cli-commandSkill
- contextSkill
- data-migrationSkill
- debugSkill
- deploySkill
- docsSkill
- eav-attributeSkill
- extension-pointSkill
- featureSkill
- fixSkill
- frontendSkill
- graphqlSkill
- i18nSkill
- indexerSkill
- lintSkill
- marketplaceSkill
- message-queueSkill
- module-createSkill
- perf-auditSkill
- releaseSkill
- remediateSkill
- reviewSkill
- securitySkill
- system-configSkill
- test-generateSkill
- triageSkill
- webapiSkill
- widgetSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

