Borrowing it
Nothing to install: this file belongs to GabrielOnDelphi/Claude-Tools-for-Delphi. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/GabrielOnDelphi/Claude-Tools-for-Delphi/main/.claude/skills/light-ref-DesignPatterns/SKILL.mdgit clone --depth 1 https://github.com/GabrielOnDelphi/Claude-Tools-for-DelphiWrote 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/gabrielondelphi/claude-tools-for-delphi/light-ref-designpatterns)<a href="https://agentmods.dev/skills/gabrielondelphi/claude-tools-for-delphi/light-ref-designpatterns"><img src="https://agentmods.dev/badge/skills/gabrielondelphi/claude-tools-for-delphi/light-ref-designpatterns.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
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.00000 | $0.01073 |
| Opus 5 | $0.00000 | $0.00536 |
| Sonnet 5 | $0.00000 | $0.00215 |
| Haiku 4.5 | $0.00000 | $0.00107 |
Grade A, and why
light-ref-DesignPatterns 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 3d 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 — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Design patterns in Delphi — reference
Gabriel writes on this, so this is a decision index, not a tutorial. Two rules before applying any pattern:
- YAGNI — do not add a pattern for a variation point that does not exist yet. A
casestatement with two branches does not need Strategy. - Delphi already ships the pattern. Anonymous methods (
TProc/TFunc), virtual methods, generics,System.Messaging, enumerators andTObjectList<T>collapse most textbook GoF into a few lines. Use the built-in before the class hierarchy, and prefer a shared base class to an interface unless the seam is a real plug-in point.
Index
| Pattern | Use when | Delphi-native shortcut |
|---|---|---|
| Strategy | one step of an algorithm varies | pass a TFunc<..>/TProc<..>; only make a class family if the strategy holds state |
| Template Method | fixed skeleton, a few varying steps | virtual/abstract methods on a base class, overridden by descendants |
| State | behaviour changes with an object's mode, case ladders repeat |
a small state class per mode behind a base class; swap the field |
| Observer | many parts must react to a change, loosely coupled | System.Messaging.TMessageManager (subscribe/broadcast) — no hand-rolled listener list |
| Command | wrap an action as a value (undo, queue, macro) | often just a TProc; a class only when you need undo/serialisation |
| Factory Method | pick a concrete type at runtime | a class function Create...: TBase that returns the right descendant |
| Abstract Factory | create a whole family of related objects | one factory class with several class functions |
| Builder | object needs many optional steps to construct | fluent methods returning Self, then Build |
| Adapter | fit a foreign/legacy API to yours | a thin wrapper class exposing your shape, delegating inward |
| Decorator | add behaviour without subclass explosion | a wrapper holding the wrapped object and forwarding, adding around it |
| Facade | hide a messy subsystem behind one door | one coarse class with a few methods over the tangle |
| Proxy | control access (lazy load, cache, guard) | a stand-in class with the same surface as the target |
| Chain of Responsibility | try handlers in order until one copes | a list of handler objects, or an ordered list of TFunc<..,Boolean> |
| Singleton | exactly one shared instance | a unit-level accessor function Foo: TFoo freed in finalization — beware shared mutable state and threads |
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.
- 3d ago Changed · +2 lines 15f9546d00c2
- 7d ago First seen · 74 lines · 0 tokens per session scan A ddac7324dc70
light-ref-DesignPatterns is a skill published in the GitHub repository GabrielOnDelphi/Claude-Tools-for-Delphi (17 stars, last pushed 2d ago), licensed MPL-2.0. It costs nothing until one of its globs matches a file; then it loads 1,073 tokens. 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
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
next-partial-prefetching-adoption
Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…
chronicle
Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…
babysit-pr
Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…