Claude-Tools-for-Delphi: Skill for Claude Code

.claude/skills/light-ref-DesignPatterns/SKILL.md

light-ref-DesignPatterns is a skill for Claude Code from GabrielOnDelphi/Claude-Tools-for-Delphi. It costs 0 tokens per session (1,073 once invoked), scanned A, original, MPL-2.0.

A quick reference for choosing common software design patterns in Delphi applications. Design patterns are reusable ways to organize code for recurring problems, and the guide also lists simpler Delphi features that can replace them.

In plain words
What is it for?
Choosing structures for changing algorithms, object states, event notifications, shared workflows, and other recurring design problems in Delphi desktop or mobile code.
Why use it?
It helps developers avoid adding unnecessary classes or complex structures when Delphi already provides a shorter solution.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is GabrielOnDelphi/Claude-Tools-for-Delphi's own configuration. It tells Claude Code how to work on Claude-Tools-for-Delphi itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Claude-Tools-for-Delphi configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/GabrielOnDelphi/Claude-Tools-for-Delphi/main/.claude/skills/light-ref-DesignPatterns/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/GabrielOnDelphi/Claude-Tools-for-Delphi

Made for: Claude Code.

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 light-ref-DesignPatterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/gabrielondelphi/claude-tools-for-delphi/light-ref-designpatterns.svg)](https://agentmods.dev/skills/gabrielondelphi/claude-tools-for-delphi/light-ref-designpatterns)
Your own site
<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>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,073 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.00000 $0.01073
Opus 5 $0.00000 $0.00536
Sonnet 5 $0.00000 $0.00215
Haiku 4.5 $0.00000 $0.00107

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

Security

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.

.claude/skills/light-ref-DesignPatterns/SKILL.md · 76 lines

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 case statement with two branches does not need Strategy.
  • Delphi already ships the pattern. Anonymous methods (TProc/TFunc), virtual methods, generics, System.Messaging, enumerators and TObjectList<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

Read the full file on GitHub · 76 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. 3d ago Changed · +2 lines 15f9546d00c2
  2. 7d ago First seen · 74 lines · 0 tokens per session scan A ddac7324dc70

Subscribe to this mod's changes

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.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

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…

microsoft/ai-agents-for-beginners · 200 tokens

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…

vercel/next.js · 95 tokens

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…

vercel/next.js · 103 tokens

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…

microsoft/vscode · 72 tokens

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…

openai/codex · 114 tokens