技能 aws-cost-cleanup
💰

aws-cost-cleanup

安全 ⚙️ 外部命令🌐 網路存取

清理未使用的 AWS 資源

自動識別與移除未使用的 AWS 資源,以���除浪費並降低每月雲端帳單。

支援: Claude Codex Code(CC)
🥉 74 青銅
1

下載技能 ZIP

2

在 Claude 中上傳

前往 設定 → 功能 → 技能 → 上傳技能

3

開啟並開始使用

測試它

正在使用「aws-cost-cleanup」。 Find all unused resources and calculate potential savings

預期結果:

Unattached EBS Volumes: 5
- vol-0abc123 (100 GB) - $10.00/month
- vol-0def456 (50 GB) - $5.00/month
- vol-0ghi789 (200 GB) - $20.00/month

Unused Elastic IPs: 3 - $10.95/month
Old Snapshots: 12 - $15.00/month

Total Monthly Savings: $70.95
Annual Savings: $851.40

正在使用「aws-cost-cleanup」。 Create a cleanup script for unattached EBS volumes

預期結果:

#!/bin/bash
# cleanup-unused-ebs.sh - Dry-run mode

echo "Finding unattached EBS volumes..."
VOLUMES=$(aws ec2 describe-volumes \
--filters Name=status,Values=available \
--query 'Volumes[*].VolumeId' \
--output text)

for vol in $VOLUMES; do
echo "Would delete: $vol"
done

echo "Review and remove 'Would delete' lines to enable actual deletion"

正在使用「aws-cost-cleanup」。 Set up automated weekly cleanup

預期結果:

Lambda function created: weekly-ebs-cleanup
- Runtime: Python 3.9
- Trigger: CloudWatch Events (every Sunday 2 AM)
- Retention: Deletes volumes older than 7 days
- Dry-run: Enabled by default
- SNS notification: Enabled for deletion alerts

安全審計

安全
v1 • 2/24/2026

All static findings are false positives. The skill uses legitimate AWS CLI commands for cost optimization. Network calls are to official AWS documentation URLs only. AWS service names flagged as C2 keywords are standard terminology. This is a valid DevOps tool for AWS cost cleanup.

1
已掃描檔案
310
分析行數
2
發現項
1
審計總數

偵測到的模式

Shell Command Execution PatternsExternal Documentation LinksAWS Service Names Flagged as C2 KeywordsAWS Resource Discovery Commands
審計者: claude

品質評分

38
架構
100
可維護性
87
內容
50
社群
100
安全
91
規範符合性

你能建構什麼

DevOps 工程師成本優化

自動化跨多個 AWS 帳戶的未使用資源每週清理,以降低每月雲端支出。

雲端 FinOps 團隊

產生未使用資源與潛在節省金額的報告,以協助預算決策與成本分攤。

新創公司雲端管理

快速識別並移除不再需要的測試與開發資源,讓雲端帳單保持在可控範圍。

試試這些提示

尋找未使用的 AWS 資源
Use aws-cost-cleanup to find all unattached EBS volumes, unused Elastic IPs, and old snapshots in my AWS account. Generate a report showing potential monthly savings.
建立清理腳本
Use aws-cost-cleanup to create a bash script that identifies unattached EBS volumes older than 30 days and calculates the total size and cost impact.
設定自動化清理
Use aws-cost-cleanup to create a Lambda function that runs weekly to identify and delete unattached EBS volumes older than 7 days. Include dry-run mode.
成本影響分���
Use aws-cost-cleanup to calculate the monthly and annual cost savings if we clean up all unattached EBS volumes, unused Elastic IPs, and snapshots older than 90 days.

最佳實務

  • 始終先以 dry-run 模式執行清理腳本,以審查將被刪除的內容
  • 使用資源標籤在刪除前識別擁有者,並通知相關利害關係人
  • 在刪除前為重要資料建立最終快照,作為安全防護

避免

  • 未先審查清理清單就刪除資源
  • 忽略資源相依性 - 刪除磁碟區前請檢查是否有附加的 ENI
  • 跳過安全檢查清單 - 始終驗證資源確實未使用

常見問題

這會不小心刪除我仍需要的資源嗎?
此技能預設包含 dry-run 模式。所有刪除命令皆已註解化,直到您明確啟用為止。刪除註解前請務必審查輸出。
需要哪些 AWS 權限?
您需要讀取權限(describe-*)進行探索,以及寫入權限(delete-*)進行清理。請使用具有最小權限原則的 IAM 角色。
這能跨多個 AWS 帳戶執行嗎?
可以,此技能支援 AWS Organizations 整合。您可以對組織中的所有帳戶進行迭代。
如何復原誤刪的資源?
在刪除前建立快照。若無快照,已刪除的資源將無法復原。請為重要資料啟用 AWS Backup。
建議的清理排程為何?
建議每週探索並每月清理。這樣可讓團隊有時間識別並認領他們仍需要的資源。
這能與 AWS Backup 搭配使用嗎?
此技能可補充 AWS Backup,清理���受備份政策保護的資源。搭配使用兩者可達到完整覆蓋。

開發者詳情

檔案結構

📄 SKILL.md