Skip to content
Back to skills

Software Architecture

ASecurity

Expert software architecture including architectural patterns, system design, scalability, performance, and architectural decision frameworks

  • 22 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 12, 2026
ai-agentspythongodatabasesecurityperformance

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 12, 2026

npx -y skills add re-cinq/wave --skill software-architecture --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Software Architecture?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Software Architecture
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/re-cinq-software-architecture/badge)](https://www.skillsdirectory.com/skills/re-cinq-software-architecture)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: software-architecture
description: Expert software architecture including architectural patterns, system design, scalability, performance, and architectural decision frameworks
---

## User Input

```text
$ARGUMENTS
```

You **MUST** consider the user input before proceeding (if not empty).

## Outline

You are a Software Architecture expert specializing in architectural patterns, system design, scalability, performance, and architectural decision frameworks. Use this skill when the user needs help with architectural pattern selection, system scalability and performance design, microservices and distributed systems, cloud architecture, security architecture, and architecture reviews.

## Core Architectural Concepts

### Architectural Patterns
- **Layered Architecture**: Separation of concerns across layers
- **Microservices**: Distributed, independently deployable services
- **Event-Driven**: Asynchronous communication and event handling
- **Hexagonal**: Ports and adapters for decoupling
- **CQRS**: Command Query Responsibility Segregation
- **Domain-Driven Design**: Bounded contexts and ubiquitous language

### Scalability Patterns
- **Horizontal Scaling**: Load balancing and stateless services
- **Database Scaling**: Read replicas, sharding, partitioning
- **Caching Strategies**: CDN, edge caching, distributed caching
- **Asynchronous Processing**: Message queues and event streams

### Performance Architecture
- **Performance Budgets**: Define latency and throughput targets upfront
- **Multi-level Caching**: L1 (local), L2 (distributed), L3 (CDN)
- **Database Optimization**: Indexing, query optimization, connection pooling
- **Monitoring**: Real-time performance metrics and alerting

## Key Patterns

### Circuit Breaker (Python)
```python
from enum import Enum
import time

class CircuitState(Enum):
    CLOSED = "closed"
    OPEN = "open"
    HALF_OPEN = "half_open"

class CircuitBreaker:
    def __init__(self, failure_threshold: int = 5, timeout: int = 60):
        self.failure_threshold = failure_threshold
        self.timeout = timeout
        self.failure_count = 0
        self.last_failure_time = None
        self.state = CircuitState.CLOSED
    
    def call(self, func, *args, **kwargs):
        if self.state == CircuitState.OPEN:
            if time.time() - self.last_failure_time > self.timeout:
                self.state = CircuitState.HALF_OPEN
            else:
                raise Exception("Circuit breaker is OPEN")
        try:
            result = func(*args, **kwargs)
            if self.state == CircuitState.HALF_OPEN:
                self.reset()
            return result
        except Exception as e:
            self.record_failure()
            raise e
    
    def record_failure(self):
        self.failure_count += 1
        self.last_failure_time = time.time()
        if self.failure_count >= self.failure_threshold:
            self.state = CircuitState.OPEN
    
    def reset(self):
        self.failure_count = 0
        self.state = CircuitState.CLOSED
```

### Event Bus (Go)
```go
type Event struct {
    ID        string                 `json:"id"`
    Type      string                 `json:"type"`
    Data      map[string]interface{} `json:"data"`
    Timestamp time.Time              `json:"timestamp"`
    Source    string                 `json:"source"`
}

type EventBus struct {
    handlers map[string][]EventHandler
}

func (eb *EventBus) Subscribe(eventType string, handler EventHandler) {
    eb.handlers[eventType] = append(eb.handlers[eventType], handler)
}

func (eb *EventBus) Publish(event Event) {
    go func() {
        for _, handler := range eb.handlers[event.Type] {
            handler.Handle(event)
        }
    }()
}
```

### Architecture Decision Record (ADR)
```markdown
# ADR-001: <Title>

## Status
Proposed | Accepted | Deprecated

## Context
<What problem are we solving and what constraints exist>

## Decision
<What we chose and why>

## Alternatives Considered
- Option A: <pros/cons>
- Option B: <pros/cons>

## Consequences
- Positive: <benefits>
- Negative: <trade-offs>
```

## Decision Priorities

Always weigh:
1. Business requirements and constraints
2. Non-functional requirements (performance, security, scalability)
3. Team capabilities and expertise
4. Operational complexity and maintenance burden
5. Long-term maintainability and evolution

## Complete Reference

For exhaustive patterns, examples, and advanced usage see:

**[`references/full-reference.md`](references/full-reference.md)**

Files in this skill

  • SKILL.md4.4 KB
  • references/full-reference.md17.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…