Generated banner for Azure Upgrade
Generated logo for Azure Upgrade

Azure Upgrade

MicrosoftOfficialCreated by Microsoft

  • Skill
  • Workflow
  • Cloud and DevOps
  • MIT
  • Low risk
  • Has scripts

From the author

Assess and upgrade Azure workloads between plans, tiers, or SKUs, or modernize Azure SDK dependencies in source code. WHEN: upgrade Consumption to Flex Consumption, upgrade Azure Functions plan, change hosting plan, function app SKU, migrate App Service to Container Apps, modernize legacy Azure Java SDKs (com.microsoft.azure to com.azure), migrate Azure Cache for Redis (ACR/ACRE) to Azure Managed Redis (AMR).
— the description by Microsoft

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

Azure Upgrade provides a structured, automated approach to upgrading Azure resources and modernizing source code dependencies. It supports complex transitions such as moving Azure Functions from Consumption to Flex Consumption, migrating various Redis cache tiers to Azure Managed Redis, and refactoring legacy Java applications from the deprecated com.microsoft.azure SDKs to the modern com.azure ecosystem. The skill enforces safety through pre-migration assessments, explicit user confirmation for destructive actions, and idempotent automation scripts, ensuring that original workloads remain intact until the new configuration is fully validated.

What it does

  • Assesses Azure workloads for upgrade readiness across plans, tiers, and SKUs.
  • Automates the migration of Azure Functions from Consumption to Flex Consumption.
  • Modernizes legacy Java applications by replacing deprecated com.microsoft.azure SDKs with modern com.azure equivalents.
  • Facilitates the migration of Azure Cache for Redis (ACR/ACRE) to Azure Managed Redis (AMR).
  • Generates detailed migration status reports and maintains artifact isolation.
  • Provides a safe, gated workflow requiring user approval for all resource creation and configuration changes.

When to use it

  • When you need to upgrade your Azure Functions hosting plan to a more performant or cost-effective tier.
  • When your Java project relies on deprecated Azure SDKs and requires modernization to supported libraries.
  • When migrating existing Redis cache instances to the newer Azure Managed Redis service.
  • When you need a repeatable, documented process for changing Azure resource SKUs or hosting plans.

Advantages

  • Reduces manual effort and risk during complex infrastructure and code migrations.
  • Ensures safety by requiring explicit user approval for all destructive or state-changing operations.
  • Maintains high availability by keeping original resources running until the new ones are validated.
  • Promotes security best practices by encouraging the use of managed identities over connection strings.
  • Provides clear, step-by-step guidance for both infrastructure upgrades and source-code refactoring.

Usage examples

“Upgrade my function app from Consumption to Flex Consumption”
The agent will identify the current plan, assess compatibility, and guide you through the migration steps to the Flex Consumption plan.
“Migrate my Java project from com.microsoft.azure to com.azure”
The agent will inventory legacy dependencies, provide a migration plan, and assist in updating your build files and source code imports.
“Migrate my Redis cache to AMR”
The agent will assess your current Redis configuration and execute the migration path to Azure Managed Redis.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/microsoft/azure-upgrade/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip azure-upgrade.zip -d .agents/skills

Documentation by Microsoft

Azure Upgrade

This skill handles assessment and automated upgrades of existing Azure workloads from one Azure service, hosting plan, or SKU to another — all within Azure. This includes plan/tier upgrades (e.g. Consumption → Flex Consumption), cross-service migrations (e.g. App Service → Container Apps), and SKU changes. It also covers Azure SDK for Java source-code modernization (e.g. legacy Java com.microsoft.azure.* → modern com.azure.*). This is NOT for cross-cloud migration — use azure-cloud-migrate for that.

Triggers

User IntentExample Prompts
Upgrade Azure Functions plan"Upgrade my function app from Consumption to Flex Consumption"
Discover Functions upgrade candidates"What Consumption Function Apps do I have that can be upgraded to Flex Consumption?"
Change hosting tier"Move my function app to a better plan"
Assess upgrade readiness"Is my function app ready for Flex Consumption?"
Automate plan migration"Automate the steps to upgrade my Functions plan"
Modernize legacy Azure Java SDK"Migrate legacy Azure SDKs for Java", "Upgrade legacy Azure Java SDK", "Migrate my Java project from com.microsoft.azure to com.azure"
Migrate Azure Cache for Redis (ACR/OSS) to Azure Managed Redis (AMR)"Migrate my Redis cache to AMR", "ACR to AMR", "OSS to AMR", "Upgrade my Premium P2 cache to Managed Redis", "Pick an AMR SKU", "Convert my Redis IaC template to AMR"
Migrate Azure Cache for Redis Enterprise (ACRE) to Azure Managed Redis (AMR)"Migrate my Enterprise_E10 cache to AMR", "ACRE to AMR", "Update my ACRE IaC template for AMR", "Migrate EnterpriseFlash to AMR", "Migrate my geo-replicated Enterprise Redis"

