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 skills add lugassawan/swe-workbench --skill principle-design-patternsgit clone --depth 1 https://github.com/lugassawan/swe-workbenchWrote 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/lugassawan/swe-workbench/principle-design-patterns)<a href="https://agentmods.dev/skills/lugassawan/swe-workbench/principle-design-patterns"><img src="https://agentmods.dev/badge/skills/lugassawan/swe-workbench/principle-design-patterns/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/lugassawan/swe-workbench/principle-design-patterns"><img src="https://agentmods.dev/badge/skills/lugassawan/swe-workbench/principle-design-patterns.svg" alt="Reviewed on agentmods" width="80" 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.00044 | $0.00744 |
| Opus 5.5 | $0.00018 | $0.00298 |
| Sonnet 5.5 | $0.00009 | $0.00149 |
| Haiku 4.5 | $0.00004 | $0.00074 |
Grade A, and why
principle-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 3mo 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 — 73 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Design Patterns — the ones worth knowing
Patterns are vocabulary, not goals. Reach for one only when the problem it solves is actually present.
Strategy
Problem: an algorithm varies independently of its caller. Use when: multiple interchangeable behaviors selected at runtime (pricing rules, compression, sort orders). Overkill when: there is only one strategy. Modern alternative: a first-class function or lambda.
Factory Method
Problem: construction is non-trivial or must be swappable.
Use when: the concrete type depends on input or config.
Overkill when: new Thing() works and always will.
Modern alternative: a constructor function plus DI at the composition root.
Observer
Problem: many objects need to react to a state change. Use when: loose coupling between emitter and listeners (UI, domain events). Overkill when: one listener, ever — call it directly. Modern alternative: language-native events, reactive streams, domain events on a bus.
Decorator
Problem: add behavior without subclassing the world. Use when: stacking optional behavior — caching, logging, retries around a core call. Overkill when: no composition, one behavior. Modern alternative: middleware chains, higher-order functions.
Adapter
Problem: two interfaces should work together but don't. Use when: integrating a third-party or legacy API into your domain types. Overkill when: you control both sides — just change one.
Facade
Problem: a subsystem has too many moving parts for its callers. Use when: simplifying a complex API for the common 80%. Overkill when: the facade just forwards one call.
Template Method
Problem: the skeleton of an algorithm is fixed but steps vary. Use when: several variants share a clear sequence. Overkill when: the sequence is two steps. Warning: easy to abuse — prefer Strategy when steps are independent.
What ships with it
37 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.
- examples/decorator.cs.md 2.7 KB
- examples/decorator.go.md 2.4 KB
- examples/decorator.java.md 3.1 KB
- examples/decorator.kt.md 2.3 KB
- examples/decorator.py.md 2.4 KB
- examples/decorator.rb.md 2.0 KB
- examples/decorator.rs.md 2.8 KB
- examples/decorator.swift.md 2.8 KB
- examples/decorator.ts.md 2.3 KB
- examples/factory.cs.md 2.0 KB
- examples/factory.go.md 2.0 KB
- examples/factory.java.md 2.2 KB
- examples/factory.kt.md 1.7 KB
- examples/factory.py.md 1.8 KB
- examples/factory.rb.md 1.6 KB
- examples/factory.rs.md 2.0 KB
- examples/factory.swift.md 1.8 KB
- examples/factory.ts.md 1.8 KB
- examples/observer.cs.md 1.8 KB
- examples/observer.go.md 2.1 KB
- examples/observer.java.md 2.2 KB
- examples/observer.kt.md 2.0 KB
- examples/observer.py.md 2.1 KB
- examples/observer.rb.md 1.9 KB
- examples/observer.rs.md 2.6 KB
- examples/observer.swift.md 1.9 KB
- examples/observer.ts.md 2.0 KB
- examples/strategy.cs.md 2.3 KB
- examples/strategy.go.md 2.4 KB
- examples/strategy.java.md 2.5 KB
- examples/strategy.kt.md 2.0 KB
- examples/strategy.py.md 2.1 KB
- examples/strategy.rb.md 1.8 KB
- examples/strategy.rs.md 2.2 KB
- examples/strategy.swift.md 2.0 KB
- examples/strategy.ts.md 2.1 KB
- triggers.txt 540 B
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.
- 3mo ago First seen · 73 lines · 44 tokens per session scan A aae11f626f58
principle-design-patterns is a skill published in the GitHub repository lugassawan/swe-workbench (3 stars, last pushed 2d ago), licensed MIT. It adds 44 tokens to every session and 744 once invoked, about $0.0002 per session on Opus 5.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-09-03.
principle-design-patterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| principle-design-patternslugassawan/swe-workbench | Skill | 3 | 2d ago | MIT | A | 44 | Claude Code |
| ui-ux-designzdanovichnick/dotnet-pilot | Skill | 5 | 5d ago | MIT | A | 57 | Claude Code |
| modern-cssccheney/robust-skills | Skill | 62 | 2mo ago | MIT | A | 38 | Claude Code, Codex |
| design-blueprinttechygarg/lattice | Skill | 219 | today | MIT | C | 140 | Claude Code |
| mermaid-diagramsccheney/robust-skills | Skill | 62 | 2mo ago | MIT | A | 44 | Claude Code, Codex |
| design-firsttechygarg/lattice | Skill | 219 | today | MIT | C | 111 | Claude Code |
| top-designwondelai/skills | Skill | 3.0k | 6d ago | MIT | A | 113 | Claude Code, Codex |