jpskill.com
🛠️ 開発・MCP コミュニティ

cloud-resource-analyzer

AWS、GCP、Azureなどのクラウド環境で、使われていないEBSボリュームや古いスナップショット、過剰なRDSインスタンスなど、無駄になっているリソースを見つけ出し、クラウドコストの削減やインフラ整理を支援するSkill。

📜 元の英語説明(参考)

Finds orphaned, idle, and underutilized cloud resources across AWS, GCP, or Azure accounts. Use when someone needs to audit cloud spending, find unused EBS volumes, stale snapshots, unattached IPs, idle load balancers, or oversized RDS instances. Trigger words: cloud waste, orphaned resources, unused volumes, cloud audit, infrastructure cleanup, cloud bill analysis.

🇯🇵 日本人クリエイター向け解説

一言でいうと

AWS、GCP、Azureなどのクラウド環境で、使われていないEBSボリュームや古いスナップショット、過剰なRDSインスタンスなど、無駄になっているリソースを見つけ出し、クラウドコストの削減やインフラ整理を支援するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o cloud-resource-analyzer.zip https://jpskill.com/download/14755.zip && unzip -o cloud-resource-analyzer.zip && rm cloud-resource-analyzer.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/14755.zip -OutFile "$d\cloud-resource-analyzer.zip"; Expand-Archive "$d\cloud-resource-analyzer.zip" -DestinationPath $d -Force; ri "$d\cloud-resource-analyzer.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して cloud-resource-analyzer.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → cloud-resource-analyzer フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Cloud Resource Analyzer

概要

このスキルは、クラウドプロバイダーのアカウントをスキャンして、コストがかかっているものの価値を提供していないリソース(孤立したストレージボリューム、古いスナップショット、アタッチされていない Elastic IP、アイドル状態のデータベース、およびサイズが大きすぎるインスタンス)を検出します。推定される節約額と安全な削除スクリプトを含む、優先順位付けされたクリーンアップレポートを作成します。

手順

ステップ 1: クラウドプロバイダーとアクセス権の確認

利用可能で設定済みの CLI ツールを確認します。

aws sts get-caller-identity 2>/dev/null && echo "AWS: configured"
gcloud config get-value project 2>/dev/null && echo "GCP: configured"
az account show 2>/dev/null && echo "Azure: configured"

ステップ 2: 孤立したストレージのスキャン (AWS の例)

# アタッチされていない EBS ボリューム
aws ec2 describe-volumes --filters Name=status,Values=available \
  --query 'Volumes[].{ID:VolumeId,Size:Size,Type:VolumeType,Created:CreateTime,Tags:Tags}' \
  --output json

# アクティブな AMI がない 90 日以上前のスナップショット
aws ec2 describe-snapshots --owner-ids self \
  --query 'Snapshots[?StartTime<=`2025-11-01`].{ID:SnapshotId,Size:VolumeSize,Start:StartTime,Desc:Description}' \
  --output json

# 関連付けられていない Elastic IP
aws ec2 describe-addresses --query 'Addresses[?AssociationId==null].{IP:PublicIp,AllocID:AllocationId}' \
  --output json

ステップ 3: アイドル状態のコンピューティングとネットワークのスキャン

# 正常なターゲットがないロードバランサー
aws elbv2 describe-target-health --target-group-arn <arn> \
  --query 'TargetHealthDescriptions[?TargetHealth.State!=`healthy`]'

# 14 日間の平均 CPU 使用率が 5% 未満の RDS インスタンス
aws cloudwatch get-metric-statistics --namespace AWS/RDS \
  --metric-name CPUUtilization --period 86400 --statistics Average \
  --start-time $(date -d '14 days ago' -Iseconds) --end-time $(date -Iseconds) \
  --dimensions Name=DBInstanceIdentifier,Value=<instance-id>

ステップ 4: コストの計算

見積もりには、以下の月額コストの参照値を使用してください。

  • EBS gp3: $0.08/GiB-月
  • EBS スナップショット: $0.05/GiB-月
  • Elastic IP (アタッチされていない): $3.60/月
  • ALB アイドル: $16.20/月 + LCU 料金
  • NLB アイドル: $6.75/月

ステップ 5: クリーンアップレポートの生成