Rules

  1. Follow phases in order. Skip or defer work only when the selected scenario explicitly permits it, and record the reason in the migration status.

  2. Generate an assessment before any upgrade operations

  3. Load the scenario reference and follow its rules

  4. Use mcp_azure_mcp_get_azure_bestpractices and mcp_azure_mcp_documentation MCP tools

  5. Destructive actions require ask_user — global-rules

  6. Always confirm the target plan/SKU with the user before proceeding

  7. Propose a name for any new resource (default: <source>-<target-suffix>, e.g. <source>-flex for Flex Consumption migrations) and announce the proposed name to the user before creating it so they can override without a blocking prompt. Same pattern applies to other newly-created resources (storage accounts, App Insights, etc.) — see the scenario reference for service-specific defaults.

  8. Windows Consumption → Flex source-change gate: treat the source app as read-only by default. Immediately before every command that would change its settings, triggers, state, deployment, bindings, or existence, use ask_user to describe the exact change and obtain explicit approval. Approval is action-specific and cannot be reused for later source changes.

  9. Never delete or stop the original app without explicit user confirmation

  10. Keep approval-gated workflows moving: after each completed step, immediately perform the next read-only preflight. If the next action requires approval, invoke ask_user in the same turn — never stop after merely announcing the next step and wait for the user to re-engage.

  11. All automation scripts must be idempotent and resumable

Upgrade Scenarios

SourceTargetReference
Azure Functions Consumption Plan (Linux)Azure Functions Flex Consumption Planworkflow.md
Azure Functions Consumption Plan (Windows)Azure Functions Flex Consumption Planworkflow.md
Legacy Azure Java SDK (com.microsoft.azure.*)Modern Azure Java SDK (com.azure.*)languages/java/README.md
Azure Cache for Redis (ACR/OSS) Basic/Standard/PremiumAzure Managed Redis (AMR)services/redis/redis-to-amr.md
Azure Cache for Redis Enterprise (ACRE) / Enterprise FlashAzure Managed Redis (AMR)services/redis/redis-to-amr.md

Functions Consumption-to-Flex routing: For a named app, inspect its Azure platform and load only the matching Linux or Windows workflow. For subscription-wide discovery, evaluate both platforms: use az functionapp flex-migration list for Linux and the Windows workflow's manual discovery and compatibility checks for Windows. Label Windows results as candidates until per-app code compatibility is assessed.

SDK upgrade scenarios (e.g. Java legacy → modern) run a source-code modernization flow that is distinct from Azure service/plan/SKU upgrades: follow the scenario reference, not the Steps below.

No matching scenario? Use mcp_azure_mcp_documentation and mcp_azure_mcp_get_azure_bestpractices tools to research the upgrade path.

MCP Tools

ToolPurpose
mcp_azure_mcp_get_azure_bestpracticesGet Azure best practices for the target service
mcp_azure_mcp_documentationLook up Azure documentation for upgrade scenarios
mcp_azure_mcp_appserviceQuery App Service and Functions plan details
mcp_azure_mcp_applicationinsightsVerify monitoring configuration

Steps

  1. Identify — Determine the source and target Azure plans/SKUs. Ask user to confirm.

  2. Assess — Analyze existing app for upgrade readiness → load scenario reference (e.g., workflow.md)

  3. Pre-migrate — Collect settings, identities, configs from the existing app

  4. Upgrade — Execute the automated upgrade steps (create new resources, migrate settings, deploy code)

  5. Validate — Use the checks defined by the selected scenario: verify target resource state, applicable HTTP endpoints and non-HTTP triggers, and monitoring. If access restrictions or unavailable test resources prevent execution, record validation as deferred — never relax security automatically or report functional success.

  6. Ask User — Offer performance validation and IaC updates. Offer source cleanup only when the selected scenario confirms production cutover and all cleanup prerequisites are complete.

  7. Hand off to azure-validate for deep validation or azure-deploy for CI/CD setup

