delphi-tests

delphi-tests is a skill for Claude Code from adrianosantostreina/delphi-dev. It costs 167 tokens per session (1,471 once invoked), scanned A, original, MIT.

A specialist workflow for writing automated unit tests in Delphi with DUnitX, a testing framework. It also covers test isolation and test-driven development (TDD), where tests guide implementation.

In plain words
What is it for?
Use it to create or improve Delphi unit tests, test error cases and dependencies, organize test fixtures, and work on code coverage or TDD tasks.
Why use it?
It provides consistent testing guidance for Delphi projects and helps replace or avoid the older DUnit framework in new work.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the delphi-dev plugin — 15 skills, 10 commands, 4 agents shipped together

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.

agentmods
npx agentmods add skills/adrianosantostreina/delphi-dev/delphi-tests
Any agent
npx skills add adrianosantostreina/delphi-dev --skill delphi-tests
Clone the repo
git clone --depth 1 https://github.com/adrianosantostreina/delphi-dev

Made for: Claude Code.

Or install delphi-dev, the plugin that ships this one along with the rest of its 15 skills, 10 commands, 4 agents.

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-tests

README.md
[![agentmods](https://agentmods.dev/badge/skills/adrianosantostreina/delphi-dev/delphi-tests.svg)](https://agentmods.dev/skills/adrianosantostreina/delphi-dev/delphi-tests)
Your own site
<a href="https://agentmods.dev/skills/adrianosantostreina/delphi-dev/delphi-tests"><img src="https://agentmods.dev/badge/skills/adrianosantostreina/delphi-dev/delphi-tests.svg" alt="Measured on agentmods" 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,471 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.01471
Opus 5 $0.00084 $0.00736
Sonnet 5 $0.00033 $0.00294
Haiku 4.5 $0.00017 $0.00147

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

Security

Grade A, and why

delphi-tests 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 6d 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-tests/SKILL.md · 163 lines

How it starts

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

Skill: Testes Unitarios Delphi com DUnitX

Voce e especialista em testes unitarios para Delphi, com profundo conhecimento em DUnitX, TTestFixture, isolamento de dependencias e boas praticas de TDD.

Idioma

Detecte o idioma da primeira mensagem do usuario e responda sempre nesse idioma. Padrao: portugues brasileiro (pt-BR). Idiomas suportados: pt-BR, en-US.

Honre overrides explicitos:

  • "respond in English" / "in English please" → en-US
  • "responda em portugues" → pt-BR

Os nomes de metodos de teste (Test_<Metodo>_<Cenario>) e identificadores Delphi permanecem no padrao do projeto independentemente do idioma; apenas as mensagens de status/notificacao para o usuario sao traduzidas.

Framework: DUnitX

O framework padrao e o DUnitX (Delphi Unit Testing Framework). Nunca use DUnit (legado) em projetos novos. Se o projeto ja usa DUnit, migre para DUnitX.

Nomenclatura de Testes

Padrao obrigatorio para nomes de metodos de teste:

Test_[Metodo]_[Cenario]

Exemplos:

  • Test_Salvar_ClienteValido — cenario de sucesso
  • Test_Salvar_ClienteSemNome_LancaExcecao — cenario de erro
  • Test_BuscarPorCodigo_ClienteNaoEncontrado — retorno vazio
  • Test_Calcular_ValorNegativo_RetornaZero — edge case

Regras:

  • Sempre use Test_ como prefixo (DUnitX detecta automaticamente)
  • O cenario deve descrever o estado de entrada ou a condicao testada
  • Nunca nomes genericos como Test1 ou TestarSalvar

Estrutura de uma Unit de Testes

unit Teste[NomeDaClasse];

interface

uses
  DUnitX.TestFramework,
  [NomeDaClasse],
  [Dependencias];

type
  [TestFixture]
  T[NomeDaClasse]Tests = class
  strict private
    F[NomeDaClasse]: I[NomeDaInterface];
    FMock[Dependencia]: TMock[IDependencia];
  public
    [Setup]
    procedure Setup;
    [TearDown]
    procedure TearDown;
  published
    [Test]
    procedure Test_[Metodo]_[Cenario];
  end;

implementation

procedure T[NomeDaClasse]Tests.Setup;
begin
  FMock[Dependencia] := TMock<I[Dependencia]>.Create;
  F[NomeDaClasse] := T[NomeDaClasse].Create(FMock[Dependencia]);
end;

procedure T[NomeDaClasse]Tests.TearDown;
begin
  F[NomeDaClasse] := nil;
end;

initialization
  TDUnitX.RegisterTestFixture(T[NomeDaClasse]Tests);
end.

Read the full file on GitHub · 163 lines

Files

What ships with it

1 file 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. 6d ago First seen · 163 lines · 167 tokens per session scan A cd020fdd2cb4

Subscribe to this mod's changes

delphi-tests is a skill published in the GitHub repository adrianosantostreina/delphi-dev (79 stars, last pushed 2d ago), licensed MIT. It adds 167 tokens to every session and 1,471 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.