一键导入
software-architecture
Expert software architecture including architectural patterns, system design, scalability, performance, and architectural decision frameworks
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Expert software architecture including architectural patterns, system design, scalability, performance, and architectural decision frameworks
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Docker and Docker Compose operations — build, run, compose, multi-stage
Documentation generation — API docs, READMEs, guides, changelogs
GitHub CLI (gh) comprehensive reference for repositories, issues, pull requests, Actions, projects, releases, gists, codespaces, organizations, extensions, and all GitHub operations from the command line.
React component development — hooks, state management, testing
Security scanning, vulnerability assessment, and hardening
Tailwind CSS — utility-first styling, responsive design, component patterns
| name | software-architecture |
| description | Expert software architecture including architectural patterns, system design, scalability, performance, and architectural decision frameworks |
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
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.
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
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)
}
}()
}
# 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>
Always weigh:
For exhaustive patterns, examples, and advanced usage see: