Skip to main content
rule CX Codex

well-architected — Claude Code rule: what it does and how to install

This rule applies AWS Well-Architected principles to architecture reviews, infrastructure code, and design advice. It helps agents organize findings and explain trade-offs.

MIT-0 ★ 280 updated 2026-10-06

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/rules/well-architected.md
Open on GitHub

What well-architected does

The rule asks the agent to consider all six AWS Well-Architected pillars: operational excellence, security, reliability, performance efficiency, cost optimization, and sustainability. Its design guidance favors managed services, failure-aware systems, decoupled components, least-privilege access, infrastructure as code, and observability from the start.

Recommendations should open with the most critical finding, group points by pillar, and label their severity. Each finding needs a reason and a concrete next action. The rule also calls for explicit trade-offs, such as the added cost of high availability or the portability risks of performance tuning.

For Claude Code, place the rule at .claude/rules/well-architected.md. It is configured to apply continuously, so its guidance can shape responses beyond architecture-focused requests.

What it helps with

  • review a system design against the six AWS pillars
  • spot reliability and security risks in an architecture
  • weigh the cost of high availability against its benefits
  • turn review findings into prioritized next steps

Example prompts for the agent

  • Review this service architecture using AWS Well-Architected and list the most serious risks.
  • Suggest a design for this new system, grouping advice by Well-Architected pillar.
  • Inspect this infrastructure code and explain its cost, reliability, and security trade-offs.

How to install well-architected

Manually: put the files in place

.claude/rules/well-architected.md

The paths frontmatter field limits the files

Step by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use

Questions about well-architected

How do I install well-architected in Claude Code?

Add the rule at .claude/rules/well-architected.md.

What does the well-architected rule do?

It guides architecture reviews, system design, and infrastructure-code work using the six AWS Well-Architected pillars. Findings should include severity, rationale, and a next action.

Does the rule apply continuously?

Yes. It is configured to apply all the time, so it can also shape responses to requests outside architecture reviews.

Source text

well-architected.md · MIT-0
---
description: Apply AWS Well-Architected Framework principles when reviewing architectures, writing infrastructure code, or advising on design decisions.
globs:
alwaysApply: true
---

# Well-Architected Framework

## When to Apply

Apply this guidance whenever the user:
- Asks for an architecture review or design feedback
- Requests help designing a new workload or system
- Asks about best practices for reliability, security, cost, performance, or sustainability
- Mentions "Well-Architected" or "WA review"

## Pillars

Always consider all six pillars when evaluating or proposing architectures:

1. **Operational Excellence** — Automate operations, make frequent small reversible changes, refine procedures, anticipate failure, learn from operational events.
2. **Security** — Implement a strong identity foundation, enable traceability, apply security at all layers, automate security best practices, protect data in transit and at rest, keep people away from data, prepare for security events.
3. **Reliability** — Automatically recover from failure, test recovery procedures, scale horizontally, stop guessing capacity, manage change through automation.
4. **Performance Efficiency** — Democratize advanced technologies, go global in minutes, use serverless architectures, experiment more often, consider mechanical sympathy.
5. **Cost Optimization** — Implement cloud financial management, adopt a consumption model, measure overall efficiency, stop spending money on undifferentiated heavy lifting, analyze and attribute expenditure.
6. **Sustainability** — Understand your impact, establish sustainability goals, maximize utilization, anticipate and adopt new more efficient offerings, use managed services, reduce downstream impact.

## Design Principles

When proposing solutions:
- Favor managed services over self-managed infrastructure
- Design for failure — assume any component can fail at any time
- Decouple components to reduce blast radius
- Use multiple Availability Zones for high availability
- Implement least-privilege access for all identities
- Automate everything that can be automated
- Use infrastructure as code for all environments
- Design for observability from day one

## Trade-off Guidance

Acknowledge trade-offs explicitly:
- Security controls may add latency — quantify the impact
- High availability increases cost — present options at different tiers
- Performance optimization may reduce portability — state the lock-in risk
- Cost optimization may reduce resilience — make the risk visible

## Response Format

When delivering Well-Architected guidance:
- Lead with the most critical finding or recommendation
- Group findings by pillar
- Use severity labels: 🔴 High Risk, 🟡 Medium Risk, 🟢 Best Practice
- Include "Why it matters" for each finding
- Provide a concrete next step for each recommendation

<!--
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
-->

© aws-samples · MIT-0 · aws-samples/sample-well-architected-skills-and-steering

Similar IDE rules

All IDE rules for Cloud: AWS, Azure, GCP →

From the same set19

The whole set →
cost-optimization-review cost-optimization-review runs an AWS Well-Architected review focused on cost optimization and generates a savings report. CX Codex +1 ★ 280repo stars performance-efficiency This command runs a Well-Architected review of the Performance Efficiency pillar and reports optimization opportunities across six domains. CX Codex +1 ★ 280repo stars sustainability-optimization sustainability-optimization runs an AWS Well-Architected review limited to the Sustainability pillar and returns a report with a resource-efficiency table and a scorecard. CX Codex +1 ★ 280repo stars prompt prompt audits AWS workloads against the Well-Architected Framework, surfacing risks in code and IaC without modifying repository files directly. CX Codex +1 ★ 280repo stars wa-builder wa-builder explains AWS Well-Architected concepts for your project and generates annotated diagrams, decision trees, and remediation roadmaps. CX Codex +1 ★ 280repo stars migration-readiness The migration-readiness command analyzes a codebase to assess a workload’s readiness for AWS migration. Use it to surface blockers and map out a component-by-component migration plan. CX Codex +1 ★ 280repo stars aws-well-architected-framework-review aws-well-architected-framework-review runs a full Well-Architected review over your code and IaC: six pillars, findings tied to file and line, a report with a fix plan. CX Codex +1 ★ 280repo stars wa-guardrails wa-guardrails generates preventive AWS Well-Architected guardrails, including CI checks, AWS Config rules, SCPs, and CloudWatch alarms, to block regressions. CX Codex +1 ★ 280repo stars

Project sponsors

Companies that keep this analytics open