analyzing-projects
Guides systematic project analysis, codebase exploration, and architecture pattern recognition. Use when understanding new…
Guides software architecture decisions, design patterns, and system design principles. Use when designing systems, choosing patterns, or making architectural decisions.
$ npx -y skills add cloudai-x/opencode-workflow --skill designing-architecture --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/designing-architectureContext preview
The summary Claude sees to decide when to auto-load this skill.
Guides software architecture decisions, design patterns, and system design principles. Use when designing systems, choosing patterns, or making architectural decisions.
name: designing-architecture description: Guides software architecture decisions, design patterns, and system design principles. Use when designing systems, choosing patterns, or making architectural decisions. license: MIT compatibility: opencode metadata: category: design audience: developers
Principles and patterns for designing maintainable, scalable, and robust software systems.
---
| Principle | Summary | Violation Sign | |-----------|---------|----------------| | **S**ingle Responsibility | One reason to change | Class does too many things | | **O**pen/Closed | Open for extension, closed for modification | Modifying existing code for new features | | **L**iskov Substitution | Subtypes replaceable for base types | Overrides break parent behavior | | **I**nterface Segregation | Small, focused interfaces | Classes implement unused methods | | **D**ependency Inversion | Depend on abstractions | High-level modules depend on low-level |
Outer layers depend on inner layers, NEVER the reverse. ┌─────────────────────────────────────┐ │ Frameworks & Drivers │ ← Database, Web, UI ├─────────────────────────────────────┤ │ Interface Adapters │ ← Controllers, Presenters, Gateways ├─────────────────────────────────────┤ │ Application Business Rules │ ← Use Cases ├─────────────────────────────────────┤ │ Enterprise Business Rules │ ← Entities └─────────────────────────────────────┘ Dependencies point INWARD only.
---
┌─────────────────────────────────────┐ │ Presentation Layer │ ← UI, API Controllers ├─────────────────────────────────────┤ │ Application Layer │ ← Use Cases, Services ├─────────────────────────────────────┤ │ Domain Layer │ ← Business Logic, Entities ├─────────────────────────────────────┤ │ Infrastructure Layer │ ← Database, External APIs └─────────────────────────────────────┘
**Use when**: Traditional applications, clear separation needed **Avoid when**: High-performance needs, event-driven systems
┌───────────────┐
│ Primary │
│ Adapters │ ← REST API, CLI, GraphQL
└───────┬───────┘
│
┌──────────▼──────────┐
│ │
│ ┌───────────┐ │
│ │ Core │ │
Primary │ │ Domain │ │ Secondary
Ports │ │ Logic │ │ Ports
│ └───────────┘ │
│ │
└──────────┬──────────┘
│
┌───────▼───────┐
│ Secondary │
│ Adapters │ ← Database, Message Queue, External API
└───────────────┘**Use when**: Testability is critical, multiple interfaces needed **Avoid when**: Simple CRUD applications
┌─────────┐ ┌─────────┐ ┌─────────┐
│ Service │ │ Service │ │ Service │
│ A │ │ B │ │ C │
└────┬────┘ └────┬────┘ └────┬────┘
│ │ │
└────────────┴────────────┘
│
┌──────▼──────┐
│ Message │
│ Bus │
└─────────────┘**Use when**: Independent scaling, team autonomy, polyglot needs **Avoid when**: Small teams, simple domains, tight coupling required
Event Source → Event Bus → Event Handlers
│ │ │
▼ ▼ ▼
Produces Routes Events Consumes
Events (Kafka, RabbitMQ) Events**Use when**: Async processing, decoupling, audit trails **Avoid when**: Immediate consistency required, simple workflows
---
| Pattern | Purpose | When to Use | |---------|---------|-------------| | **Factory** | Create objects without specifying class | Object creation logic is complex | | **Builder** | Construct complex objects step-by-step | Many optional parameters | | **Singleton** | Single instance globally | Shared resource (use sparingly) | | **Dependency Injection** | Inject dependencies externally | Testability, loose coupling |
| Pattern | Purpose | When to Use | |---------|---------|-------------| | **Adapter** | Convert interface to another | Integrating incompatible systems | | **Decorator** | Add behavior dynamically | Extending functionality without inheritance | | **Facade** | Simplified interface to complex system | Hiding complexity | | **Repository** | Abstract data access | Separating domain from persistence |
| Pattern | Purpose | When to Use | |---------|---------|-------------| | **Strategy** | Interchangeable algorithms | Multiple ways to do something | | **Observer** | Notify dependents of changes | Event systems, reactive updates | | **Command** | Encapsulate actions as objects | Undo/redo, queuing, logging | | **Chain of Responsibility** | Pass request along handlers | Middleware, validation chains |
---
| Concept | Definition | Example | |---------|------------|---------| | **Bounded Context** | Explicit boundary for a domain model | Order context, Shipping context | | **Ubiquitous Language** | Shared vocabulary between devs and domain experts | "Order", "Line Item", "Fulfillment" | | **Context Map** | How bounded contexts relate | Customer shared between Sales and Support |
| Pattern | Purpose | Example | |-----
A universal OpenCode workflow setup with specialized agents, skills, commands, and plugins for any software project.
Guides systematic project analysis, codebase exploration, and architecture pattern recognition. Use when understanding new…
Guides REST and GraphQL API design, endpoint patterns, request/response schemas, versioning, and API best practices. Use when…
Guides test strategy, TDD/BDD approaches, test coverage planning, and testing best practices. Use when designing test suites,…
Guides git workflows, branching strategies, commit conventions, and version control best practices. Use when managing…
Guides performance optimization, profiling techniques, and bottleneck identification. Use when improving application speed,…
CRITICAL skill for executing multiple Task tool calls in a SINGLE message for true parallelism. Essential for efficient…