agentleFS
abdullahkhawerabdullahkhawer/devops-skills/skills/aws-cloudwatch-cli/SKILL.md

aws-cloudwatch-cli

Skill8 starsChanged 6 months agoApache-2.0View on GitHub

Perform AWS CloudWatch operations using the AWS CLI. Use for querying metrics, logs, alarms, and dashboards. Requires the aws-cli skill's profile/region configuration.

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Always specify --profile and --region explicitly, per the aws-cli skill's environment table — never rely on defaults.

    line 68
  2. Distinctive:

    If the target environment is unclear, ask the user before running the command.

    line 69
  3. Very specific:

    NEVER run delete-* commands without explicit user instruction — these are irreversible.

    line 70
  4. Distinctive:

    If unsure which log group or alarm name is correct, list them first with a read-only call before querying or mutating.

    line 72
  5. Distinctive:

    NEVER read or output any log content that looks like it contains secrets, tokens, or credentials — flag it to the user instead of …

    line 73

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

AWS CloudWatch CLI Skill

This skill builds on the aws-cli skill's profile and region configuration — always pass --profile and --region explicitly on every command, using the same environment table.

Command Format

aws cloudwatch <command> --profile <profile> --region <region> [options]
aws logs <command> --profile <profile> --region <region> [options]

Available Commands

Read-only (safe, no confirmation needed)

CommandDescription
aws cloudwatch list-metricsList available metrics
aws cloudwatch get-metric-data / get-metric-statisticsQuery metric datapoints
aws cloudwatch describe-alarmsList alarms and their state
aws cloudwatch describe-alarm-historyShow alarm state change history
aws cloudwatch list-dashboards / get-dashboardList or view dashboards
aws logs describe-log-groupsList log groups
aws logs describe-log-streamsList log streams in a group
aws logs filter-log-events / get-log-eventsQuery log events
aws logs start-query + get-query-resultsRun and fetch a CloudWatch Logs Insights query

Example — Logs Insights query

QUERY_ID=$(aws logs start-query \
  --profile <profile> --region <region> \
  --log-group-name <log-group> \
  --start-time $(( $(date -u +%s) - 3600 )) \
  --end-time $(date -u +%s) \
  --query-string 'fields @timestamp, @message | filter @message like /ERROR/ | limit 50' \
  --query "queryId" --output text)

aws logs get-query-results --profile <profile> --region <region> --query-id "$QUERY_ID"

Mutating operations (confirm with user before running)

CommandDescription
aws cloudwatch put-metric-alarmCreate or update an alarm
aws cloudwatch put-dashboardCreate or update a dashboard
aws cloudwatch put-metric-dataPublish a custom metric datapoint
aws logs create-log-group / create-log-streamCreate a new log group/stream
aws logs put-retention-policyChange a log group's retention period

Never run — requires explicit human approval

CommandReason
aws cloudwatch delete-alarmsIrreversible alarm deletion
aws cloudwatch delete-dashboardsIrreversible dashboard deletion
aws logs delete-log-groupIrreversibly deletes a log group and all its data
aws logs delete-log-streamIrreversibly deletes log stream data

Rules

  • Always specify --profile and --region explicitly, per the aws-cli skill's environment table — never rely on defaults.
  • If the target environment is unclear, ask the user before running the command.
  • NEVER run delete-* commands without explicit user instruction — these are irreversible.
  • For filter-log-events/start-query, always bound the time range (--start-time/--end-time) — an unbounded query on a busy log group can be slow and return excessive data.
  • If unsure which log group or alarm name is correct, list them first with a read-only call before querying or mutating.
  • NEVER read or output any log content that looks like it contains secrets, tokens, or credentials — flag it to the user instead of displaying it verbatim.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.