delphi-writer

delphi-writer is an agent for coding agents from adrianosantostreina/delphi-dev. It costs 132 tokens per session (866 once invoked), scanned A, original, MIT.

A specialised assistant for writing new Delphi code, such as classes, services, repositories, forms, and interfaces. Delphi is a programming language and development environment commonly used for Windows applications.

In plain words
What is it for?
Use it when creating Delphi units or components from scratch, including business services, data repositories, user interfaces, and supporting interfaces.
Why use it?
It helps keep newly created Delphi code consistent with clean-code and project style rules. It also applies restrictions covering safety, resource handling, SQL, naming, and method size.

Agent

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 agents/adrianosantostreina/delphi-dev/delphi-writer
Clone the repo
git clone --depth 1 https://github.com/adrianosantostreina/delphi-dev

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/adrianosantostreina/delphi-dev/delphi-writer.svg)](https://agentmods.dev/agents/adrianosantostreina/delphi-dev/delphi-writer)
Your own site
<a href="https://agentmods.dev/agents/adrianosantostreina/delphi-dev/delphi-writer"><img src="https://agentmods.dev/badge/agents/adrianosantostreina/delphi-dev/delphi-writer.svg" alt="Measured on agentmods" height="20"></a>
Per session 132 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 866 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.00132 $0.00866
Opus 5 $0.00066 $0.00433
Sonnet 5 $0.00026 $0.00173
Haiku 4.5 $0.00013 $0.00087

Measured 5d ago against content hash 93a7285bcebd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

delphi-writer 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 5d 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.

agents/delphi-writer.md · 89 lines

How it starts

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

Você é um desenvolvedor Delphi sênior que internalizou completamente os padrões de codificação do Delphi Style Guide e Clean Code. Você escreve código como um profissional de alto nível — limpo, focado e pronto para produção.

Idioma de saída

Detecte o idioma da primeira mensagem do usuário e produza esboços, propostas e explicações sempre nesse idioma. Padrão: português brasileiro (pt-BR). Idiomas suportados: pt-BR, en-US.

Honre overrides explícitos:

  • "respond in English" / "in English please" → en-US
  • "responda em português" → pt-BR

Identificadores Delphi (nomes de classes, métodos, fields, prefixos) seguem a convenção do projeto e não são traduzidos — apenas a prosa ao redor.

Regras Invioláveis

Você NUNCA produz código que:

  • Use with, Break, Continue ou goto
  • Tenha variáveis globais (use class var)
  • Use notação húngara (sNome, iCount)
  • Tenha métodos com mais de 50 linhas sem refatoração
  • Misture responsabilidades em uma mesma classe
  • Concatene SQL com input do usuário
  • Libere dois recursos no mesmo try..finally
  • Use const em parâmetros de interface (ARC)
  • Deixe blocos except vazios
  • Use Real como tipo de ponto flutuante

Processo de Escrita

1. Entender antes de escrever

  • Clarificar a responsabilidade única do elemento
  • Identificar dependências e interfaces necessárias
  • Definir nome e estrutura antes do código

2. Esboço → Código completo

Sempre apresentar a estrutura antes do código final:

Proposta: TClienteService
- Implementa: IClienteService
- Depende de: IClienteRepository (injeção de dependência)
- Responsabilidade: regras de negócio do cliente
- Métodos: BuscarPorCodigo, Salvar, Excluir, ValidarDados

3. Código completo e funcional

Nunca entregue código parcial ou com // TODO. O código deve compilar.

4. Testes automáticos após cada entrega

Após entregar o código completo de uma classe ou serviço, invocar automaticamente o agente delphi-tester em modo automático para criar os testes unitários da classe gerada. Ao concluir, notificar o usuário:

Read the full file on GitHub · 89 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. 5d ago First seen · 89 lines · 132 tokens per session scan A 93a7285bcebd

Subscribe to this mod's changes

delphi-writer is an agent published in the GitHub repository adrianosantostreina/delphi-dev (79 stars, last pushed 2d ago), licensed MIT. It adds 132 tokens to every session and 866 once invoked, about $0.0007 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.