design-patterns

design-patterns is a skill for Claude Code, Codex from pantheon-org/tekhne. It costs 67 tokens per session (1,833 once invoked), scanned A, original, MIT.

A guide to recurring code-structure solutions such as Strategy, Factory, Adapter, and Observer. These patterns describe common ways to organize classes and their relationships.

In plain words
What is it for?
Use it when refactoring long if/else chains, designing extension systems, connecting outside or legacy APIs, or evaluating whether a structural pattern fits a real problem.
Why use it?
Complex conditions, tightly coupled code, and awkward inheritance can make changes risky. Choosing a suitable pattern can separate responsibilities or allow parts of the design to vary independently.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when refactoring long if/else chains, designing extension systems, connecting outside or legacy APIs, or evaluating whether a structural pattern fits a real problem.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pantheon-org/tekhne/design-patterns
Install

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.

Any agent
npx skills add pantheon-org/tekhne --skill design-patterns
Clone the repo
git clone --depth 1 https://github.com/pantheon-org/tekhne

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for design-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/pantheon-org/tekhne/design-patterns/github.svg)](https://agentmods.dev/skills/pantheon-org/tekhne/design-patterns)
Your own site
<a href="https://agentmods.dev/skills/pantheon-org/tekhne/design-patterns"><img src="https://agentmods.dev/badge/skills/pantheon-org/tekhne/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.

agentmods 80×15 button for design-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/pantheon-org/tekhne/design-patterns"><img src="https://agentmods.dev/badge/skills/pantheon-org/tekhne/design-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,833 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00067 $0.01833
Opus 5 $0.00034 $0.00916
Sonnet 5 $0.00013 $0.00367
Haiku 4.5 $0.00007 $0.00183

Measured 9d ago against content hash 748726ba589a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

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 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.

skills/software-engineering/design-principles/design-patterns/SKILL.md · 299 lines

How it starts

The opening of the file, as written. The whole thing — 299 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Design Patterns

Structural design patterns for solving recurring design problems with proven solutions.

When to Use

  • Eliminating complex conditional logic (if/else chains, switch statements)
  • Designing plugin/extension systems
  • Integrating external APIs or legacy systems
  • Separating concerns with clear interfaces
  • Evaluating whether a pattern solves a concrete problem

When Not to Use

  • Class-level SOLID violations (use solid-principles)
  • Architectural boundary decisions (use clean-architecture)
  • Testing strategy configuration (use testable-design)
  • NEVER apply patterns preemptively for imagined future needs

Pattern Selection Workflow

Step 1: Identify the Design Problem

Output: Concrete problem statement without pattern jargon.

Ask:

  • What conditional logic or coupling exists?
  • What needs to vary independently?
  • What external system needs integration?

Example:

Problem: Payment processing logic uses if/else chains to select processors.
Adding new processors requires editing existing code (OCP violation).

Step 2: Evaluate Pattern Fit

Output: Pattern choice with explicit win condition.

Ask before choosing a pattern:

  • Does this pattern solve the concrete problem?
  • What complexity does it remove vs. add?
  • Can the team maintain it?

Example:

Pattern: Strategy (not Factory).
Win condition: Eliminates if/else chains for payment processor selection.
Cost: One interface + implementations. Benefit: Easy to add new processors.

Step 3: Document Pattern Application

Output: Pattern applied with before/after comparison.

Template:

Pattern: Strategy
Problem: if/else chain for payment processor selection
Solution: PaymentProcessor interface + implementations (Stripe, PayPal, etc.)
Validation: New processors added without editing existing code

Common Patterns

Strategy Pattern

Use when: Conditional logic selects between algorithms.

Example:

// Before: if/else chain
if (type === 'stripe') {
  // Stripe logic
} else if (type === 'paypal') {
  // PayPal logic
}

// After: Strategy pattern
interface PaymentProcessor {
  process(amount: number): Promise<Receipt>
}

class StripeProcessor implements PaymentProcessor { /* ... */ }
class PayPalProcessor implements PaymentProcessor { /* ... */ }

// Select strategy
const processor = processors[type]
await processor.process(amount)

Read the full file on GitHub · 299 lines

Changes

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.

  1. 9d ago First seen · 299 lines · 67 tokens per session scan A 748726ba589a

Subscribe to this mod's changes

design-patterns is a skill published in the GitHub repository pantheon-org/tekhne (10 stars, last pushed yesterday), licensed MIT. It adds 67 tokens to every session and 1,833 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

frontend-design

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

anthropics/claude-plugins-official · 40 tokens

visual-plan

Turn ordinary text plans into rich interactive visual plans with diagrams, file maps, annotated code, open questions, and UI/prototype review when useful.

BuilderIO/skills · 32 tokens

visual-edit

Open a running local app in Design overview mode as URL-backed iframe screens for visual editing, flow review, duplication, and route-state exploration. Use when the user asks to inspect, compare, or edit a real local app visually in Design.

BuilderIO/skills · 51 tokens

muapi-ui-design

Generate high-fidelity UI/UX mockups for mobile and web apps using Atomic Design principles — creates wireframes and design systems via muapi.ai.

SamurAIGPT/Generative-Media-Skills · 34 tokens

display-glasses-with-jetpack-compose-glimmer

Provides guidelines for developing projected Android XR apps for display glasses using the Jetpack Compose Glimmer UI toolkit. This skill covers foundational Glimmer design principles, workflows for implementing Jetpack Compose Glimmer, and interaction models for the glasses form factor. Use this skill to build an…

android/skills · 91 tokens

baseline-ui

Quickly deslop UI code by fixing spacing, hierarchy, typography, and small layout issues. Use when the interface needs a fast cleanup or polish pass.

ibelick/ui-skills · 34 tokens