カテゴリ別に調査結果を整理し、推定月額コストを記載します。節約額の降順にソートします。以下を含めます。

  • リソース ID、タイプ、リージョン
  • 作成日と関連するタグ
  • 孤立/アイドルと見なされる理由
  • 推定月額コスト
  • 推奨されるアクション (削除、縮小、アーカイブ)

ステップ 6: 安全なクリーンアップスクリプトの作成

以下の機能を持つスクリプトを生成します。

  • 削除されるものをリストするだけの --dry-run フラグ
  • タグベースの猶予期間 (リソースに scheduled-for-deletion: <date+7d> のタグを付ける)
  • EBS ボリュームの削除前のスナップショット
  • 本番リソースの確認プロンプト

例 1: AWS の完全な監査

ユーザープロンプト:

Scan our AWS account for wasted cloud resources

エージェントの出力:

Cloud Resource Audit — AWS account 123456789012
Region: us-east-1
────────────────────────────────────────────────

STORAGE WASTE
  Unattached EBS volumes: 4 volumes, 450 GiB total          $36.00/mo
  Stale snapshots (>90 days, no AMI): 23 snapshots, 1.2 TiB $60.00/mo
  S3 buckets with no access in 90 days: 2 buckets, 340 GiB  $7.82/mo

NETWORK WASTE
  Unassociated Elastic IPs: 2                                $7.20/mo
  ALBs with 0 healthy targets: 1                             $16.20/mo
  NAT Gateway with <1GB/mo traffic: 1                        $32.40/mo

COMPUTE WASTE
  RDS db.r5.xlarge at 3% avg CPU: 1 instance                $274.00/mo
  → Recommend downsize to db.r5.large                        saves $137.00/mo

Total monthly waste: $296.62/mo ($3,559/year)

例 2: ターゲットを絞った EBS クリーンアップ

ユーザープロンプト:

Find and clean up orphaned EBS volumes in us-west-2

エージェントの出力:

Found 3 unattached EBS volumes in us-west-2:

vol-0abc123  200Gi gp3  Created: 2025-05-12  Tag: postgres-backup    $16.00/mo
vol-0def456  100Gi gp3  Created: 2025-08-30  Tag: jenkins-workspace  $8.00/mo
vol-0ghi789   50Gi gp2  Created: 2025-10-15  Tag: none               $5.00/mo

Cleanup script generated: cleanup-ebs-us-west-2.sh
  ./cleanup-ebs-us-west-2.sh --dry-run    # Preview only
  ./cleanup-ebs-us-west-2.sh --execute    # Tag for deletion in 7 days
  ./cleanup-ebs-us-west-2.sh --force      # Delete immediately (creates snapshots first)

ガイドライン

  • デフォルトで読み取り専用 — 明示的なユーザーの確認なしにリソースを削除しないでください
  • 猶予期間パターン — 実際に削除する前に、常に削除対象としてリソースにタグを付けることを推奨します
  • 削除前のスナップショット — EBS ボリュームの場合、削除する前に必ずスナップショットを作成してください
  • 依存関係の相互参照 — ボリュームが Terraform の状態、K8s PVC、またはバックアップポリシーによって参照されているかどうかを確認してから、フラグを立ててください
  • マルチリージョン — デフォルトだけでなく、すべてのアクティブなリージョンをスキャンするようにユーザーにリマインドします
  • コストの見積もりは概算 — オンデマンドの料金に基づいています。リザーブドインスタンスまたは Savings Plans は異なる場合があります
  • 機密データ — データベースデータまたはシークレットが含まれている可能性のあるボリュームについて警告します
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Cloud Resource Analyzer

Overview

This skill scans cloud provider accounts for resources that are costing money but providing no value — orphaned storage volumes, stale snapshots, unattached elastic IPs, idle databases, and oversized instances. It produces a prioritized cleanup report with estimated savings and safe deletion scripts.

Instructions

Step 1: Determine Cloud Provider and Access

Check which CLI tools are available and configured:

aws sts get-caller-identity 2>/dev/null && echo "AWS: configured"
gcloud config get-value project 2>/dev/null && echo "GCP: configured"
az account show 2>/dev/null && echo "Azure: configured"

Step 2: Scan for Orphaned Storage (AWS Example)

# Unattached EBS volumes
aws ec2 describe-volumes --filters Name=status,Values=available \
  --query 'Volumes[].{ID:VolumeId,Size:Size,Type:VolumeType,Created:CreateTime,Tags:Tags}' \
  --output json

