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 | $0.00022 | $0.00372 |
| Sonnet 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 9d 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.
- 9d 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 (2 stars, last pushed yesterday), licensed MIT. It adds 44 tokens to every session and 744 once invoked, about $0.0002 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-09-03.
Other skills, from other repositories
design-blueprint
Run a complete design workflow -- from establishing context through four progressive design levels (Capabilities, Components, Interactions, Contracts) to an approved blueprint. Composes knowledge-priming, context-anchoring, learning-harvest, collaborative-judgment, design-first, architecture, and domain-driven-design…
modern-css
Proactively apply when creating design systems, component libraries, or any frontend application. Triggers on CSS Grid, Subgrid, Flexbox, Container Queries, :has(), @layer, @scope, CSS nesting, @property, @function, if(), oklch, color-mix, light-dark, relative color, @starting-style, scroll-driven animations, view…
mermaid-diagrams
Proactively suggest diagrams when explaining complex systems. Triggers on diagrams, charts, visualizations, flowcharts, sequence diagrams, architecture diagrams, ER diagrams, state machines, Gantt charts, mindmaps, C4, class diagrams, git graphs, kanban boards, sankey, timelines, quadrant charts, XY charts, packet…
design-first
Guide structured design thinking through 5 progressive levels before any code is written. Levels: Capabilities, Components, Interactions, Contracts, Implementation. Use when building new features, refactoring significant code, designing modules, or when the user says 'design this', 'architect this', 'let's think…
ux-heuristics
Evaluate and improve interface usability using heuristic analysis. Use when the user mentions "usability audit", "users are confused", "form usability", "navigation problems", "Nielsen heuristics", "cognitive walkthrough", or "is this easy to use". Also trigger when reviewing a design for usability issues, improving…
new-skill
Scaffold a new brooks-lint analysis skill so it passes npm run validate and npm run evals on the first try — generates skills/{name}/SKILL.md (with the mandatory "Do NOT trigger for:" clause and a Process section citing guide step ranges) plus skills/{name}/{name}-guide.md (sequentially numbered steps), then appends…