/aws-devops-agent:multi-spacefrom aws-devops-agent
Coordinates queries across multiple AWS DevOps Agent AgentSpaces, routing questions to the right space, querying in parallel, and synthesizing results. Useful when you have prod, staging, and knowledge spaces.
Ships in aws-devops-agent. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Many real teams run more than one AgentSpace — typically a production space, a staging space, and a dedicated "knowledge" space that holds runbooks shared across accounts. Each space has its own set of associated AWS accounts, runbooks, and history.
This skill is the routing brain. Use it when the user has multiple spaces configured, or when a question genuinely spans accounts.
aws___call_aws(cli_command="aws devops-agent list-agent-spaces --region us-east-1") → array of {agentSpaceId, name, ...}
If only one space is returned, this skill doesn't apply — use chat or investigate directly.
If more than one is returned, decide whether the user's question is:
| Question shape | Strategy |
|---|---|
| Scoped to one environment ("prod is broken") | Single space — pick the matching one |
| Spans environments ("compare prod vs staging") | Parallel — query each, synthesize |
| Generic knowledge ("what runbooks do we have for ECS?") | Route to the knowledge space if one is named that way |
| Ambiguous ("our service is slow") | Ask the user which environment, don't guess |
If the user has a routing guide stored locally (e.g. .claude/aws-devops-agent.md, AGENTS.md, or per-project notes), read it once at the start of the session and use it as the routing table for the rest of the conversation. Format expected:
| Space | AWS Profile | Agent Space ID | Purpose |
|-------|-------------|----------------|---------|
| prod | acme-prod | as-abc123 | Production incidents, customer-facing services |
| stage | acme-stage | as-def456 | Pre-prod validation, integration testing |
| kb | acme-shared | as-ghi789 | Shared runbooks, cross-account knowledge |
If no guide exists, run discovery:
aws___call_aws(cli_command="aws devops-agent list-agent-spaces --region us-east-1") → get all spaces.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") → aws___run_script → send_message(executionId=..., userId=USER_ID, content="Summarize the AWS accounts, services, and runbooks you have access to.").claude/aws-devops-agent.md so future sessions skip discovery.
aws___run_script → send_message(...)shorthand: The literal Python foraws___run_scriptisawait call_boto3(service_name='devops-agent', operation_name='SendMessage', params={...}). Seechat/SKILL.mdfor the full streaming pattern. Rawimport boto3is blocked by the sandbox.
Use when the user wants a comparison: "compare prod and staging error rates", "is this issue happening in both accounts?", "audit costs across all our environments".
# 1. Open a chat per space (run in parallel where possible)
aws___call_aws(cli_command="aws devops-agent create-chat --agent-space-id PROD_ID --user-id USER_ID --user-type IAM --region us-east-1") → exec_prod
aws___call_aws(cli_command="aws devops-agent create-chat --agent-space-id STAGE_ID --user-id USER_ID --user-type IAM --region us-east-1") → exec_stage
# 2. Send the same question to each, with environment-specific context
aws___run_script → send_message(agentSpaceId=PROD_ID, executionId=exec_prod, userId=USER_ID, content="<question> | env=prod | <prod IaC context>")
aws___run_script → send_message(agentSpaceId=STAGE_ID, executionId=exec_stage, userId=USER_ID, content="<question> | env=stage | <stage IaC context>")
# 3. Synthesize locally — present a side-by-side summary, not two separate dumps
Don't just paste both responses. Read both, identify what's the same vs. different, and tell the user the delta — that's the value.
Use when one space holds runbooks/knowledge that informs work in another space.
# 1. Ask the knowledge space first
aws___call_aws(cli_command="aws devops-agent create-chat --agent-space-id KB_ID --user-id USER_ID --user-type IAM --region us-east-1") → exec_kb
aws___run_script → send_message(agentSpaceId=KB_ID, executionId=exec_kb, userId=USER_ID, content="What's our standard runbook for ECS 503 errors?")
# 2. Apply that runbook in the target environment
aws___call_aws(cli_command="aws devops-agent create-backlog-task \
--agent-space-id PROD_ID \
--task-type INVESTIGATION \
--title 'ECS 503 errors on checkout-service' \
--priority HIGH \
--description '[Runbook from knowledge space] <runbook text> [Local context] ...' \
--region us-east-1")
The DevOps Agent doesn't share state between spaces — you bridge it by quoting the knowledge space's response into the investigation's --description.
Use when the user explicitly names a space or environment.
# Pick the matching agentSpaceId from your routing memory
# Then use aws___call_aws / aws___run_script as normal
If the routing is ambiguous and the user doesn't say, ask once — better than firing into the wrong account.
create-backlog-task is per-space. If an issue spans accounts, you may need two investigations:
aws___call_aws(cli_command="aws devops-agent create-backlog-task --agent-space-id PROD_ID --task-type INVESTIGATION --title 'Latency spike — prod side' --priority HIGH --region us-east-1")
aws___call_aws(cli_command="aws devops-agent create-backlog-task --agent-space-id STAGE_ID --task-type INVESTIGATION --title 'Latency spike — stage side' --priority HIGH --region us-east-1")
Track both taskIds. Poll both. Surface findings together.
This is rare — usually one space owns the problem. Don't fan out by default.
description or recorded coverage doesn't mention the relevant service, skip it — sending a question into a scope-mismatched space typically hangs rather than returning "I don't know."When calling send_message via aws___run_script, wrap the EventStream iteration in a 90-second timeout. If a space doesn't respond within 90s, it's likely a scope mismatch — surface a message like "Space X did not respond within 90s — skipping (likely scope mismatch)" and move on rather than hanging.
examples/multi-space-walkthrough.md for a fully worked scenario (prod incident with staging comparison and knowledge-space runbook lookup).setup skill for first-time configuration of multiple AgentSpaces, AWS profiles, and shell wrappers.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub aws-samples/sample-aws-devops-agent-claude-plugin --plugin aws-devops-agent4 skills in this plugin
/chatChat with the AWS DevOps AgentHave 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./investigateInvestigate an AWS incidentRun a deep root-cause investigation on the AWS DevOps Agent. Use when the user describes an incident, alarm, outage, or unexplained behavior — keywords like "5xx", "503", "OOM", "latency spike", "deployment failure", "rollback", "sev1", "investigate", "root cause", "debug", "alarm fired", "service down". Polls and streams progress, then surfaces recommendations./setupFirst-time setupFirst-time setup of the AWS DevOps Agent for Claude Code — install the binary, configure AWS profiles for one or more AgentSpaces, discover space IDs, write the local routing guide, and verify the MCP server starts. Use when the user says "set up devops agent", "configure agent spaces", "I have multiple AWS accounts", or you detect that credentials / spaces are missing.Other plugins' skills for the same job