implementation-design-patterns-python

implementation-design-patterns-python is a skill for Claude Code, Codex from pproenca/dot-skills. It costs 227 tokens per session (2,733 once invoked), scanned A, original, MIT.

A reference for applying the 22 Gang of Four design patterns in modern Python, a programming language.

In plain words
What is it for?
Use it when writing, refactoring, or reviewing Python code with recurring object-creation, behaviour, or structure problems.
Why use it?
It helps choose an appropriate structure for problems such as tight coupling, large conditionals, or too many subclasses without over-engineering.

Skill for Claude CodeCodex

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

Good fit Use it when writing, refactoring, or reviewing Python code with recurring object-creation, behaviour, or structure problems.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pproenca/dot-skills/implementation-design-patterns-python
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 pproenca/dot-skills --skill implementation-design-patterns-python
Clone the repo
git clone --depth 1 https://github.com/pproenca/dot-skills

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 implementation-design-patterns-python

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/pproenca/dot-skills/implementation-design-patterns-python"><img src="https://agentmods.dev/badge/skills/pproenca/dot-skills/implementation-design-patterns-python.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 227 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,733 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.00227 $0.02733
Opus 5 $0.00113 $0.01367
Sonnet 5 $0.00045 $0.00547
Haiku 4.5 $0.00023 $0.00273

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

Security

Grade A, and why

implementation-design-patterns-python 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 5d 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/.experimental/implementation-design-patterns-python/SKILL.md · 95 lines

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.

Python Design Patterns Best Practices (Refactoring Guru)

Implementation reference for the 22 Gang of Four design patterns in idiomatic modern Python (3.10+), distilled from refactoring.guru. Each of the 22 pattern files across 3 categories captures intent, problem, solution, applicability (when to use AND when NOT to), a runnable Python example with output, implementation steps, pros/cons, and relations to sibling patterns.

This is the Pythonic-first companion to the TypeScript design-patterns skill. Most GoF patterns shrink to a language feature in Python — a function, a generator, a dataclass, functools.singledispatch, a match statement. Every entry leads with that idiomatic form and keeps the class-based GoF structure only where identity, stored state, runtime registration, or polymorphic dispatch genuinely earn it.

The patterns are a vocabulary for structural decisions, not a prescription. Reach for one only when its applicability criteria match — every entry includes a When NOT to Use section to guard against over-engineering, which is the more common failure with this catalog in Python.

When to Apply

  • A constructor has grown to 10+ parameters (telescoping-constructor smell) or subclasses exist only to bake in parameter combinations
  • A method branches on kind/type/mode/status to pick an algorithm or behavior — a match or if/elif ladder that grows with each variant
  • Integrating an incompatible third-party API, library, or legacy class whose method names don't match your code
  • Modeling a tree-shaped domain (file systems, ASTs, UI trees, org charts) where leaves and branches must be treated uniformly
  • Adding cross-cutting behavior at runtime — logging, caching, access control, compression — without subclassing
  • Selecting an algorithm or behavior variant at runtime from config, user input, or environment
  • Implementing undo/redo, history snapshots, transactional rollback, or queueing/scheduling of operations
  • Coordinating many objects whose direct mutual references have become tangled — a hub that brokers communication
  • Notifying many subscribers when something changes — event systems, reactive data flows
  • Reviewing code that smells like a pattern is implicit (a giant if isinstance(...), parallel class hierarchies, copy-pasted algorithm skeletons) — make it explicit, or collapse it to a Python idiom

Read the full file on GitHub · 95 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. 5d ago First seen · 95 lines · 227 tokens per session scan A 5a208b328922

Subscribe to this mod's changes

implementation-design-patterns-python is a skill published in the GitHub repository pproenca/dot-skills (205 stars, last pushed 24d ago), licensed MIT. It adds 227 tokens to every session and 2,733 once invoked, about $0.0011 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

matlab

Build, review, migrate, and safely plan MATLAB or GNU Octave numerical workflows, including arrays, tabular/time data, tests, projects, graphics, MAT files, and explicit Python interoperability.

K-Dense-AI/scientific-agent-skills · 42 tokens

pennylane

Hardware-agnostic quantum ML framework with automatic differentiation. Use when training quantum circuits via gradients, building hybrid quantum-classical models, or needing device portability across IBM/Google/Rigetti/IonQ. Best for variational algorithms (VQE, QAOA), quantum neural networks, and integration with…

K-Dense-AI/scientific-agent-skills · 98 tokens

dd-code-generation

Use pup CLI for immediate Datadog operations or generate code for integration into applications.

DataDog/pup · 16 tokens

rocm-kernels

Provides guidance for writing and benchmarking optimized Triton kernels for AMD GPUs (MI355X, R9700) on ROCm, targeting HuggingFace diffusers (LTX-Video, SD3, FLUX) and transformers. Core kernels: RMSNorm, RoPE 3D, GEGLU, AdaLN. Includes XCD swizzle, autotune, diffusers integration patterns, and LTX-Video pipeline…

huggingface/kernels · 93 tokens

holoscan-install-wheel

Install Holoscan SDK Python wheel via pip into a venv. Use for Python installs; not for native C++/apt or Conda installs.

NVIDIA/skills · 37 tokens

typing-exclusion-worker

Python typing exclusion worker: remove assigned mypy exclusion modules in small scoped batches, fix typing issues, run validation, and produce a structured completion summary. Use when running parallel typing-debt workers or when asked to remove modules from pyproject mypy exclusion overrides.

getsentry/skills · 57 tokens