ワンクリックで
magento-upgrade
Plan and execute Magento 2 upgrades with UCT analysis, dependency waves, compatibility fixes, and verification gates
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Plan and execute Magento 2 upgrades with UCT analysis, dependency waves, compatibility fixes, and verification gates
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
Build Magento 2 admin grids using UI Component listing XML, data providers, and admin controllers with proper ACL integration
Implement Magento 2 GraphQL resolvers — define schema.graphqls types, write query and mutation resolvers, and handle authorization
Run Magento 2 CLI commands through Warden's Docker environment: warden shell, bin/magento, composer, Redis/Valkey, Varnish, OpenSearch, RabbitMQ, n98-magerun2, mutagen sync, and env lifecycle.
Adapt Luma-oriented Magento 2 modules to work with Hyva themes — replace RequireJS and Knockout with Alpine.js, Tailwind CSS, and ViewModels
Configure Magento 2 dependency injection — preferences, virtual types, constructor arguments, and proxy generation via di.xml
Implement Magento 2 plugins (interceptors) following best practices for before, after, and around method interception
SOC 職業分類に基づく
| name | magento-upgrade |
| description | Plan and execute Magento 2 upgrades with UCT analysis, dependency waves, compatibility fixes, and verification gates |
| installed_version | 1.0.0 |
| magehub_version | 0.1.13 |
Treat a Magento upgrade as a controlled migration program, not a single
composer update. Start with inventory, version requirements, dependency
ordering, and risk classification. Only move into edits after the target stack,
custom code impact, and verification gates are explicit.
Use this skill when the user asks to upgrade Adobe Commerce or Magento Open Source, move between 2.4.x patch/minor versions, apply security patch lines, raise the PHP/runtime platform, or assess upgrade readiness for custom modules.
Before proposing changes, collect and report:
magento/product-community-edition or magento/product-enterprise-edition).app/code, local Composer path repositories, custom
themes, patches, preference/plugin/observer counts, GraphQL/Web API exposure,
cron jobs, message queues, and payment/shipping integrations.When target requirements are unknown, check the current Adobe release notes and system requirements first. Do not rely on stale version matrices embedded in old prompts.
Run read-only discovery first:
git status --short
composer show magento/product-community-edition magento/product-enterprise-edition --locked
composer show --platform
composer outdated "magento/*" "laminas/*" "symfony/*" --direct
php -v
composer -V
bin/magento --version
bin/magento module:status
bin/magento setup:db:status
bin/magento config:show catalog/search/engine
find app/code -mindepth 2 -maxdepth 2 -type d | sort
If a command is environment-specific, adapt through the project's own wrapper
(ddev exec, docker compose exec, container shell, CI task, or deployment
script). Avoid running upgrade commands on production.
Build a module dependency graph from:
etc/module.xml <sequence> declarations.composer.json require constraints.Process providers before dependents. A typical plan:
Keep wave sizes small enough that failures can be diagnosed without reading a monolithic diff.
Use UCT when available, but treat it as one signal rather than the entire analysis. Cross-check UCT output with manual scans and runtime verification.
Core UCT checks:
bin/uct upgrade:check <magento-root> -c <target-version>
bin/uct upgrade:check --ignore-current-version-compatibility-issues <magento-root> -c <target-version>
bin/uct dbschema:diff <magento-root> <vanilla-target-root>
bin/uct core:code:changes <magento-root> <vanilla-target-root>
bin/uct graphql:compare <current-schema> <target-schema>
Use refactor only after previewing scope and after the user agrees to the
automatic changes. Keep tool output attached to the module or package it affects
instead of dumping one undifferentiated report.
For each custom module, inspect:
Zend_* references, outdated
Laminas bridges, and old serializer usage.Classify each module with evidence:
HIGH impact modules require explicit user approval before edits. MEDIUM impact modules should get a concise summary before changes. LOW impact modules can be handled in batch if the repository conventions allow it.
composer.lock snapshot,
database backup policy, media/config backup policy, and deployment freeze
window.setup:di:compile, targeted PHPUnit/integration tests, PHPStan/Psalm if the
project uses them, GraphQL schema checks, or relevant smoke tests.Use the project's actual toolchain, but cover these gates when applicable:
composer validate
composer install
bin/magento setup:upgrade --keep-generated
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento indexer:reindex
bin/magento cache:flush
vendor/bin/phpunit
vendor/bin/phpstan analyse
For Adobe Commerce Cloud, also check .magento.app.yaml, services.yaml,
ECE-Tools compatibility, build hooks, deploy hooks, and service upgrade tickets.
Prefer narrow compatibility fixes:
Magento\Framework\Serialize\Serializer\Json when data shape allows it.When reporting, use this shape:
End every upgrade session with the exact verification status. If a command was not run, say why.
Runs Upgrade Compatibility Tool checks for a target version and stores reports under var/upgrade-reports
#!/usr/bin/env bash
set -euo pipefail
target_version="${1:?Usage: uct-analysis.sh <target-version> [magento-root]}"
magento_root="${2:-$(pwd)}"
uct_dir="${UCT_DIR:-$magento_root/var/uct}"
report_dir="$magento_root/var/upgrade-reports/$target_version"
mkdir -p "$report_dir"
if [ ! -x "$uct_dir/bin/uct" ]; then
composer create-project magento/upgrade-compatibility-tool "$uct_dir" \
--repository https://repo.magento.com
chmod +x "$uct_dir/bin/uct"
fi
"$uct_dir/bin/uct" upgrade:check "$magento_root" \
-c "$target_version" \
--ignore-current-version-compatibility-issues \
--min-issue-level WARNING \
> "$report_dir/uct-upgrade-check.txt"
"$uct_dir/bin/uct" list > "$report_dir/uct-commands.txt"
printf 'UCT reports written to %s\n' "$report_dir"
Markdown template for target stack, readiness gates, wave plan, impact table, and pending manual work
# Magento Upgrade Plan
## Summary
- Source version:
- Target version:
- Edition:
- Runtime changes:
- Custom modules:
- Third-party packages:
- Deployment model:
## Readiness Gates
- [ ] Clean working tree or dedicated upgrade branch
- [ ] Database backup policy confirmed
- [ ] Composer credentials available
- [ ] Target system requirements checked
- [ ] Third-party extension compatibility checked
- [ ] UCT availability decided
## Wave Plan
| Wave | Scope | Modules or packages | Risk | Verification |
| ----- | --------------------- | ------------------- | ---- | --------------------- |
| 0 | Platform and Composer | | | composer install |
| 1 | Base custom modules | | | setup:di:compile |
| 2 | Dependent modules | | | targeted tests |
| Final | Themes and deployment | | | static-content deploy |
## Impact Table
| Module | Impact | Evidence | Proposed fix | Verification |
| ------------- | ------ | -------- | ------------ | ------------ |
| Vendor_Module | HIGH | | | |
## Pending Manual Work
| Owner | Module/file | Risk | Next action |
| ----- | ----------- | ---- | ----------- |
Example wave breakdown that keeps dependency providers ahead of dependent checkout or API modules
# Module Wave Report
## Wave 1
Modules with no custom-module dependencies. Fix these before dependent modules.
| Module | Depends on | Impact | Reason |
| ----------------- | ------------- | ------ | ------------------------------- |
| Vendor_Foundation | Magento_Store | MEDIUM | Plugin on core service contract |
## Wave 2
Modules that depend on Wave 1 providers.
| Module | Depends on | Impact | Reason |
| --------------- | ----------------------------------- | ------ | ------------------------------------ |
| Vendor_Checkout | Vendor_Foundation, Magento_Checkout | HIGH | Checkout plugin and GraphQL resolver |
## Stop Conditions
- Composer cannot resolve target package set.
- A HIGH impact module lacks approval for the proposed fix.
- `setup:di:compile` fails after a wave and the failure cannot be isolated.
- Database schema/data migration is not reversible without a fresh backup.
Example target package and PHP platform constraint to make dependency resolution deterministic
{
"require": {
"magento/product-community-edition": "2.4.9"
},
"config": {
"platform": {
"php": "8.4.0"
},
"sort-packages": true
}
}
Path template:
UPGRADE_PLAN.md
Upgrade planning worksheet for module waves, risk assessment, verification, and pending manual work
# Magento Upgrade Plan
## Summary
- Source version: {{source_version}}
- Target version: {{target_version}}
- Edition: {{edition}}
- Runtime changes: {{runtime_changes}}
## Readiness Gates
- [ ] Clean upgrade branch
- [ ] Database backup confirmed
- [ ] Target system requirements checked
- [ ] Third-party extension compatibility checked
- [ ] Verification commands agreed
## Wave Plan
| Wave | Scope | Modules or packages | Risk | Verification |
| --- | --- | --- | --- | --- |
| 0 | Platform and Composer | {{platform_scope}} | {{platform_risk}} | composer install |
## Pending Manual Work
| Owner | Module/file | Risk | Next action |
| --- | --- | --- | --- |