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 miles990/claude-software-skills --skill design-patternsgit clone --depth 1 https://github.com/miles990/claude-software-skillsWrote 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/miles990/claude-software-skills/design-patterns)<a href="https://agentmods.dev/skills/miles990/claude-software-skills/design-patterns"><img src="https://agentmods.dev/badge/skills/miles990/claude-software-skills/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.00010 | $0.02402 |
| Opus 5 | $0.00005 | $0.01201 |
| Sonnet 5 | $0.00002 | $0.00480 |
| Haiku 4.5 | $0.00001 | $0.00240 |
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 8d 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 — 498 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Design Patterns
Overview
Reusable solutions to common software design problems. Understanding patterns helps you communicate design ideas effectively and avoid reinventing the wheel.
Creational Patterns
Factory Method
Purpose: Create objects without specifying exact class
// Abstract factory
interface PaymentProcessor {
process(amount: number): Promise<Result>;
}
class StripeProcessor implements PaymentProcessor { /* ... */ }
class PayPalProcessor implements PaymentProcessor { /* ... */ }
function createProcessor(type: string): PaymentProcessor {
switch (type) {
case 'stripe': return new StripeProcessor();
case 'paypal': return new PayPalProcessor();
default: throw new Error(`Unknown processor: ${type}`);
}
}
Builder
Purpose: Construct complex objects step by step
class QueryBuilder {
private query: Query = {};
select(...fields: string[]) {
this.query.fields = fields;
return this;
}
from(table: string) {
this.query.table = table;
return this;
}
where(condition: Condition) {
this.query.conditions ??= [];
this.query.conditions.push(condition);
return this;
}
build(): string {
return this.compile(this.query);
}
}
// Usage
const sql = new QueryBuilder()
.select('id', 'name')
.from('users')
.where({ age: { gte: 18 } })
.build();
Singleton
Purpose: Ensure single instance (use sparingly)
// Modern approach: module-level instance
// database.ts
class Database {
private constructor() {}
private static instance: Database;
static getInstance(): Database {
if (!Database.instance) {
Database.instance = new Database();
}
return Database.instance;
}
}
// Better: Dependency injection
class UserService {
constructor(private db: Database) {}
}
Structural Patterns
Adapter
Purpose: Make incompatible interfaces work together
// Legacy API returns XML
interface LegacyAPI {
getDataXML(): string;
}
// New code expects JSON
interface ModernAPI {
getData(): object;
}
class APIAdapter implements ModernAPI {
constructor(private legacy: LegacyAPI) {}
getData(): object {
const xml = this.legacy.getDataXML();
return this.parseXML(xml);
}
private parseXML(xml: string): object {
// Convert XML to object
}
}
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.
- 8d ago First seen · 498 lines · 10 tokens per session scan A 00a88ca90b74
design-patterns is a skill published in the GitHub repository miles990/claude-software-skills (20 stars, last pushed 7mo ago), licensed MIT. It adds 10 tokens to every session and 2,402 once invoked, about $0.0001 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-30.
Other skills, from other repositories
design-pattern-selector
Select the right GoF design pattern for a specific object-oriented design problem. Use when facing any of these situations: object creation inflexibility (too many concrete class references), tight coupling between classes, subclass explosion from trying to extend behavior, inability to modify a class you don't own…
humanize-automation
Human-like mouse, keyboard and scroll behavior for behavioral bot bypass.
database-performance
Database access patterns for performance. Separate read/write models, avoid N+1 queries, use AsNoTracking, apply row limits, and never do application-side joins. Works with EF Core and Dapper.
Malware Analysis & Sandboxing
Static and dynamic malware analysis, YARA rule generation, sandbox configuration, behavioral profiling, and malware family classification.
attack-patterns-reference
Use when classifying a verified web or WordPress behavior and selecting a related validation skill.
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.