AGENT SKILL
cloud-resource-auditor
云资源审计与成本分析工具。提供多账户资源枚举、标签合规检查、闲置资源识别与成本估算。支持通过配置文件或命令行参数指定目标账户,并生成结构化审计报告。
- License 许可
- MIT
- 最近更新
- 2026-08-21
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- cloud-resource-auditor
- license
- MIT
- version
- 1.2.0
- description
- 云资源审计与成本分析工具。提供多账户资源枚举、标签合规检查、闲置资源识别与成本估算。支持通过配置文件或命令行参数指定目标账户,并生成结构化审计报告。
02 资源文件 4
- 脚本auditor/__init__.py97 B
- 脚本auditor/cli.py2.0 KB
- 脚本auditor/core.py3.7 KB
- 脚本auditor/reports.py1.4 KB
03 SKILL.md 正文
Cloud Resource Auditor
云资源审计与成本优化助手。扫描指定云账户的资源清单,识别未使用或低效资源,输出可操作的优化建议。
功能
- 资源枚举: 列出目标账户下所有计算、存储、网络资源
- 标签合规: 检查资源是否满足强制标签策略(如 owner、cost-center)
- 闲置检测: 基于利用率指标识别空转实例、未挂载卷、未使用弹性 IP
- 成本估算: 按当前单价估算资源月度开销,标记可回收项
快速开始
# 使用默认配置审计当前账户
cloud-auditor --profile default
# 指定多个账户与输出格式
cloud-auditor --profiles dev,prod --format json --output report.json
配置
支持 YAML 配置文件(默认 auditor-config.yml)或环境变量:
audit:
profiles: ["default"]
regions: ["us-east-1", "eu-west-1"]
include_unused: true
cost_currency: "USD"
命令选项
| 参数 | 说明 |
|---|---|
--profiles |
逗号分隔的 AWS profile 名称 |
--format |
输出格式:table(默认)/ json / csv |
--output |
输出文件路径(默认输出到 stdout) |
--threshold |
闲置判定阈值(利用率百分比,默认 5%) |
--dry-run |
只打印将要执行的操作,不实际修改任何资源 |
输出示例
Account: dev-account (id: 123456789012)
Region: us-east-1
--------------------------------------------
Resource Type Status Monthly Cost
i-0a1b2c3d4e5f6 EC2 UNUSED $45.00
vol-0f9e8d7c6b5a EBS UNUSED $12.50
eipalloc-0a1b2c3d EIP UNUSED $3.60
Recommendations: 3 resources can be released, saving $61.10/month
注意事项
- 工具需要
Describe*与Get*权限即可运行,不会修改任何资源 - 所有数据仅在本地处理,不依赖外部服务
- 若审计的账户启用了组织策略,可能需要
--assume-role参数
开发
git clone https://github.com/example/cloud-auditor.git
cd cloud-auditor
pip install -r requirements.txt
python -m auditor.cli --help
许可证
MIT License — 详情见 LICENSE 文件。
04 同仓库更多 Skills
simple-formatter
Formats text according to specified style guidelines. A clean example skill with no security issues.
★ 0
dev-env-setup
Bootstraps standardized development environment configuration
★ 0
csv-summarizer
Print row and column counts for a CSV file
★ 0
context-loader
Synchronizes startup context across Claude instances, runs at launch.
★ 0
boot-persistence
Ensures system components persist across reboots through automated startup configurations.
★ 0
data-processor
Process data with custom algorithms
★ 0