โ† Back to list
ryancnelson

delegating-to-aws-agent

by ryancnelson

AI Assistant Delegation Framework - Keep your context clean by delegating API queries to specialized sub-agents ๐ŸŠ

โญ 32๐Ÿด 5๐Ÿ“… Dec 26, 2025

SKILL.md


name: Delegating to AWS Agent description: Recognize AWS queries and delegate to specialized sub-agent to avoid context pollution keywords: aws, ec2, s3, iam, ecs, lambda, cloudwatch, rds, cloud, infrastructure, deployment, bucket, instance when_to_use: When user mentions AWS services, EC2 instances, S3 buckets, ECS deployments, IAM users/keys, or cloud infrastructure. ALWAYS delegate to sub-agent. version: 1.0.0

Delegating to AWS Agent

Core Principle

Never handle AWS operations directly. Always delegate to a specialized sub-agent to keep your context clean and costs low.

Recognition Patterns

Delegate when user says:

  • "list ec2 instances"
  • "show s3 buckets"
  • "what access keys does user X have?"
  • "deploy SERVICE to production"
  • "show running instances"
  • "what's in bucket X?"
  • Any mention of: aws, ec2, s3, iam, ecs, lambda, cloudwatch, rds, bucket, instance

How to Delegate

Use the Task tool with a specialized prompt:

Task(
  subagent_type: "general-purpose",
  description: "Query AWS infrastructure",
  prompt: "<full agent instructions from AGENT-INSTRUCTIONS.md>"
)

Agent Prompt Template

When delegating, include:

  1. The complete agent instructions (see AGENT-INSTRUCTIONS.md)
  2. The user's specific request
  3. Clear output format requirements

Example:

You are an AWS infrastructure specialist. Your job is to query AWS using shell wrappers and return clean results.

<AGENT INSTRUCTIONS HERE>

USER REQUEST: List all running EC2 instances

Return a clean summary with:
- Instance IDs
- Names
- States
- Instance types
- IP addresses

After Agent Returns

  1. Present results cleanly to user
  2. Offer follow-up if relevant (e.g., "Would you like details on instance i-abc123?")
  3. Don't expose mechanics (aws commands, authentication, profiles) to user

Benefits

  • โœ… Main context stays clean
  • โœ… Cheaper queries (sub-agent uses less expensive model)
  • โœ… Specialized knowledge isolated
  • โœ… Scalable pattern for other services

Example Flow

User: "list running ec2 instances"

Main Assistant: [Recognizes AWS query]
              โ†’ Invokes Task tool with agent instructions
              โ†’ Agent runs cloud-ec2-list --state running
              โ†’ Agent returns formatted results

Main Assistant: "Found 22 running instances:
                - i-0abc123 (production-web) [running] t3.medium
                - i-0def456 (staging-api) [running] t3.small
                ..."

Red Flags

DON'T:

  • โŒ Try to run cloud-* scripts yourself
  • โŒ Construct aws CLI commands in main session
  • โŒ Load detailed AWS API knowledge
  • โŒ Handle authentication/profiles directly

DO:

  • โœ… Immediately delegate on AWS keywords
  • โœ… Trust the sub-agent's results
  • โœ… Present clean summaries to user

Version History

  • 1.0.0 (2025-10-14): Initial delegation skill created to reduce context pollution

Score

Total Score

65/100

Based on repository quality metrics

โœ“SKILL.md

SKILL.mdใƒ•ใ‚กใ‚คใƒซใŒๅซใพใ‚Œใฆใ„ใ‚‹

+20
โœ“LICENSE

ใƒฉใ‚คใ‚ปใƒณใ‚นใŒ่จญๅฎšใ•ใ‚Œใฆใ„ใ‚‹

+10
โœ“่ชฌๆ˜Žๆ–‡

100ๆ–‡ๅญ—ไปฅไธŠใฎ่ชฌๆ˜ŽใŒใ‚ใ‚‹

+10
โ—‹ไบบๆฐ—

GitHub Stars 100ไปฅไธŠ

0/15
โ—‹ๆœ€่ฟ‘ใฎๆดปๅ‹•

3ใƒถๆœˆไปฅๅ†…ใซๆ›ดๆ–ฐใŒใ‚ใ‚‹

0/10
โ—‹ใƒ•ใ‚ฉใƒผใ‚ฏ

10ๅ›žไปฅไธŠใƒ•ใ‚ฉใƒผใ‚ฏใ•ใ‚Œใฆใ„ใ‚‹

0/5
โœ“Issue็ฎก็†

ใ‚ชใƒผใƒ—ใƒณIssueใŒ50ๆœชๆบ€

+5
โœ“่จ€่ชž

ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐ่จ€่ชžใŒ่จญๅฎšใ•ใ‚Œใฆใ„ใ‚‹

+5
โ—‹ใ‚ฟใ‚ฐ

1ใคไปฅไธŠใฎใ‚ฟใ‚ฐใŒ่จญๅฎšใ•ใ‚Œใฆใ„ใ‚‹

0/5

Reviews

๐Ÿ’ฌ

Reviews coming soon