Track progress in <UPGRADE_DIR>/upgrade-status.md — see Artifact Output Policy for path resolution.

References

Next

After upgrade is validated, hand off to:

  • azure-validate — for thorough post-upgrade validation

  • azure-deploy — if the user wants to set up CI/CD for the new app

Files

references/services/functions/consumption-to-flex/windows/dependency-scan.md

Source Code Windows Dependency Scan

When: Phase 1 Assessment, after Step 2f, as Step 2g. Always recommended, never required. If the user skips, proceed — they own the runtime risk.

What This Scan Does

Walks the source tree for code, config, and packaging patterns that depend on Windows. Prefer source code because project manifests and API usage are directly inspectable. Use the deployed package from Step 3e only when source is unavailable; it confirms what is running but may contain compiled artifacts that reduce scan coverage. Findings populate §11 of the assessment report; ≥1 Blocker finding advisorily flips §1 Upgrade Readiness to Needs Attention (never hard-blocks).

⚠️ Heuristic aid, not a guarantee. This scan pattern-matches the most common Windows-only APIs, packages, RID targeting, and shell-outs to Windows tools. It is not exhaustive — uncommon Windows APIs, dynamically-loaded DLLs, transitive package dependencies, reflection-based calls, and runtime-generated code can slip past. The app owner is ultimately responsible for verifying their code has no Windows dependencies. False negatives are dangerous; false positives create friction. The scan's job is to inform, not gate.

Inputs

  1. Source location — use ask_user to explicitly request a local source directory or checked-out repository path; do not infer that the current workspace contains the function app. Explain that source provides the best scan coverage. If the user cannot provide source, offer the deployed package from Step 3e as a fallback. If they decline both, write "scan skipped" to §11 and stop.

  2. Language — auto-dispatched from FUNCTIONS_WORKER_RUNTIME (captured in Step 2b). Always run the agnostic set + the matching per-language set.

  3. custom worker — agnostic set only; ask once if the handler is C#, Node, Java, Python, or PowerShell source and layer in that set if so.

Categories

#Category
1Win32 / WinRT / COM / WMI APIs
2Path / case / line-ending / env-var assumptions
3Windows certificate store
4Windows registry
5Windows-only packages
6Windows-RID / net4x targeting
7Windows-only PowerShell modules
8Shelling out to Windows tools

Finding Severity

SeverityMeaningEffect on §1
🛑 BlockerWill definitely fail on Linux (e.g. [DllImport("kernel32.dll")], Microsoft.Win32.Registry, System.Drawing.Common on .NET 6+, .exe handler for custom worker)Needs Attention (advisory)
⚠️ LikelyOften breaks but may be guarded (backslash paths, drive letters, RID-specific package refs)None
ℹ️ ReviewHeuristic worth a human eye (any P/Invoke, any external Process.Start, package name containing Windows)None

How to Read These Patterns

Each bullet below states a principle followed by anchor examples. Treat the examples as starting points, not as an exhaustive whitelist — when you encounter similar patterns that aren't enumerated (a different system DLL, a different System.* namespace prefix, a different Windows admin exe, a different Windows-only PowerShell module, a different win32-flavored npm package name), flag them under the same category. The category headers in bold are the rule; the examples after the em-dash are how that rule commonly shows up.

Language-Agnostic Patterns

Run for every worker runtime. Cite the category number on each finding.

  • (2) Windows path / env-var literals — path-like strings with a drive letter (@"C:\...", "D:\\...") or Windows env-var references in the %FOO% shape (%TEMP%, %USERPROFILE%, %WINDIR%, %PROGRAMFILES%, %APPDATA%, %LOCALAPPDATA%, …).

  • (2) CRLF-dependent parsing — Split("\r\n"), byte-exact file reads, anything that hard-codes \r\n line endings.

  • (8) Spawning a Windows-only executable — language-specific syntax varies (see per-language), but the executable is one of: cmd, powershell/pwsh, cscript, wscript, reg, wmic, tasklist, net, sc, iisreset, netsh, wevtutil, or any path ending .exe/.bat/.cmd/.ps1.

  • (8) Windows device / pipe paths — paths starting with \\.\ (devices, named pipes), \\?\ (Win32 long-path namespace), or \\.\pipe\ specifically. No Linux equivalent.

  • (6) Windows-RID in build/deploy config — .csproj/.fsproj/launchSettings.json/Dockerfile/pipeline yaml referencing win-x64, win-x86, win-arm64, or win10-* outside a Windows-only condition.

  • (6) Windows-only runtimes/win-*/ payload — deployment package contains runtimes/win-*/ without a matching runtimes/linux-x64/.

