azure-cleanup

Inspect and delete Azure project resources with confirmation-gated cleanup scopes.

Updated Aug 1, 2026
One-click install
npx skills add https://github.com/QuyDu/Skills-Orchestrator --skill azure-cleanup-quydu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: azure-cleanup
Source: https://github.com/QuyDu/Skills-Orchestrator/tree/main/.github/skills/azure-cleanup
Command: npx skills add https://github.com/QuyDu/Skills-Orchestrator --skill azure-cleanup-quydu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Removing leftover Azure resources after a project ends is risky: deleting the wrong resource group or relying on name matching can destroy unrelated infrastructure. This Skill performs read-only discovery first and only deletes resources after ownership verification and explicit user confirmation. ## Core Features & Use Cases - Read-Only Discovery by Default: Lists the exact subscription, cloud, resource group, and resources without making any changes unless confirmed. - Scoped Cleanup: Supports three scopes — a single resource, a named resource group, or the entire verified project resource group via -All. - Cloud and Ownership Verification: Resolves Azure Commercial or Azure US Government clouds and refuses to delete groups that fail project-ownership checks. - Use Case: After decommissioning a project, run a WhatIf inspection to see exactly which resources in rg-contoso-api would be removed, review the cleanup report, then confirm deletion of only the verified scope. ## Quick Start Ask the agent to run azure-cleanup in WhatIf mode for your project resource group and show what would be deleted before confirming anything.

Frequently Asked Questions about azure-cleanup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely delete Azure resources for a project?

Run the cleanup in WhatIf mode first to list the exact subscription, resource group, and resources targeted for deletion. Destructive operations only proceed after you explicitly confirm the displayed scope, and ownership of the resource group is verified beforehand.

How to remove a single Azure resource without deleting the whole resource group?

Use the -Resource option with the resource name, optionally scoped by -RG to a specific resource group. Only the exact resource ID you select is deleted, never resources matched by name alone.

Does Azure cleanup work with Azure Government cloud?

Yes, the cleanup supports both Azure Commercial and Azure US Government clouds. Pass -Gov or -Commercial explicitly, or rely on the persisted cloud profile, which defaults to Azure Commercial when no profile exists.

What happens if Azure resource ownership cannot be verified?

The cleanup stops immediately on ambiguous ownership or multiple resource matches. It never falls back to deleting by name match, and all findings are preserved in the cleanup report even when deletion fails.

Where are Azure cleanup results and evidence stored?

Cleanup evidence is written to reports/azure-cleanup.json and reports/azure-cleanup.md. These reports record the scope, cloud, subscription, resources, WhatIf status, and every success, skip, warning, or error.