# Snapshots older than 90 days with no active AMI
aws ec2 describe-snapshots --owner-ids self \
  --query 'Snapshots[?StartTime<=`2025-11-01`].{ID:SnapshotId,Size:VolumeSize,Start:StartTime,Desc:Description}' \
  --output json

# Unassociated Elastic IPs
aws ec2 describe-addresses --query 'Addresses[?AssociationId==null].{IP:PublicIp,AllocID:AllocationId}' \
  --output json

Step 3: Scan for Idle Compute and Network

# Load balancers with no healthy targets
aws elbv2 describe-target-health --target-group-arn <arn> \
  --query 'TargetHealthDescriptions[?TargetHealth.State!=`healthy`]'

# RDS instances with < 5% average CPU over 14 days
aws cloudwatch get-metric-statistics --namespace AWS/RDS \
  --metric-name CPUUtilization --period 86400 --statistics Average \
  --start-time $(date -d '14 days ago' -Iseconds) --end-time $(date -Iseconds) \
  --dimensions Name=DBInstanceIdentifier,Value=<instance-id>

Step 4: Calculate Costs

Use these reference monthly costs for estimates:

  • EBS gp3: $0.08/GiB-month
  • EBS snapshots: $0.05/GiB-month
  • Elastic IP (unattached): $3.60/month
  • ALB idle: $16.20/month + LCU charges
  • NLB idle: $6.75/month

Step 5: Generate Cleanup Report

Organize findings by category with estimated monthly cost. Sort by savings descending. Include:

  • Resource ID, type, region
  • Creation date and relevant tags
  • Why it's considered orphaned/idle
  • Estimated monthly cost
  • Recommended action (delete, downsize, archive)

Step 6: Create Safe Cleanup Scripts

Generate scripts with:

  • --dry-run flag that only lists what would be deleted
  • Tag-based grace period (tag resources scheduled-for-deletion: <date+7d>)
  • Snapshot before delete for EBS volumes
  • Confirmation prompts for production resources

Examples

Example 1: Full AWS Audit

User prompt:

Scan our AWS account for wasted cloud resources

Agent output:

Cloud Resource Audit — AWS account 123456789012
Region: us-east-1
────────────────────────────────────────────────

STORAGE WASTE
  Unattached EBS volumes: 4 volumes, 450 GiB total          $36.00/mo
  Stale snapshots (>90 days, no AMI): 23 snapshots, 1.2 TiB $60.00/mo
  S3 buckets with no access in 90 days: 2 buckets, 340 GiB  $7.82/mo

NETWORK WASTE
  Unassociated Elastic IPs: 2                                $7.20/mo
  ALBs with 0 healthy targets: 1                             $16.20/mo
  NAT Gateway with <1GB/mo traffic: 1                        $32.40/mo

COMPUTE WASTE
  RDS db.r5.xlarge at 3% avg CPU: 1 instance                $274.00/mo
  → Recommend downsize to db.r5.large                        saves $137.00/mo

Total monthly waste: $296.62/mo ($3,559/year)

Example 2: Targeted EBS Cleanup

User prompt:

Find and clean up orphaned EBS volumes in us-west-2

Agent output:

Found 3 unattached EBS volumes in us-west-2:

vol-0abc123  200Gi gp3  Created: 2025-05-12  Tag: postgres-backup    $16.00/mo
vol-0def456  100Gi gp3  Created: 2025-08-30  Tag: jenkins-workspace  $8.00/mo
vol-0ghi789   50Gi gp2  Created: 2025-10-15  Tag: none               $5.00/mo

Cleanup script generated: cleanup-ebs-us-west-2.sh
  ./cleanup-ebs-us-west-2.sh --dry-run    # Preview only
  ./cleanup-ebs-us-west-2.sh --execute    # Tag for deletion in 7 days
  ./cleanup-ebs-us-west-2.sh --force      # Delete immediately (creates snapshots first)

Guidelines

  • Read-only by default — never delete resources without explicit user confirmation
  • Grace period pattern — always recommend tagging resources for deletion before actually deleting
  • Snapshot before delete — for EBS volumes, always create a snapshot before removal
  • Cross-reference dependencies — check if volumes are referenced by Terraform state, K8s PVCs, or backup policies before flagging
  • Multi-region — remind users to scan all active regions, not just the default
  • Cost estimates are approximate — based on on-demand pricing; reserved instances or savings plans may differ
  • Sensitive data — warn about volumes that might contain database data or secrets