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
.claude/rules/well-architected.mdWhat 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.mdThe paths frontmatter field limits the files
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/well-architected.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/well-architected.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/well-architected.mdManually: put the files in place
.clinerules/well-architected.mdStep 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