Orphaned Azure Disk and IP Finder

    by Abdelrhman Fikri

    1

    This skill gives your agent a deterministic, offline workflow: export the lists with the az CLI, run the bundled finder, and read a short report with names, sizes, SKUs and ages.

    $8.99

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    What it does

    • Reads az disk list, az network public-ip list, az network nic list and az snapshot list JSON
    • Flags unattached managed disks and public IPs that no NIC, load balancer or NAT gateway uses as orphans
    • Flags network interfaces attached to no virtual machine or private endpoint
    • Lists old snapshots, and snapshots whose source disk is not in the export, for review
    • Skips disks with an active SAS, such as Site Recovery disks, and resources tagged keep
    • Totals the GiB held by orphaned disks and exits 1 when orphans exist

    Who it's for

    Cloud engineers and FinOps practitioners

    who want a clean-up list of idle Azure disks, IPs and network interfaces.

    Platform teams

    who check before they delete anything.

    Orphaned Azure Disk and IP Finder

    Example session with this skill installed

    Command: python3 scripts/find_orphans.py examples/dirty --as-of 2026-12-03

    • Read your context and instructions
    • Compiled the orphaned azure disk

    The sample has two unattached disks, an orphaned network interface that still references a public IP, a public IP nobody uses, a young unattached disk, a disk on a deallocated VM, a Site Recovery disk with an active SAS, a disk tagged keep, and snapshots that are old or have lost their source disk.

    [ORPHAN] disks.json: disk 'disk-data-old' (rg-demo): 512 GiB Premium_LRS, created 633 days ago; not attached to any VM
    [ORPHAN] disks.json: disk 'disk-shared-old' (rg-demo): 128 GiB Standard_LRS, created 550 days ago; not attached to any VM
    [ORPHAN] disks.json: disk 'disk-no-type' (rg-demo): 256 GiB Premium_LRS, created 428 days ago; not attached to any VM
    [ORPHAN] nics.json: nic 'nic-orphan' (rg-demo): not attached to a VM or private endpoint; holds a public IP reference
    [ORPHAN] public-ips.json: public IP 'pip-unused-std' (rg-demo): Standard Static 203.0.113.10; not attached to a NIC, load balancer or NAT gateway
    [REVIEW] disks.json: disk 'disk-new-scratch' (rg-demo): 64 GiB StandardSSD_LRS, created 2 days ago; unattached but newer than 7 days
    [REVIEW] disks.json: disk 'disk-reserved' (rg-demo): 256 GiB Premium_LRS, created 475 days ago; state Reserved (attached to a stopped-deallocated VM, so not orphaned, but still billed)
    [REVIEW] public-ips.json: public IP 'pip-on-orphan-nic' (rg-demo): Standard Static 203.0.113.12; attached only to orphaned nic 'nic-orphan'
    [REVIEW] snapshots.json: snapshot 'snap-old-db' (rg-demo): 256 GiB, created 327 days ago; older than 90 days
    [REVIEW] snapshots.json: snapshot 'snap-gone' (rg-demo): 128 GiB, created 13 days ago; source disk is not in the export
    [INFO] disks.json: disk 'disk-asr-replica' (rg-demo): 256 GiB Standard_LRS, created 458 days ago; state ActiveSAS (export, replication or upload in progress); not reported as orphaned
    [INFO] public-ips.json: public IP 'pip-no-field' (rg-demo): no ipConfiguration field in the export; cannot tell if it is in use
    Summary: 5 orphan(s), 5 review item(s), 19 resource(s), 1 skipped (keep tag), 896 GiB in orphaned disks
    

    Command: python3 scripts/find_orphans.py examples/clean --as-of 2026-12-03

    The clean sample has attached disks, an attached IP and NIC, and a recent snapshot, and returns exit code 0:

    Summary: 0 orphan(s), 0 review item(s), 5 resource(s), 0 skipped (keep tag), 0 GiB in orphaned disks
    

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Every Azure estate collects idle resources: a disk left behind when a VM was deleted, a public IP nobody uses, a network interface with nothing attached, snapshots from last year. They keep billing and they are hard to find by clicking. This skill gives your agent a deterministic, offline workflow: export the lists with the az CLI, run the bundled finder, and read a short report with names, sizes, SKUs and ages.

    The finder is a single standard-library script. It does not call Azure and never deletes anything. It reads the JSON from az disk list, az network public-ip list, az network nic list and az snapshot list, either as separate files or mixed in one folder. A disk with state Unattached is an orphan unless it is newer than a threshold (then it is for review). A disk in state Reserved belongs to a deallocated VM and is for review. Disks with an active SAS, which is how Site Recovery and exports look, are never called orphans. Public IPs with no NIC, load balancer or NAT gateway are orphans, and an IP attached only to an orphaned NIC is listed for review. Snapshots are for review only: old ones, and ones whose source disk is missing from the export. Resources tagged keep, do-not-delete, donotdelete or retain are left out, and you can add your own tag key.

    Synthetic example files with expected output are included so you can verify the behaviour in seconds. Pass the as-of date to get reproducible ages.

    • It only sees what is in the exports. A resource in another subscription or resource group may look orphaned or may be the source of a snapshot.
    • Age comes from the creation time, not from the time a disk became unattached, so a disk detached yesterday can look old.
    • It does not estimate cost; it reports sizes and SKUs only.
    • Load balancers, NAT gateways and other resources are not inspected beyond the references on the IP; backend pools are not read.
    • Reports and explains; it never deletes or changes anything. Check each item before you act.

    The finder is a single standard-library Python script. It makes no network calls and never writes files. Give it files or directories; it reads .json. Input: lists (or an object with a value list) from az disk list, az network public-ip list, az network nic list and az snapshot list. Resource kind comes from the type field or the field shapes. Fields may be at the top level or under properties. Rules: a disk with diskState Unattached (or no managedBy and no state) is ORPHAN, or REVIEW when newer than --min-age-days (default 7). Reserved disks are REVIEW. ActiveSAS, ReadyToUpload and ActiveUpload disks are INFO. A public IP with a null ipConfiguration and no NAT gateway is ORPHAN. A NIC with no virtual machine and no private endpoint is ORPHAN. A public IP attached only to an orphan NIC is REVIEW. A snapshot older than --snapshot-age-days (default 90), or whose source disk is missing from a disk export, is REVIEW. Other options: --as-of YYYY-MM-DD (default today), --keep-tag KEY (repeatable), --format json. Exit codes: 0 no orphans, 1 orphans found, 2 bad arguments.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Frequently Asked Questions

    No. It reads JSON you export with the az CLI.

    No. It is read-only; deleting is a separate decision for you.

    It is either newer than the age threshold, or in state Reserved because its VM is deallocated.

    Tag it keep, do-not-delete, donotdelete or retain, or pass your own tag key with the keep-tag option.

    One or more ORPHAN findings. Review items alone still exit 0.

    New in DevOps & Cloud

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for DevOps & Cloud.