UI5アプリケーションを最新化するための包括的なワークフロー 次のような場合に使用: - ユーザーがUI5アプリを最新化したい - ユーザーが「UI5の最新化」「UI5アプリを最新化したい」「UI5をアップグレードしたい」「アプリをUI5の最新規格に対応させたい」と述べている - ユーザーが「すべてのリンター(コード検査ツール)エラーを修正してほしい」「フル最新化を実行してほしい」「UI5プロジェクトを最新化してほしい」と依頼している このスキルは5つのフェーズに分けて最新化を進め、各フェーズ終了後に確認ゲートを設けます。ユーザーは開始時に一度だけ検証モードを選択します(完全自動 / 半自動 / 手動)。その後、エージェントはすべてのゲートでその選択内容を適用し、再度確認することはありません。
End-to-end workflow for modernizing a UI5 application. Use this skill when: - User wants to modernize their UI5 app - User mentions "UI5 modernization", "modernize UI5 app", "upgrade UI5", "make app modern UI5 compatible" - User asks to "fix all linter errors", "run full modernization", "modernize my UI5 project" This skill runs the modernization in five phases with a verification gate after each phase. The user picks the verification mode once at the start (full autonomous / half autonomous / manual). The agent applies that mode at every gate without re-asking.
This skill modernizes a UI5 application in five phases, each followed by a verification gate. The user picks the gate behavior once at the start — full autonomous, half autonomous, or manual — and the orchestrator applies that choice at every phase boundary.
manifest.json and Component.js. Everything downstream reads the manifest.A documentation pass writes MODERNIZATION-REPORT.md and MODERNIZATION-ISSUES.md after phase 5.
| Rule ID | Skill | Phase |
|---|---|---|
no-deprecated-theme |
fix-bootstrap-params |
4 |
no-outdated-manifest-version |
fix-manifest-json |
2 |
no-legacy-ui5-version-in-manifest |
fix-manifest-json |
2 |
no-deprecated-library |
fix-manifest-json (manifest) or fix-bootstrap-params (HTML) |
2 / 4 |
no-deprecated-component |
fix-manifest-json |
2 |
no-removed-manifest-property |
fix-manifest-json or fix-component-async |
2 |
async-component-flags |
fix-component-async |
2 |
no-globals |
fix-xml-globals (ALL XML) or fix-js-globals (JS — sap./jQuery.) |
3 |
no-ambiguous-event-handler |
fix-xml-globals |
3 |
no-deprecated-control-renderer-declaration |
fix-control-renderer |
4 |
ui5-class-declaration |
fix-control-renderer |
4 |
no-pseudo-modules |
fix-pseudo-modules |
3 |
no-implicit-globals |
fix-pseudo-modules |
3 |
unsupported-api-usage |
fix-partially-deprecated-apis |
4 |
prefer-test-starter |
modernize-test-starter |
1 |
csp-unsafe-inline-script |
fix-csp-compliance |
5 |
| (structural) | fix-cyclic-deps |
3 |
| (runtime) | fix-linter-blind-spots |
3 |
no-deprecated-api| File Type | Message Contains | Skill | Phase |
|---|---|---|---|
.html |
"bootstrap parameter", "deprecated theme" | fix-bootstrap-params |
4 |
manifest.json |
"view type", "model type", "resources/js" | fix-manifest-json |
2 |
.js |
"Lib.init/Library.init" | fix-library-init |
4 |
.js |
"deprecated renderer", "apiVersion", "IconPool", "rerender" | fix-control-renderer |
4 |
.js |
"deprecated class/property/interface" | fix-deprecated-controls |
4 |
.js |
"registerControllerExtensions" or sap.ui.controller in manifest sap.ui.controllerExtensions |
fix-fiori-elements-extensions |
4 |
.js |
"sap.ui.controller" NOT in manifest extensions | fix-js-globals (case 9) |
3 |
.js |
"jQuery.sap.declare", "jQuery.sap.require" | fix-js-globals (case 10) |
3 |
.js |
"getLibraryResourceBundle" | fix-js-globals |
3 |
.js |
"MessagePage" | fix-deprecated-controls |
4 |
.js |
"Parameters.get", "loadData", "Mobile.init", "createEntry", "View.create", "Fragment.load", "Router" | fix-partially-deprecated-apis |
4 |
.xml |
"native HTML", "SVG" | fix-xml-native-html |
4 |
.xml |
"visibleRowCountMode", row-mode attrs | fix-table-row-mode |
4 |
.xml |
"MessagePage" | fix-deprecated-controls |
4 |
| any | (no match) | Log to MODERNIZATION-ISSUES.md |
— |
npx @ui5/linter --version || echo "ERROR: @ui5/linter not available"
If not installed, tell user to run npm install --save-dev @ui5/linter and stop.
If the prompt contains "Do not ask for confirmation" or similar: skip mode selection, skip gates, skip commits, skip documentation. Execute phases 1–5 sequentially without pausing.
| Mode | What happens at each gate |
|---|---|
| Full autonomous | Run tests → on failure, debug+fix (stop after 3 retries or 1 failed debug). On stop, emit report and ask user. |
| Half autonomous | Run tests → emit structured report. Wait for user "continue". |
| Manual | Skip tests. Print one-line summary. Wait for user "continue". |
Save mode. Do not re-ask between phases.
Read references/build-and-test-commands.md. Chrome DevTools MCP must be connected (install via /install-mcps if needed).
pom.xml exists → Maven. Use §1.3 (mvn clean verify -P execute.qunit ...) for gates.pom.xml → npm. Use package.json scripts. Fallback: npx @ui5/linter --details.sap.ui.xmlfragment(), sap.ui.component(), sap.ui.view(), sap.ui.controller() (instantiation) → document in MODERNIZATION-ISSUES.md.MODERNIZATION-ISSUES.md is a last resort. Valid: no skill exists, or a skill genuinely failed. Invalid: "~N remaining errors for rule X" while a skill exists.One commit per phase, five total (plus documentation). Stage only files modified in that phase — never git add -A.
Never stage: headless-chrome.json, pom.xml (dev profile patch), .gitignore (local test infra).
| # | After Phase | Message |
|---|---|---|
| 1 | 1 | chore: apply UI5 linter autofix and modernize test starter |
| 2 | 2 | fix: modernize manifest.json and Component.js |
| 3 | 3 | fix: modernize module system (globals, pseudo-modules, cycles, blind spots) |
| 4 | 4 | fix: replace deprecated UI5 APIs |
| 5 | 5 | fix: enforce CSP compliance |
| 6 | Docs | docs: add modernization report and issues |
Skip commit if phase makes no changes.
npx @ui5/linter --details 2>&1 | tee /tmp/ui5-linter-baseline.txt
grep -c " error \| warning " /tmp/ui5-linter-baseline.txt || echo "0"
Parse: total errors/warnings, grouped by rule ID and file. Store for final comparison.
npx @ui5/linter --fix
npx @ui5/linter --details 2>&1 | tee /tmp/ui5-linter-post-autofix.txt
Launch sub-agent with modernize-test-starter. Use custom prompt instructing it to: read the skill, run Phase 0 detection completely before changes, follow ALL phases, verify against the 14-item Completion Checklist.
Launch sub-agent with fix-manifest-json. Pass all manifest.json errors from rules: no-outdated-manifest-version, no-legacy-ui5-version-in-manifest, no-deprecated-library, no-deprecated-component, no-removed-manifest-property, plus no-deprecated-api with "view type"/"model type"/"resources/js".
Launch sub-agent with fix-component-async. Unconditional — apply even if linter didn't flag async-component-flags (the error only appears after manifest.json removes async: true from rootView).
node {skills-dir}/fix-component-async/scripts/verify-component.js {project-path}
If exit code 1, fix: imported-interface → remove from deps, use string literal; interface-not-string → replace variable with string; missing-interface → add to metadata. Re-run to confirm.
Strategy: Three global/module skills run in parallel (different files). fix-linter-blind-spots and fix-cyclic-deps run sequentially after (need stable complete JS layer).
Critical: Always use sub-agents for Step 3.1. The fix-js-globals Key Rules are not in main-agent context.
Launch sub-agents in parallel (up to 8 concurrent):
fix-js-globals for JS no-globals errors + routed no-deprecated-api casesfix-pseudo-modules for no-pseudo-modules / no-implicit-globalsfix-xml-globals for ALL XML no-globals / no-ambiguous-event-handler (including app-namespace globals)Test resources are included — same rules apply to test/ files.
Re-run linter. If new errors appear for Step 3.1 rules, launch a second batch for those. Ignore errors belonging to other phases.
Launch one sub-agent. Instruct it to: read the skill, read manifest for namespace, run detect-blind-spots.js, fix all patterns, re-run script to confirm zero total.
Launch one sub-agent. Instruct it to: read the skill, build dependency graph, auto-fix 2-node cycles (lazy require), flag 3+ node chains in MODERNIZATION-ISSUES.md.
Re-run linter to verify no regression before committing.
Strategy: Skills target different rules/files → run in parallel by skill. Group errors by skill using the mapping tables, launch one sub-agent per file (or cluster).
Launch sub-agents in parallel (up to 8 concurrent). Use the Sub-Agent Prompt Template. Group files by skill.
Re-run linter. Second batch for new Phase 4 errors only.
CSP comes last because earlier phases may introduce inline blocks.
Critical: never delete inline scripts — always externalize. Move inline code to .js file, replace with <script src="...">.
Launch sub-agents for files with csp-unsafe-inline-script. Use template with fix-csp-compliance.
Final linter run for error count.
After every phase commit, run the gate matching the mode chosen in Phase 0. Use 600000ms timeout for all test commands.
Delegate to a sub-agent. Print ⏳ Phase {N} gate: launching test sub-agent...
Sub-agent instructions:
references/build-and-test-commands.md → detect Maven vs npmtarget/surefire-reports/.✅ TESTS OKAfter return: ✅ → proceed. ❌ → print summary, ask user.
Same sub-agent but do NOT debug failures. Report results only:
✅/❌ Tests: N passed, N failed, N skipped
Failed test names (≤10)
Wait for user: "continue" / "skip phase" / "run tests" / "abort".
Print: Phase {N} done. Files: {count}. Fixed: {count}. Deferred: {count}.
Wait for user "continue".
Fix UI5 linter errors in the following file(s) using the {skill-name} skill.
Project root: {project-path}
File: {file-path}
Errors to fix:
{errors}
Instructions:
1. Read {skills-dir}/{skill-name}/SKILL.md
2. Pay special attention to "Key Rules" — load-bearing constraints from past failures.
3. Read reference files mentioned in the skill.
4. Read the affected file(s).
5. Apply fix patterns EXACTLY as documented.
6. Verify each error is resolved.
7. Report: files modified, errors fixed, unfixable errors ({file}:{line} | {rule} | {reason}).
| Phase | Skills |
|---|---|
| 1 | modernize-test-starter |
| 2 | fix-manifest-json, fix-component-async |
| 3 (parallel) | fix-js-globals, fix-pseudo-modules, fix-xml-globals |
| 3 (sequential) | fix-linter-blind-spots, fix-cyclic-deps |
| 4 | fix-bootstrap-params, fix-library-init, fix-control-renderer, fix-deprecated-controls, fix-fiori-elements-extensions, fix-partially-deprecated-apis, fix-table-row-mode, fix-xml-native-html |
| 5 | fix-csp-compliance |
Create MODERNIZATION-ISSUES.md and MODERNIZATION-REPORT.md using templates in references/documentation-templates.md.
Commit: docs: add modernization report and issues
The main agent never reads child skill files — only sub-agents do.
If a fix genuinely fails: log, add to MODERNIZATION-ISSUES.md, continue with next error.
git add -A)原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。