agentleFS
aws-samplesaws-samples/sample-aws-ops-skills-for-agents/aws-troubleshooting/SKILL.md

aws-troubleshooting

Skill8 starsChanged 5 months agoMIT-0View on GitHub

Universal AWS troubleshooting framework. Activate when: any AWS resource is unhealthy, unreachable, or degraded; status checks fail; deployments fail; connectivity issues; performance degradation; unexpected errors or state transitions; the user says something is wrong with an AWS service. Works across ALL AWS services — EC2, ECS, EKS, RDS, Lambda, S3, VPC, IAM, etc. Does NOT embed service-specific facts; queries aws-knowledge MCP for real-time documentation and SOPs.

The file

Show its rules and text

We split this skill into the rules it gives an agent

20 rules. About 0 are common, 11 are distinctive, and 9 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 9

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Check if critical context is missing before querying or diagnosing:

    line 32
  2. Distinctive:

    If missing, ASK the user. A wrong diagnosis from assumptions wastes more time than a clarifying question.

    line 37
  3. Very specific:

    Run the service's describe-* / get-* APIs to capture current state

    line 46
  4. Distinctive:

    Check for status checks, health checks, or equivalent (service-dependent)

    line 47
  5. Distinctive:

    Check CloudWatch metrics for anomalies in the relevant namespace

    line 48
  6. Very specific:

    Read references/stable-guardrails.md to avoid known misdiagnosis traps

    line 49
  7. Distinctive:

    Check CloudTrail for recent API calls that may have caused the issue

    line 52
  8. Distinctive:

    Check AWS Health Dashboard for service-level events

    line 53
  9. Very specific:

    Use aws-knowledge MCP search_documentation to find current troubleshooting guidance for the specific symptom.

    line 59
  10. Very specific:

    If the search returns an SOP (sop_name field), retrieve it with retrieve_agent_sop for step-by-step instructions

    line 61
  11. Very specific:

    Check if the service has SSM Automation runbooks (AWSSupport-Troubleshoot*) that can automate diagnosis

    line 68
  12. Very specific:

    Use aws-knowledge recommend tool on a relevant doc page to discover related troubleshooting content

    line 72
  13. Very specific:

    Read references/hallucination-patterns.yaml before concluding

    line 78
  14. Distinctive:

    Check blast radius — is only one resource affected, or is it AZ/region-wide?

    line 83
  15. Distinctive:

    Verify the fix worked (re-check status/metrics after remediation)

    line 95
  16. Distinctive:

    NEVER state service-specific numbers (IOPS, limits, quotas, defaults) from memory.

    line 118
  17. Distinctive:

    Always cite evidence: API response, metric, log excerpt, or MCP doc URL.

    line 120
  18. Very specific:

    Read references/hallucination-patterns.yaml — these are patterns where LLMs consistently get AWS behavior wrong.

    line 121
  19. Very specific:

    Read references/stable-guardrails.md — these are architectural facts that are safe to assert without querying.

    line 123
  20. Distinctive:

    If MCP returns no relevant results, say so explicitly.

    line 126

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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 Troubleshooting

One skill for all AWS services. Reasoning framework is here; service-specific facts come from MCP at runtime.

When to use

Any AWS issue where the console alone is insufficient — status checks, logs, connectivity, performance, permissions, deployments, state transitions.

Investigation workflow

Step 0 — ASK FIRST (before any diagnosis)

MUST:

  • Check if critical context is missing before querying or diagnosing:
    • Network issues → need VPC topology, subnet type, NAT/endpoint config
    • Container/task failures → need exit code, error message, logs
    • Connection timeouts → need source, destination, protocol, port
    • Performance issues → need instance type, workload pattern, timeline
  • If missing, ASK the user. A wrong diagnosis from assumptions wastes more time than a clarifying question.

Step 1 — Identify and collect

Determine the affected service and resource, then collect initial evidence.

MUST:

  • Identify the service, resource ID, and region
  • Run the service's describe-* / get-* APIs to capture current state
  • Check for status checks, health checks, or equivalent (service-dependent)
  • Check CloudWatch metrics for anomalies in the relevant namespace
  • Read references/stable-guardrails.md to avoid known misdiagnosis traps

SHOULD:

  • Check CloudTrail for recent API calls that may have caused the issue
  • Check AWS Health Dashboard for service-level events
  • Collect logs (CloudWatch Logs, system logs, console output) if available

Step 2 — Query real-time documentation

MUST:

  • Use aws-knowledge MCP search_documentation to find current troubleshooting guidance for the specific symptom. See references/mcp-query-patterns.md
  • If the search returns an SOP (sop_name field), retrieve it with retrieve_agent_sop for step-by-step instructions
  • For ANY specific number (IOPS, limits, quotas, timeouts, cooldowns): query MCP — NEVER rely on memorized values

SHOULD:

  • Cross-reference re:Post Knowledge Center articles for the error message
  • Check if the service has SSM Automation runbooks (AWSSupport-Troubleshoot*) that can automate diagnosis

MAY:

  • Use aws-knowledge recommend tool on a relevant doc page to discover related troubleshooting content

Step 3 — Diagnose

MUST:

  • Read references/hallucination-patterns.yaml before concluding
  • State the root cause with specific evidence (API response, metric value, log excerpt)
  • Classify severity: CRITICAL (service down) / HIGH (degraded) / MEDIUM (suboptimal)

SHOULD:

  • Check blast radius — is only one resource affected, or is it AZ/region-wide?
  • Distinguish between AWS-side issues (status checks, service events) and customer-side issues (config, permissions, application)

Step 4 — Remediate and report

MUST:

  • Propose immediate mitigation with specific CLI commands
  • Propose long-term prevention (alarms, auto-recovery, architecture changes)
  • Output structured YAML report (see Output Format below)

SHOULD:

  • Verify the fix worked (re-check status/metrics after remediation)

Output format

service: "<aws-service>"
resource: "<resource-id>"
region: "<region>"
root_cause: "<category> — <detail>"
evidence:
  - type: <api_response|metric|log|event>
    content: "<specific finding>"
severity: CRITICAL | HIGH | MEDIUM
blast_radius: "<single resource | AZ | region | account>"
mitigation:
  immediate: "<action with CLI command>"
  long_term: "<prevention strategy>"
sources:
  - "<MCP doc URL or SSM runbook name used>"

Anti-hallucination rules

  1. NEVER state service-specific numbers (IOPS, limits, quotas, defaults) from memory. Always query MCP first.
  2. Always cite evidence: API response, metric, log excerpt, or MCP doc URL.
  3. Read references/hallucination-patterns.yaml — these are patterns where LLMs consistently get AWS behavior wrong.
  4. Read references/stable-guardrails.md — these are architectural facts that are safe to assert without querying.
  5. Spend no more than 2 minutes on any single hypothesis. Pivot if inconclusive.
  6. If MCP returns no relevant results, say so explicitly. Do not fabricate guidance.

References

FilePurpose
references/stable-guardrails.mdArchitectural facts that don't change — safe to assert
references/hallucination-patterns.yamlCross-service LLM mistake patterns
references/mcp-query-patterns.mdHow to query aws-knowledge MCP effectively
references/investigation-framework.mdDetailed Phase 1/2/3 methodology for complex cases

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.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

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.