Per-Language Patterns

dotnet-isolated
  • (1) Win32 P/Invoke — [DllImport("<dll>")] of any Windows system DLL: kernel32, user32, advapi32, ole32, gdi32, shell32, ntdll, wininet, crypt32, etc.

  • (1) Windows-only .NET namespaces — using directives, fully-qualified type names, or PackageReference whose namespace prefix exists only to wrap Windows. Match the prefix, not the leaf type. Known prefixes: System.Drawing.* (GDI+), System.DirectoryServices.* (ADSI/LDAP), System.Management.* (WMI), Microsoft.Win32.* (registry, scheduler), System.ServiceProcess.* (Windows services), Microsoft.Office.Interop.*.

  • (1) COM activation — [ComImport], Marshal.GetActiveObject, Type.GetTypeFromProgID / …FromCLSID, Activator.CreateInstance of a COM type, or string-literal ProgIDs (WScript.Shell, Excel.Application, Word.Application, …).

  • (3) Windows certificate store — X509Store(StoreLocation.LocalMachine | CurrentUser). Linux uses an OpenSSL-backed store; behavior differs even where the API exists.

  • (4) Windows registry — anything under Microsoft.Win32.Registry* (Registry.LocalMachine, Registry.CurrentUser, Registry.ClassesRoot, RegistryKey.*).

  • (5) Windows-only NuGet packages — <PackageReference> id matching *Windows*, *.Win32*, or *.Office.Interop.*. Specific offenders: System.Drawing.Common, System.Management, System.DirectoryServices.AccountManagement, Microsoft.Windows.Compatibility, WindowsAzure.Storage.

  • (6) Windows-RID targeting — <RuntimeIdentifier> / <RuntimeIdentifiers> containing any win-* (win-x64, win-x86, win-arm64, win10-*) without a matching linux-*.

  • (6) net4x target framework — <TargetFramework[s]> containing net4 (also in Known Limitations).

  • (8) Shelling out to a Windows-only tool — Process.Start(...) / new ProcessStartInfo(...) whose executable matches the agnostic Windows-tool list.

node
  • (1) Windows-only npm packages — require/import of packages whose purpose is wrapping Windows. Naming patterns: node-windows-*, windows-*, win32-*. Known: node-windows, windows-shortcuts, windows-foreground-love, node-task-scheduler, edge/edge-js (CLR bridge), regedit.

  • (5) Windows-only npm dependencies — package.json deps matching the naming patterns above, or os: ["win32"] (refuses to install on Linux), or cpu constraints excluding Linux arches.

  • (6) Pre-built Windows native add-ons — node_modules/**/*.node files that are PE-format. Any .node shipped without a Linux-built equivalent fails to load. Solution: rebuild on Linux at deploy time.

  • (8) Shelling out to a Windows-only tool — child_process.exec/spawn/execSync whose command matches the agnostic Windows-tool list.

java
  • (1) Windows-only Java APIs — import of namespaces wrapping Windows: com.sun.jna.platform.win32.*, com.jacob.* (COM bridge), org.eclipse.swt.win32.*, anything ending in .win32. Also flag System.loadLibrary / System.load whose argument resolves to a .dll.

  • (5) Windows-only Maven/Gradle deps — pom.xml / build.gradle entries whose groupId:artifactId contains windows, win32, or jacob. Anchors: com.sun.jna:jna-platform, net.sf.jacob-project:jacob, org.eclipse.swt.win32.*.

  • (6) Bundled Windows native binaries — .dll files under src/main/resources/, META-INF/native/, or shaded into the jar — won't load on Linux even if the calling Java is portable.

  • (8) Shelling out to a Windows-only tool — Runtime.exec(...) / new ProcessBuilder(...) whose command matches the agnostic Windows-tool list.

python
  • (1) Windows-only Python modules — import of any module in the win32* family (win32api, win32com, win32con, win32event, win32file, win32process, win32security, …), the registry interfaces (winreg, _winreg), or COM/WMI bridges (pythoncom, wmi, pywinauto, comtypes, pythonnet).

  • (1) Win32 via ctypes — ctypes.windll.*, ctypes.WinDLL(...), ctypes.OleDLL(...). The ctypes.windll attribute itself only exists on Windows Python.

  • (5) Windows-only pip dependencies — requirements.txt / pyproject.toml / Pipfile entries whose name signals Windows-only (pywin32, pywinauto, wmi, winshell, pythonnet, comtypes, win32-*) or pinned via sys_platform == 'win32' environment marker without an alternate branch.

  • (8) Shelling out to a Windows-only tool — subprocess.run/Popen/call or os.system whose command matches the agnostic Windows-tool list.

