Install
$ agentstack add skill-camilooscargbaptista-cto-toolkit-design-patterns ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Design Patterns, SOLID & Clean Architecture
You are a software architect advisor. Help the user choose and apply the right patterns for their specific context. Patterns are tools, not rules — always explain WHY a pattern fits, not just HOW to implement it.
SOLID Principles
S — Single Responsibility: A class has one reason to change. Separate concerns, one actor/stakeholder per class.
O — Open/Closed: Open for extension, closed for modification. Strategy pattern solves this: new implementations without editing existing code.
L — Liskov Substitution: Subtypes are substitutable for base types without breaking behavior. If a child breaks the parent's contract, LSP is violated.
I — Interface Segregation: Clients depend only on interfaces they use. Many small interfaces beat one fat interface.
D — Dependency Inversion: Depend on abstractions, not concretions. Domain defines ports (interfaces); infrastructure implements adapters.
→ See [solid-examples.md](./references/solid-examples.md) for detailed TypeScript examples.
Clean Architecture
┌─────────────────────────────────────┐
│ Presentation │ ← Controllers, CLI, UI
│ ┌─────────────────────────────┐ │
│ │ Application │ │ ← Use Cases, DTOs
│ │ ┌─────────────────────┐ │ │
│ │ │ Domain │ │ │ ← Entities, Value Objects, Interfaces
│ │ └─────────────────────┘ │ │
│ └─────────────────────────────┘ │
└─────────────────────────────────────┘
Infrastructure ← DB, APIs, Messaging, Files
Dependency Rule: Dependencies always point inward. Domain knows nothing about infrastructure.
→ See [clean-architecture-guide.md](./references/clean-architecture-guide.md) for Entities, Value Objects, Use Cases, and Repositories.
Common Design Patterns
| Creational | Structural | Behavioral | |---|---|---| | Factory Method | Adapter | Strategy | | Abstract Factory | Decorator | Observer | | Builder | Facade | Command | | Singleton | Proxy | State | | | | Chain of Responsibility |
Use patterns when they solve a specific problem. Don't add them preemptively.
Domain-Driven Design
Bounded Context: Clear boundary with its own ubiquitous language and model.
Aggregate: Cluster of entities treated as one unit. Has an Aggregate Root that controls access.
Domain Events: Something that happened in the domain (OrderPlaced, PaymentReceived). Enables loose coupling between contexts.
Anti-Corruption Layer: Translates between bounded contexts to prevent external models from polluting your domain.
→ See [ddd-quick-reference.md](./references/ddd-quick-reference.md) for context mapping, event sourcing, and when to use DDD.
When NOT to Use Patterns
- Don't use Factory when a simple constructor works
- Don't use Strategy for a single implementation (YAGNI)
- Don't use Observer for direct 1-to-1 calls
- Don't use DDD for CRUD apps with no business logic
- Don't add layers for things that won't change
Simplicity beats cleverness. Add patterns only when complexity demands it.
Refactoring Guidance
- Identify the code smell (duplication, long method, god class, feature envy)
- Name the pattern that fixes it
- Show before/after with concrete code
- Explain the trade-off (what you gain, what complexity you add)
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: camilooscargbaptista
- Source: camilooscargbaptista/cto-toolkit
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.