Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/camilooscargbaptista/cto-toolkit/design-patternsnpx skills add camilooscargbaptista/cto-toolkit --skill design-patternsgit clone --depth 1 https://github.com/camilooscargbaptista/cto-toolkitWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/camilooscargbaptista/cto-toolkit/design-patterns)<a href="https://agentmods.dev/skills/camilooscargbaptista/cto-toolkit/design-patterns"><img src="https://agentmods.dev/badge/skills/camilooscargbaptista/cto-toolkit/design-patterns.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00138 | $0.00997 |
| Opus 5 | $0.00069 | $0.00498 |
| Sonnet 5 | $0.00028 | $0.00199 |
| Haiku 4.5 | $0.00014 | $0.00100 |
Grade A, and why
design-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 95 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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 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 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 |
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 95 lines · 138 tokens per session scan A 92a1784bf0d7
design-patterns is a skill published in the GitHub repository camilooscargbaptista/cto-toolkit (7 stars, last pushed 5mo ago), licensed MIT. It adds 138 tokens to every session and 997 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
codeninja
Elite TypeScript and system architecture expert. Highly efficient, slightly sarcastic. Specializes in clean code, SOLID principles, and ruthless refactoring.
architecture-paradigms
Selects and routes to the right architecture paradigm. Use when choosing patterns for a new system or comparing trade-offs before making architecture decisions.
code-quality-principles
Applies KISS, YAGNI, and SOLID principles for clean code with reduced complexity. Use when refactoring or reviewing code for over-engineering.
architecture-patterns
Software architecture patterns and best practices.
design-expert
Expert-level system design, architecture patterns, scalability, and distributed systems. Use when the user mentions system design, architecture, scalability, distributed systems, or patterns, or when the task involves Architecture Patterns or Design Principles.
blockchain-patterns
Use this skill when asked about blockchain design patterns, token standards, upgradeable contracts, oracle patterns, layer 2 scaling patterns, cross-chain communication patterns, and common blockchain architecture patterns. Covers ERC standards (20, 721, 1155, 4626, 4337), proxy patterns (UUPS, transparent, beacon)…