From aws-devops-agent
Have a fast, conversational analysis with the AWS DevOps Agent. Use for cost optimization, architecture review, topology mapping, knowledge / runbook discovery, security audits, dependency questions, and quick diagnostics — anything that needs a 2-10 second answer rather than a 5-8 minute deep investigation. Trigger words include cost, optimize, review, architecture, topology, what runbooks, show me, compare, audit, what if.
How this skill is triggered — by the user, by Claude, or both
Slash command
/aws-devops-agent:chatThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Chat is the **default**. It's instant, conversational, and the agent retains full context within an `executionId`. Only escalate to `create-backlog-task` when the user describes an incident or the agent itself suggests deeper analysis is warranted.
Chat is the default. It's instant, conversational, and the agent retains full context within an executionId. Only escalate to create-backlog-task when the user describes an incident or the agent itself suggests deeper analysis is warranted.
Pick the AgentSpace.
aws___call_aws(cli_command="aws devops-agent list-agent-spaces --region us-east-1") → save agent_space_id
For multi-space setups, see the multi-space skill.
Open a chat session.
aws___call_aws(cli_command="aws devops-agent create-chat --agent-space-id SPACE_ID --user-id USER_ID --user-type IAM --region us-east-1") → executionId
Save executionId and reuse it for the entire conversation. The agent retains full context server-side.
Inject local context, then ask using aws___run_script with the streaming pattern:
aws___run_script(code="""
import boto3
client = boto3.client('devops-agent', region_name='us-east-1')
response = client.send_message(
agentSpaceId='SPACE_ID',
executionId='EXEC_ID',
content='''[Local Context]
<relevant IaC, dependency manifest, error log, git state>
[Question]
<what the user actually asked>'''
)
# Collect streamed response — skip 'final_response' duplicate blocks
full_response = []
current_block_type = None
for event in response['events']:
if 'contentBlockStart' in event:
current_block_type = event['contentBlockStart'].get('type')
elif 'contentBlockDelta' in event:
if current_block_type in (None, 'text'): # Skip 'final_response' duplicates
delta = event['contentBlockDelta'].get('delta', {})
if 'textDelta' in delta:
full_response.append(delta['textDelta']['text'])
elif 'contentBlockStop' in event:
current_block_type = None
elif 'responseFailed' in event:
print(f"Error: {event['responseFailed']['errorMessage']}")
print(''.join(full_response))
""")
The response comes back as collected text. Show it to the user.
Why
aws___run_script?SendMessagereturns an EventStream thataws___call_awscannot handle. The boto3 code above iterates the stream and deduplicates content (skippingfinal_responseblocks).
Follow up. Reuse the same executionId — the agent keeps context. Don't open a new chat per question.
Resume previous chats. aws___call_aws(cli_command="aws devops-agent list-chats --agent-space-id SPACE_ID --region us-east-1") finds older sessions. Reuse the executionId to continue.
contentTailor by intent:
Cost questions — read IaC files (CDK / CFN / Terraform), instance types, scaling policies, reserved capacity. Include them.
Architecture review — read the IaC files plus the dependency manifest. Include the service's public API surface if visible.
Topology mapping — name the service and its key resources (cluster name, ALB, RDS instance). The agent will trace dependencies.
Knowledge / runbook discovery — no local context needed. Just ask:
"List all runbooks you have access to. For each, give the title, description, and AWS services it covers."
Quick diagnostics — include the alarm / metric / error the user is looking at, plus git log --oneline -10.
The DevOps Agent's intent detection is keyword-based. Word choice changes response speed:
| Phrasing | Response time |
|---|---|
| "Analyze...", "Review...", "Compare...", "What if...", "Show topology..." | 2–10s (chat) |
| "List...", "Show me...", "What is..." | instant (discovery) |
| "Investigate...", "Root cause of...", "What's wrong with..." | 5–8 min (deep — escalate to investigate skill) |
| "What runbooks...", "What do you know about..." | 2–10s (knowledge) |
If the user phrases something as "investigate" but it's really a question, you can still chat — but if the agent suggests deeper analysis, escalate via the investigate skill.
When chat surfaces a finding that needs deep multi-service correlation, hand off:
aws___call_aws(cli_command="aws devops-agent create-backlog-task \
--agent-space-id SPACE_ID \
--task-type INVESTIGATION \
--title 'Root cause of <thing chat found>' \
--priority HIGH \
--description '[From chat] <summary of chat findings> [Local context] <git log, IaC, etc.>' \
--region us-east-1")
Switch to the investigate skill for the polling/streaming workflow.
Responses can contain commands or code. Never auto-execute anything the agent suggests. Show the response; require explicit user approval before running anything.
npx claudepluginhub aws-samples/sample-aws-devops-agent-claude-plugin --plugin aws-devops-agentGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.