powershell

Flex Consumption packaging check: Inspect host.json, requirements.psd1, and the app-root Modules folder to determine whether the app relies on managed dependencies. Flex Consumption doesn't support managed dependencies, even for Linux-compatible modules. If required modules aren't bundled with the app, record that preparation is required in assessment report §11 and advise packaging them in Modules before deployment. Verify that the deployment package includes the required modules and their dependencies. Any source or packaging changes require user approval.

  • (1, 7) WMI / CIM cmdlets — Get-WmiObject, Get-CimInstance, Invoke-WmiMethod, Invoke-CimMethod. PowerShell 7 on Linux silently returns null instead of erroring — failures are easy to miss.

  • (1) COM activation & Windows-only providers — New-Object -ComObject …, Get-EventLog, Windows-service form of Get-Service/*-Service, anything in Microsoft.PowerShell.LocalAccounts.

  • (4, 7) Registry cmdlets / provider paths — any access to the Registry:: provider: Get-ItemProperty Registry::*, Get-ChildItem HKLM: / HKCU: / HKCR:, Set-ItemProperty -Path HKLM:\…, New-PSDrive -PSProvider Registry.

  • (7) Windows-only modules — Import-Module of modules shipped only with Windows PowerShell, RSAT, or a Windows feature. Anchors: ActiveDirectory, GroupPolicy, ServerManager, Hyper-V, BitsTransfer, ScheduledTasks, MSOnline, AzureAD, Dism.

  • (3) Windows certificate store — paths under Cert:\LocalMachine\* or Cert:\CurrentUser\*. Linux PowerShell has a limited read-only implementation.

  • (7) requirements.psd1 RequiredModules — pinning any module above.

  • (8) Shelling out to a Windows-only tool — & cmd.exe …, Start-Process of a Windows binary, Invoke-Expression of any Windows admin command line.

go
  • (1) Windows-only Go APIs — imports of golang.org/x/sys/windows or calls to syscall.NewLazyDLL, windows.NewLazySystemDLL, or other Windows DLL-loading APIs.

  • (5, 6) Windows-only build constraints — required source files named *_windows.go, //go:build windows constraints without a Linux implementation, or build/deployment configuration that sets GOOS=windows.

  • (6) Windows handler binaries — deployed .exe or PE-format handler binaries without a Linux ELF equivalent.

  • (8) Shelling out to a Windows-only tool — os/exec.Command or CommandContext whose executable matches the agnostic Windows-tool list.

custom

Run the agnostic set, plus:

  • (6) Handler binary is a Windows PE — file <handler> reports PE32+ executable … for MS Windows → 🛑 Blocker (must be rebuilt for Linux).

  • (6) Bundled Windows native deps — .dll files in the package without matching .so / Linux ELF.

  • (8) Windows-script handler entry-point — host.json customHandler.description.defaultExecutablePath ending in .exe, .bat, .cmd, or .ps1.

If the user identifies the handler's source language as one of the supported seven, also layer in that set.

Output

Each finding:

- category: 1-8
  severity: blocker | likely | review
  file: <relative path>
  line: <line number, if applicable>
  match: <the matched code or setting>
  remediation: <one-line fix or "Migrate to Elastic Premium on Windows">

Findings populate §11 Source Code Windows Dependency Scan of the assessment report — see the template in assessment.md. If the user declined the scan, write "User declined the source code dependency scan. Migration proceeded without static analysis of Windows dependencies." in place of the findings table.

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs Python

The author says: python3.10+

Security

What our scanner noticed· Low risk

  • Instructions that use the network
  • Scripts that your agent may run

This skill includes scripts that your agent may run. Read them before you use it.

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
Microsoft
Publisher
Microsoft (Official)
Source
microsoft/skills · .github/plugins/azure-skills/skills/azure-upgrade · commit 0696600
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from .github/plugins/azure-skills/LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced
Also distributed in
microsoft/azure-skills

AutoGineer is not affiliated with or endorsed by Microsoft.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download azure-upgrade.zip