← 返回 Skills 市场
delbertheihei

AWS CloudWatch

作者 delberthh · GitHub ↗ · v0.0.1
cross-platform ⚠ suspicious
572
总下载
0
收藏
2
当前安装
1
版本数
在 OpenClaw 中安装
/install aws-cloud-watch
功能描述
Query AWS CloudWatch metrics for ECS/EC2/RDS and return charts.
使用说明 (SKILL.md)

AWS CloudWatch Skill

Use this skill to fetch CloudWatch metrics for ECS / EC2 / RDS and return text summaries.

Entry

Preferred entry script:

node {baseDir}/src/skill.mjs --service ecs --metric cpu --resource \x3Ccluster-name> --hours 1

Environment

Required (AK/SK):

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY

Optional:

  • AWS_REGION (default: us-west-2)

Usage (internal)

Run the CLI script in {baseDir}:

node {baseDir}/src/cli.js --service ecs --metric CPUUtilization --resource \x3Ccluster-name-or-arn> --hours 1
node {baseDir}/src/cli.js --service ecs --metric cpu --resource \x3Ccluster-name>

You can define metric aliases in {baseDir}/config.json (see config.example.json).

Supported services

  • ecs (cluster-level metrics)
  • ec2
  • rds

Defaults

  • Region: us-west-2
  • Period: 300 seconds (5 minutes)
  • Time window: 1 hour

Notes

  • ECS metrics are cluster-level unless Container Insights is enabled.
  • If the metric is unavailable, return a clear message.
  • Text-only output (no chart rendering).
  • Uses SigV4 signing via native crypto (no AWS SDK, no external packages).
安全使用建议
This skill appears to do exactly what it claims: call CloudWatch GetMetricStatistics and summarize datapoints. Before installing, note three practical points: (1) Metadata omissions — the registry incorrectly omits Node.js and AWS env vars; you must have Node.js available and set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY (or otherwise supply credentials) for it to work. (2) Credentials — the skill uses raw credentials to sign requests. Use least-privilege credentials (policy scoped to CloudWatch Read/GetMetricStatistics and any required resource access), prefer short-lived credentials or an instance/role where possible, and avoid exposing long-lived root credentials. (3) Source trust — the skill's source/homepage is unknown. The code is short and readable (no obfuscated network endpoints), but if you plan to run it in production, review the code yourself or run it in an isolated environment. If you want tighter security, require the author to declare required binaries/env vars in metadata and to provide a verifiable source URL or package repository.
功能分析
Type: OpenClaw Skill Name: aws-cloud-watch Version: 0.0.1 The skill is designed to query AWS CloudWatch metrics. It is classified as suspicious due to two main vulnerabilities. First, it implements AWS SigV4 signing manually in `src/cli.mjs`, a complex cryptographic protocol that is highly prone to subtle security flaws if not perfectly implemented. Second, `src/skill.mjs` uses `child_process.spawnSync` with `shell: true` on Windows, directly forwarding user-controlled arguments, which creates a shell injection vulnerability allowing arbitrary command execution if malicious input is provided (e.g., via prompt injection against the agent).
能力评估
Purpose & Capability
The skill name/description (CloudWatch metrics for ECS/EC2/RDS) align with the included code and instructions. However the registry metadata lists no required binaries or env vars while the SKILL.md and the code clearly require the Node.js runtime and AWS credentials (AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY). This is an inconsistency in metadata (likely omission) rather than a functional mismatch.
Instruction Scope
SKILL.md explicitly instructs running the included Node CLI and lists the AWS credentials and optional region. The runtime instructions and the code both stay within the declared scope (build a SigV4-signed request to monitoring.<region>.amazonaws.com and parse CloudWatch GetMetricStatistics). The skill reads an optional config.json in its own directory; there are no instructions to read or transmit other system files or secrets beyond the AWS credentials required to call CloudWatch.
Install Mechanism
There is no install spec (instruction-only), and the code uses only built-in Node modules (crypto, https, fs, path, child_process). No external downloads or registry packages are pulled. However the package assumes Node.js is available despite 'required binaries' being declared none; that omission should be corrected in metadata.
Credentials
The skill legitimately needs AWS credentials to sign and call CloudWatch APIs. But the registry metadata incorrectly lists no required env vars while SKILL.md and the code require AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY (and optionally AWS_REGION). This is a material documentation mismatch: the skill will fail or prompt for creds if they are not present. Requesting these two credentials is proportionate for the stated purpose, but the implementation uses raw long-lived credentials (environment variables) rather than, say, an assumed role or SDK credential chain — users should limit the IAM permissions and prefer short-lived credentials where possible.
Persistence & Privilege
The skill does not request persistent/always-on presence, does not modify other skills or global agent settings, and only reads/writes files in its own directory (optional config.json). It spawns the included CLI locally via child_process, which is expected given the wrapper script.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install aws-cloud-watch
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /aws-cloud-watch 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.0.1
Initial release of aws-cloud-watch skill. - Query AWS CloudWatch metrics for ECS, EC2, and RDS resources. - Supports text-only summaries for queried metrics (no chart rendering). - Command-line interface for specifying service, metric, resource, and time window. - Allows configuration of metric aliases via config.json. - No AWS SDK or external packages; uses SigV4 signing with native crypto. - Defaults: region us-west-2, 5-minute period, 1-hour window. - Clear error messages if metrics are unavailable.
元数据
Slug aws-cloud-watch
版本 0.0.1
许可证
累计安装 2
当前安装数 2
历史版本数 1
常见问题

AWS CloudWatch 是什么?

Query AWS CloudWatch metrics for ECS/EC2/RDS and return charts. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 572 次。

如何安装 AWS CloudWatch?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install aws-cloud-watch」即可一键安装,无需额外配置。

AWS CloudWatch 是免费的吗?

是的,AWS CloudWatch 完全免费(开源免费),可自由下载、安装和使用。

AWS CloudWatch 支持哪些平台?

AWS CloudWatch 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 AWS CloudWatch?

由 delberthh(@delbertheihei)开发并维护,当前版本 v0.0.1。

💬 留言讨论