
Architecture
- 539 installs
- 29.9k repo stars
- Updated July 27, 2026
- davila7/claude-code-templates
architecture is a Claude Code skill that gathers scale, domain, timeline, and constraint context through a structured question hierarchy before proposing any technical architecture for developers who need evidence-based
About
Context Discovery is an agent skill that systematically gathers project context through a structured question hierarchy before any architecture is proposed. It uses a five-category questionnaire covering scale, team, timeline, domain, and constraints, then maps responses to a Project Classification Matrix that recommends appropriate architectures for MVP, SaaS, or Enterprise projects. The skill helps developers avoid over-engineering by matching architecture complexity to actual needs, providing concrete examples such as Next.js API routes for simple MVPs or NestJS for mid-scale SaaS applications. It ensures architecture decisions are grounded in real project parameters rather than assumptions.
- 5-question hierarchy that must be asked before any architecture suggestion
- Project Classification Matrix comparing MVP, SaaS, and Enterprise across scale, team, timeline, architecture, and patter
- Real-world architecture decision examples tailored to solo developers
- Context discovery workflow that prevents premature architecture choices
Architecture by the numbers
- 539 all-time installs (skills.sh)
- Ranked #720 of 3,301 Productivity & Planning skills by installs in the Skillselion catalog
- Security screen: MEDIUM risk (skills.sh audit)
- Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/davila7/claude-code-templates --skill architectureAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 539 |
|---|---|
| repo stars | ★ 29.9k |
| Security audit | 3 / 3 scanners passed |
| Last updated | July 27, 2026 |
| Repository | davila7/claude-code-templates ↗ |
How do you classify project requirements before choosing architecture?
Gather critical context and classify a project before proposing any technical architecture.
Who is it for?
Developers or tech leads starting a new backend, SaaS, or distributed system who need structured discovery before stack and topology decisions.
Skip if: Teams that already have signed-off architecture documents or need line-by-line implementation of an existing design.
When should I use this skill?
The user asks for system architecture, stack selection, or scaling design without having stated user scale, data volume, compliance, or timeline constraints.
What you get
A completed context questionnaire, project classification matrix, and constraint-aware architecture recommendation grounded in scale and domain facts.
- Context questionnaire answers
- Project classification matrix
- Constraint-aware architecture recommendation
By the numbers
- Uses a five-category question hierarchy: Scale, Team, Timeline, Domain, Constraints
- Scale prompts reference user tiers from 10 through 1M+ and data from MB through TB
Files
Architecture Decision Framework
"Requirements drive architecture. Trade-offs inform decisions. ADRs capture rationale."
🎯 Selective Reading Rule
Read ONLY files relevant to the request! Check the content map, find what you need.
| File | Description | When to Read |
|---|---|---|
context-discovery.md | Questions to ask, project classification | Starting architecture design |
trade-off-analysis.md | ADR templates, trade-off framework | Documenting decisions |
pattern-selection.md | Decision trees, anti-patterns | Choosing patterns |
examples.md | MVP, SaaS, Enterprise examples | Reference implementations |
patterns-reference.md | Quick lookup for patterns | Pattern comparison |
---
🔗 Related Skills
| Skill | Use For |
|---|---|
@[skills/database-design] | Database schema design |
@[skills/api-patterns] | API design patterns |
@[skills/deployment-procedures] | Deployment architecture |
---
Core Principle
"Simplicity is the ultimate sophistication."
- Start simple
- Add complexity ONLY when proven necessary
- You can always add patterns later
- Removing complexity is MUCH harder than adding it
---
Validation Checklist
Before finalizing architecture:
- [ ] Requirements clearly understood
- [ ] Constraints identified
- [ ] Each decision has trade-off analysis
- [ ] Simpler alternatives considered
- [ ] ADRs written for significant decisions
- [ ] Team expertise matches chosen patterns
Context Discovery
Before suggesting any architecture, gather context.
Question Hierarchy (Ask User FIRST)
1. Scale
- How many users? (10, 1K, 100K, 1M+)
- Data volume? (MB, GB, TB)
- Transaction rate? (per second/minute)
2. Team
- Solo developer or team?
- Team size and expertise?
- Distributed or co-located?
3. Timeline
- MVP/Prototype or long-term product?
- Time to market pressure?
4. Domain
- CRUD-heavy or business logic complex?
- Real-time requirements?
- Compliance/regulations?
5. Constraints
- Budget limitations?
- Legacy systems to integrate?
- Technology stack preferences?
Project Classification Matrix
MVP SaaS Enterprise
┌─────────────────────────────────────────────────────────────┐
│ Scale │ <1K │ 1K-100K │ 100K+ │
│ Team │ Solo │ 2-10 │ 10+ │
│ Timeline │ Fast (weeks) │ Medium (months)│ Long (years)│
│ Architecture │ Simple │ Modular │ Distributed │
│ Patterns │ Minimal │ Selective │ Comprehensive│
│ Example │ Next.js API │ NestJS │ Microservices│
└─────────────────────────────────────────────────────────────┘Architecture Examples
Real-world architecture decisions by project type.
---
Example 1: MVP E-commerce (Solo Developer)
Requirements:
- <1000 users initially
- Solo developer
- Fast to market (8 weeks)
- Budget-conscious
Architecture Decisions:
App Structure: Monolith (simpler for solo)
Framework: Next.js (full-stack, fast)
Data Layer: Prisma direct (no over-abstraction)
Authentication: JWT (simpler than OAuth)
Payment: Stripe (hosted solution)
Database: PostgreSQL (ACID for orders)
Trade-offs Accepted:
- Monolith → Can't scale independently (team doesn't justify it)
- No Repository → Less testable (simple CRUD doesn't need it)
- JWT → No social login initially (can add later)
Future Migration Path:
- Users > 10K → Extract payment service
- Team > 3 → Add Repository pattern
- Social login requested → Add OAuth---
Example 2: SaaS Product (5-10 Developers)
Requirements:
- 1K-100K users
- 5-10 developers
- Long-term (12+ months)
- Multiple domains (billing, users, core)
Architecture Decisions:
App Structure: Modular Monolith (team size optimal)
Framework: NestJS (modular by design)
Data Layer: Repository pattern (testing, flexibility)
Domain Model: Partial DDD (rich entities)
Authentication: OAuth + JWT
Caching: Redis
Database: PostgreSQL
Trade-offs Accepted:
- Modular Monolith → Some module coupling (microservices not justified)
- Partial DDD → No full aggregates (no domain experts)
- RabbitMQ later → Initial synchronous (add when proven needed)
Migration Path:
- Team > 10 → Consider microservices
- Domains conflict → Extract bounded contexts
- Read performance issues → Add CQRS---
Example 3: Enterprise (100K+ Users)
Requirements:
- 100K+ users
- 10+ developers
- Multiple business domains
- Different scaling needs
- 24/7 availability
Architecture Decisions:
App Structure: Microservices (independent scale)
API Gateway: Kong/AWS API GW
Domain Model: Full DDD
Consistency: Event-driven (eventual OK)
Message Bus: Kafka
Authentication: OAuth + SAML (enterprise SSO)
Database: Polyglot (right tool per job)
CQRS: Selected services
Operational Requirements:
- Service mesh (Istio/Linkerd)
- Distributed tracing (Jaeger/Tempo)
- Centralized logging (ELK/Loki)
- Circuit breakers (Resilience4j)
- Kubernetes/HelmPattern Selection Guidelines
Decision trees for choosing architectural patterns.
Main Decision Tree
START: What's your MAIN concern?
┌─ Data Access Complexity?
│ ├─ HIGH (complex queries, testing needed)
│ │ → Repository Pattern + Unit of Work
│ │ VALIDATE: Will data source change frequently?
│ │ ├─ YES → Repository worth the indirection
│ │ └─ NO → Consider simpler ORM direct access
│ └─ LOW (simple CRUD, single database)
│ → ORM directly (Prisma, Drizzle)
│ Simpler = Better, Faster
│
├─ Business Rules Complexity?
│ ├─ HIGH (domain logic, rules vary by context)
│ │ → Domain-Driven Design
│ │ VALIDATE: Do you have domain experts on team?
│ │ ├─ YES → Full DDD (Aggregates, Value Objects)
│ │ └─ NO → Partial DDD (rich entities, clear boundaries)
│ └─ LOW (mostly CRUD, simple validation)
│ → Transaction Script pattern
│ Simpler = Better, Faster
│
├─ Independent Scaling Needed?
│ ├─ YES (different components scale differently)
│ │ → Microservices WORTH the complexity
│ │ REQUIREMENTS (ALL must be true):
│ │ - Clear domain boundaries
│ │ - Team > 10 developers
│ │ - Different scaling needs per service
│ │ IF NOT ALL MET → Modular Monolith instead
│ └─ NO (everything scales together)
│ → Modular Monolith
│ Can extract services later when proven needed
│
└─ Real-time Requirements?
├─ HIGH (immediate updates, multi-user sync)
│ → Event-Driven Architecture
│ → Message Queue (RabbitMQ, Redis, Kafka)
│ VALIDATE: Can you handle eventual consistency?
│ ├─ YES → Event-driven valid
│ └─ NO → Synchronous with polling
└─ LOW (eventual consistency acceptable)
→ Synchronous (REST/GraphQL)
Simpler = Better, FasterThe 3 Questions (Before ANY Pattern)
1. Problem Solved: What SPECIFIC problem does this pattern solve? 2. Simpler Alternative: Is there a simpler solution? 3. Deferred Complexity: Can we add this LATER when needed?
Red Flags (Anti-patterns)
| Pattern | Anti-pattern | Simpler Alternative |
|---|---|---|
| Microservices | Premature splitting | Start monolith, extract later |
| Clean/Hexagonal | Over-abstraction | Concrete first, interfaces later |
| Event Sourcing | Over-engineering | Append-only audit log |
| CQRS | Unnecessary complexity | Single model |
| Repository | YAGNI for simple CRUD | ORM direct access |
Architecture Patterns Reference
Quick reference for common patterns with usage guidance.
Data Access Patterns
| Pattern | When to Use | When NOT to Use | Complexity |
|---|---|---|---|
| Active Record | Simple CRUD, rapid prototyping | Complex queries, multiple sources | Low |
| Repository | Testing needed, multiple sources | Simple CRUD, single database | Medium |
| Unit of Work | Complex transactions | Simple operations | High |
| Data Mapper | Complex domain, performance | Simple CRUD, rapid dev | High |
Domain Logic Patterns
| Pattern | When to Use | When NOT to Use | Complexity |
|---|---|---|---|
| Transaction Script | Simple CRUD, procedural | Complex business rules | Low |
| Table Module | Record-based logic | Rich behavior needed | Low |
| Domain Model | Complex business logic | Simple CRUD | Medium |
| DDD (Full) | Complex domain, domain experts | Simple domain, no experts | High |
Distributed System Patterns
| Pattern | When to Use | When NOT to Use | Complexity |
|---|---|---|---|
| Modular Monolith | Small teams, unclear boundaries | Clear contexts, different scales | Medium |
| Microservices | Different scales, large teams | Small teams, simple domain | Very High |
| Event-Driven | Real-time, loose coupling | Simple workflows, strong consistency | High |
| CQRS | Read/write performance diverges | Simple CRUD, same model | High |
| Saga | Distributed transactions | Single database, simple ACID | High |
API Patterns
| Pattern | When to Use | When NOT to Use | Complexity |
|---|---|---|---|
| REST | Standard CRUD, resources | Real-time, complex queries | Low |
| GraphQL | Flexible queries, multiple clients | Simple CRUD, caching needs | Medium |
| gRPC | Internal services, performance | Public APIs, browser clients | Medium |
| WebSocket | Real-time updates | Simple request/response | Medium |
---
Simplicity Principle
"Start simple, add complexity only when proven necessary."
- You can always add patterns later
- Removing complexity is MUCH harder than adding it
- When in doubt, choose simpler option
Trade-off Analysis & ADR
Document every architectural decision with trade-offs.
Decision Framework
For EACH architectural component, document:
## Architecture Decision Record
### Context
- **Problem**: [What problem are we solving?]
- **Constraints**: [Team size, scale, timeline, budget]
### Options Considered
| Option | Pros | Cons | Complexity | When Valid |
|--------|------|------|------------|-----------|
| Option A | Benefit 1 | Cost 1 | Low | [Conditions] |
| Option B | Benefit 2 | Cost 2 | High | [Conditions] |
### Decision
**Chosen**: [Option B]
### Rationale
1. [Reason 1 - tied to constraints]
2. [Reason 2 - tied to requirements]
### Trade-offs Accepted
- [What we're giving up]
- [Why this is acceptable]
### Consequences
- **Positive**: [Benefits we gain]
- **Negative**: [Costs/risks we accept]
- **Mitigation**: [How we'll address negatives]
### Revisit Trigger
- [When to reconsider this decision]ADR Template
# ADR-[XXX]: [Decision Title]
## Status
Proposed | Accepted | Deprecated | Superseded by [ADR-YYY]
## Context
[What problem? What constraints?]
## Decision
[What we chose - be specific]
## Rationale
[Why - tie to requirements and constraints]
## Trade-offs
[What we're giving up - be honest]
## Consequences
- **Positive**: [Benefits]
- **Negative**: [Costs]
- **Mitigation**: [How to address]ADR Storage
docs/
└── architecture/
├── adr-001-use-nextjs.md
├── adr-002-postgresql-over-mongodb.md
└── adr-003-adopt-repository-pattern.mdRelated skills
Forks & variants (1)
Architecture has 1 known copy in the catalog totaling 2 installs. They canonicalize to this original listing.
- xenitv1 - 2 installs
How it compares
Pick architecture over implementation skills when the blocker is missing requirements context, not missing code patterns.
FAQ
What does the architecture skill ask before proposing design?
The architecture skill runs a five-category question hierarchy—Scale, Team, Timeline, Domain, and Constraints—covering user counts from 10 to 1M+, data volume, transaction rates, compliance, legacy systems, and budget limits before any technical recommendation.
When should developers invoke architecture in Claude Code?
Developers should invoke architecture when requesting system design, database choices, or deployment topology without stated scale, compliance, or timeline facts, so the agent collects structured context instead of guessing defaults.
Is Architecture safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.