Guide · Agent skill
How to use the AWS CloudWatch Investigation agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The aws-cloudwatch-investigation skill is a set of written investigation patterns that an AI agent can follow when AWS production problems show up in CloudWatch. It covers ready-made Logs Insights queries, a method for matching a CloudWatch alarm to a recent deployment, a decision tree for narrowing an incident from account to resource, and metric query examples for dashboards. This guide explains what the skill does, how to install it, how to ask for it, and what your environment needs before it can do real work.
Quick start
- 1Download and unzip. Download the skill ZIP from this page and unzip it so you have a folder containing SKILL.md.
- 2Place the folder. Move the folder into ~/.claude/skills/ for personal use or into .claude/skills/ inside a project. Alternatively, upload it under Settings → Capabilities → Skills in the Claude apps.
- 3Confirm AWS access. Make sure the agent has AWS credentials, for example AWS CLI or SDK credentials, with CloudWatch and, if needed, CloudTrail read access.
- 4Describe the incident. Give the alarm name, time, account, region and service in a natural request so the agent can apply the skill.
- 5Run the investigation. Let the agent work through the account, region, service, operation and resource steps using the query templates.
- 6Check the deploy correlation. Review any CloudTrail deployment events the agent finds and judge whether the correlation is real.
What the skill makes the agent do
Agent skills are folders of instructions that an AI agent loads when a task matches them. This one contains a single file, SKILL.md, which gives the agent a playbook for incident triage on AWS using CloudWatch Logs, Metrics and Alarms.
The skill supplies the method, not the access. The agent still needs its own tools and AWS credentials to run the queries. The skill has no scripts and makes no network calls itself.
- Error spike detection: finds the top errors in a time window, grouped by log stream.
- Latency breakdown: ranks operations by p50, p95 and p99 duration.
- Lambda cold starts: measures init duration and its impact during an incident.
- Memory exhaustion and timeouts: finds out-of-memory events and invocations that hit the timeout.
- Blast-radius narrowing: walks from account to region, service, operation and resource.
- Deploy correlation: checks CloudTrail for deployment events shortly before an alarm fired.
- Metric queries: shows metric math patterns such as error rate as a percentage and latency compared to a baseline.
Install the skill from the ZIP
Download the ZIP for this skill from this page and unzip it. The folder you get contains SKILL.md. Put that folder in one of the locations below so your agent can find it.
For a personal install that applies across your projects, unzip it into ~/.claude/skills/. To limit the skill to one project, unzip it into the .claude/skills/ folder inside that project.
If you use the Claude apps instead, upload the skill under Settings → Capabilities → Skills.
- Personal: ~/.claude/skills/aws-cloudwatch-investigation/
- Project: .claude/skills/aws-cloudwatch-investigation/ inside your repository
Ask for it with natural requests
You do not need a special command. Describe the problem in plain words that match the skill's description, such as investigating a Logs Insights error spike, a latency increase, or an alarm that may follow a deploy. The agent decides whether the skill applies.
Give the agent the details it needs to scope the work: the alarm name or time it fired, the account and region, and the service or function name if you know it.
- "A CloudWatch alarm fired on payment-processor ten minutes ago. Triage it using the investigation skill."
- "Check whether the ALARM on our API Gateway prod stage lines up with a deployment in the last 30 minutes."
- "Find Lambda functions in us-east-1 with out-of-memory events in the last hour."
- "Narrow down where this latency spike is coming from: account, region, service, then resource."
Examples of what the agent produces
For deploy correlation, the skill defines an output format that records the event, time, actor, resource and a correlation strength. The example in the source shows a Lambda code update about 12 minutes before an alarm, from a CI/CD role, on the same function, rated STRONG.
The skill tells the agent to query CloudTrail Lake for deployment events in the 30 minutes before the alarm. A deploy counts as correlated when it targets the same resource, completed within 15 minutes before the alarm transition, and was made by a CI/CD role rather than a person applying a hotfix.
Deploy Correlation:
Event: UpdateFunctionCode
Time: 2024-03-15T14:23:07Z (12 min before alarm)
Actor: arn:aws:sts::123456789012:assumed-role/github-actions-deploy/session
Resource: arn:aws:lambda:us-east-1:123456789012:function:payment-processor
Correlation: STRONG — same resource, CI/CD actor, alarm was OK prior cycleRequirements and what to prepare
The skill is only useful if the agent can reach your AWS environment. You need an AWS account with CloudWatch Logs, Metrics and Alarms access. For the deployment correlation step you also need CloudTrail or a CloudTrail Lake event data store, since the CloudTrail query uses an event data store ID that you supply.
The agent itself needs AWS access, for example AWS CLI or SDK credentials, to run the queries. The source does not describe any other setup.
- AWS account with CloudWatch Logs, Metrics and Alarms access
- CloudTrail or CloudTrail Lake event data store for deploy correlation
- An agent environment with AWS credentials, such as AWS CLI or SDK credentials
Safety notes: scripts, network and human review
The skill runs no scripts and uses no network. Its files are instructions and query text only. Any reads or writes to AWS happen through the agent's own tools, under the permissions of the credentials you give it, so scope those credentials to read-only access where you can.
The skill is read-oriented guidance. It does not decide on rollbacks or other production changes. During an incident, have a person review any change before it is made. Treat deploy correlation as a heuristic, because it can produce false positives, so do not use its output as a compliance-grade conclusion.
- Use read-only AWS credentials for investigation work.
- Review any production change yourself before it happens.
- Confirm correlations against the previous deploy cycle and other changes in the same window.
Tips for better results
Use the exact alarm transition time when you can. The deploy correlation window is built from that timestamp, so an accurate time makes the CloudTrail search more useful.
Work from the top of the decision tree down. If the alarm spans several accounts or services, the skill points you toward shared dependencies such as networking, IAM or the deployment pipeline before individual resources.
Replace the TARGET placeholders in the metric queries with your own function or API names. The Logs Insights queries use fields such as @duration and @initDuration, which appear in Lambda logs.
What people use it for
- Triaging a CloudWatch alarm on a Lambda function by checking error spikes, cold starts and timeouts.
- Checking whether a CI/CD deployment on ECS or API Gateway preceded an alarm.
- Finding Lambda functions with out-of-memory events across a region.
- Following one consistent incident checklist across several AWS accounts.
- Building metric queries for a dashboard, such as error rate as a percentage.
Frequently asked questions
What is the aws-cloudwatch-investigation skill?
It is an agent skill, a folder with a SKILL.md file, that gives an AI agent investigation patterns for AWS CloudWatch. It includes Logs Insights query templates, deploy correlation steps, a blast-radius decision tree and metric query examples.
Where do I put the skill so Claude can use it?
Unzip the downloaded folder into ~/.claude/skills/ for personal use, or into .claude/skills/ inside a project. In the Claude apps you can upload it under Settings → Capabilities → Skills.
Does the skill need AWS credentials?
The skill itself does not connect to AWS. The agent needs its own access, such as AWS CLI or SDK credentials, with CloudWatch access and CloudTrail or CloudTrail Lake access for the deployment correlation step.
Is the skill free and what is its licence?
The skill is published under the MIT licence in the github/awesome-copilot repository. The source does not mention any price.
Does the skill run scripts or use the network?
No. The skill contains only SKILL.md, runs no scripts and uses no network. Any AWS calls are made by the agent's own tools.
Does this work for non-AWS stacks or other monitoring tools?
No. The queries and namespaces are AWS-specific and the skill is intended for teams that use CloudWatch. Teams on non-AWS stacks should look for guidance that matches their own tools.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
This skill suits on-call engineers and platform teams who run Lambda, ECS or API Gateway workloads on AWS and use CloudWatch, and who want a consistent triage method. It is not suitable for non-AWS stacks, for making production changes without human review, or for compliance-critical conclusions, since its deploy correlation is heuristic.
Download the skill