delphi-testing

delphi-testing is a skill for Claude Code, Codex from danieleteti/delphi-ai-skills. It costs 111 tokens per session (2,701 once invoked), scanned A, original, Apache-2.0.

A Delphi unit-testing guide for DUnitX, the test framework included with RAD Studio. It covers console test projects, test fixtures, checks, test data, leak detection, and continuous-integration results.

In plain words
What is it for?
Use it to write, run, or repair DUnitX tests in plain Delphi projects, including tests that run in continuous integration.
Why use it?
It avoids common mistakes such as using unsupported test attributes or letting failed tests return a successful process status. It also helps preserve the behaviour of older code with tests.

Skill for Claude CodeCodex

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

Good fit Use it to write, run, or repair DUnitX tests in plain Delphi projects, including tests that run in continuous integration.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/danieleteti/delphi-ai-skills/delphi-testing
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-testing
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-testing

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/danieleteti/delphi-ai-skills/delphi-testing"><img src="https://agentmods.dev/badge/skills/danieleteti/delphi-ai-skills/delphi-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 111 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,701 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.00111 $0.02701
Opus 5.5 $0.00044 $0.01080
Sonnet 5.5 $0.00022 $0.00540
Haiku 4.5 $0.00011 $0.00270

Measured 24d ago against content hash 608fdae2a1a1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

delphi-testing 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 24d 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-testing/SKILL.md · 205 lines

How it starts

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

Delphi unit testing with DUnitX

DUnitX ships with RAD Studio (...\Studio\<n>.0\source\DUnitX, precompiled units in lib\win32\release and lib\win64\release). No web framework is assumed. For DelphiMVCFramework integration tests (in-process server, REST client) use the dmvcframework-testing skill instead. For leak diagnosis outside tests see delphi-code-smells; for ownership rules see delphi reference/memory.md.

Everything below was compiled and run with dcc32 / dcc64 37.0 (13 Florence) and cross-checked with 23.0 (12 Athens). Differences are labelled. Not checked on 11 Alexandria (no 22.0 tree here). Do not recall DUnitX names: open the unit. The usual mistake is a plausible attribute that does not exist (TestCaseSource is one).

Critical rules

  1. The exit code is yours. ITestRunner.Execute never sets System.ExitCode. After it: if not results.AllPassed then System.ExitCode := EXIT_ERRORS;. Without it three failing tests exit 0 and CI stays green. -exit:Pause only waits for Enter (and blocks a CI job); it is unrelated to the code.
  2. Zero tests is green. A filter that matches nothing (-r:Typo) gives Tests Found: 0, AllPassed True, exit 0. No {$STRONGLINKTYPES ON} gives ENoTestsRegistered; a handler that only prints it exits 0. Set ExitCode in the except branch and fail when results.TestCount = 0.
  3. String asserts ignore case by default. Assert.AreEqual('ABC','abc') passes; so does Contains. Pass False as ignoreCase, use Assert.NoDiff, or set Assert.IgnoreCaseDefault := False.
  4. StartsWith/EndsWith take the substring first: Assert.StartsWith('Hel', 'Hello'). Contains takes the whole string first. A swapped call fails with a confusing message.
  5. [WillRaise(EConvertError)] matches the exact class. A descendant fails the test. Add exDescendant.
  6. Leak detection is off by default. The default monitor reports 0 bytes. A leaking test passes. See reference/runner-ci.md for the unit, the define and the search path it needs. With it on, never end a test with Assert.Pass: the test is then reported as leaking (measured).
  7. One fixture instance serves all its tests. Fields survive from one test to the next: reset them in [Setup]. A parameterless constructor is the fixture setup and silently disables [SetupFixture]; the destructor is the fixture teardown.
  8. Generic Assert.AreEqual<T> on objects compares references: two instances of your class with equal fields fail. Assert the fields. Arguments typed TStrings/TStringList compare line by line instead.
  9. -xml: needs an absolute path. A relative one raises EInOutError: Unable to create directory.
  10. Inside a test class WriteLn(msg) and Log(msg) go to the loggers (a class helper on TObject). WriteLn('a', n) does not compile there; write System.Writeln for raw console output.
  11. [MaxTime] is unreliable on Win64: on 13 it ends in an access violation instead of a timeout.
  12. Assert.AreEqual(1, lDict.Count) does not compile on Win64 (E2532; Count is NativeInt in 12 and 13). Write Integer(lDict.Count). It compiles on Win32, so the error shows up late.

Read the full file on GitHub · 205 lines

Files

What ships with it

5 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. 24d ago First seen · 205 lines · 111 tokens per session scan A 608fdae2a1a1

Subscribe to this mod's changes

delphi-testing is a skill published in the GitHub repository danieleteti/delphi-ai-skills (27 stars, last pushed 15d ago), licensed Apache-2.0. It adds 111 tokens to every session and 2,701 once invoked, about $0.0004 per session on Opus 5.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-11-08.

Related

delphi-testing compared with skills from other repositories

delphi-testing next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
delphi-testingdanieleteti/delphi-ai-skillsSkill2715d agoApache-2.0A111Claude Code, Codex
intuitive-testsMiaoDX/intuitive-flowSkill491mo agoMITA29Claude Code, Codex
DUnitX Testing Patternsdelphicleancode/delphi-spec-kitSkill598mo agoMITA22Claude Code
Delphi Test-Driven Development (TDD) and DUnitXdelphicleancode/delphi-spec-kitSkill598mo agoMITA49Claude Code
verifyYeachan-Heo/oh-my-claudecodeSkill41ktodayMITA12Claude Code
moai-ref-testing-pyramidmodu-ai/moai-adkSkill1.3ktodayApache-2.0A61Claude Code
testing-livekit-agentsfcakyon/claude-codex-settingsSkill1.2ktodayApache-2.0A155Claude Code