delphi-code-smells

delphi-code-smells is a skill for Claude Code, Codex from danieleteti/delphi-ai-skills. It costs 167 tokens per session (1,719 once invoked), scanned A, original, Apache-2.0.

A review guide for Delphi and Object Pascal code, focused on compiler warnings, memory leaks, access violations, and other common defects.

In plain words
What is it for?
Reviewing Delphi code, investigating leaks or access violations, and making new code safer against common mistakes.
Why use it?
It helps find objective warning and memory-management problems before relying on a subjective code review.

Skill for Claude CodeCodex

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

Good fit Reviewing Delphi code, investigating leaks or access violations, and making new code safer against common mistakes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/danieleteti/delphi-ai-skills/delphi-code-smells
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 danieleteti/delphi-ai-skills --skill delphi-code-smells
Clone the repo
git clone --depth 1 https://github.com/danieleteti/delphi-ai-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 delphi-code-smells

README.md
[![agentmods](https://agentmods.dev/badge/skills/danieleteti/delphi-ai-skills/delphi-code-smells/github.svg)](https://agentmods.dev/skills/danieleteti/delphi-ai-skills/delphi-code-smells)
Your own site
<a href="https://agentmods.dev/skills/danieleteti/delphi-ai-skills/delphi-code-smells"><img src="https://agentmods.dev/badge/skills/danieleteti/delphi-ai-skills/delphi-code-smells/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 delphi-code-smells

Your own site · 80×15
<a href="https://agentmods.dev/skills/danieleteti/delphi-ai-skills/delphi-code-smells"><img src="https://agentmods.dev/badge/skills/danieleteti/delphi-ai-skills/delphi-code-smells.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 167 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,719 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.
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.00167 $0.01719
Opus 5 $0.00084 $0.00860
Sonnet 5 $0.00033 $0.00344
Haiku 4.5 $0.00017 $0.00172

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

Security

Grade A, and why

delphi-code-smells 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 10d 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/delphi-code-smells/SKILL.md · 112 lines

How it starts

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

Delphi code smells — make the machine find them first

A review pass that starts with an opinion is worth little. A review pass that starts with the compiler and a leak report is worth a lot, because it is objective and free. Do that half first, every time.

Every warning code, directive and API below was produced by dcc32.exe 37.0 on this machine or copied from the shipped RTL/DUnitX source, not recalled. Where something could not be verified it says so.


What this skill owns, and what it does not

Question Where it is answered
Why does this leak? How does ownership work? Free, try/finally, interfaces, refcounting, TObjectList<T>, TComponent, managed records delphi, reference/memory.mdnot restated here
What is the right try/except shape? What must I never catch? delphi, reference/exceptions.md
Synchronize vs Queue, locks, FreeOnTerminate delphi, reference/concurrency.md
Who frees the object a DMVC action returns? What is ToFree? dmvcframework SKILL.md — not restated here
How do I find the leak? How do I prove it? How do I stop it coming back? here

This skill is diagnosis. When a smell needs semantics to explain, it links; it does not re-teach.


Order of attack — an unfamiliar unit

Work down this list. Stop reporting when you run out of items that cost the user something.

  1. Compile it with warnings and hints on and read every line of output. Free, objective, and the single highest-yield step. reference/static-analysis.md.
  2. Run it with ReportMemoryLeaksOnShutdown := True. If there is a test suite, run that. reference/leaks.md.
  3. Ownership by hand — every Create in the unit: who frees it, on which paths, including the raising one. This is where the compiler cannot help you.
  4. Exception handling — every except without an on, every empty handler, every try/except that should have been try/finally.
  5. Concurrency — anything reachable from a TThread.Execute or a TTask.Run body.
  6. Everything else. Naming, with, long methods, magic numbers.

Read the full file on GitHub · 112 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 10d ago First seen · 112 lines · 167 tokens per session scan A 4344af36c84a

Subscribe to this mod's changes

delphi-code-smells is a skill published in the GitHub repository danieleteti/delphi-ai-skills (18 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 167 tokens to every session and 1,719 once invoked, about $0.0008 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.