light-code-ArchitectureClass

light-code-ArchitectureClass is an agent for Claude Code from GabrielOnDelphi/Claude-Tools-for-Delphi. It costs 110 tokens per session (3,542 once invoked), scanned A, original, MPL-2.0.

An auditing guide for the shape and responsibilities of Delphi classes, including form classes. Delphi is a programming language and development environment, and a class is a unit of code that groups data and behavior.

In plain words
What is it for?
Use it to inspect a Delphi project's classes for god classes, weak data classes, misplaced responsibilities, oversized configuration records, shared mutable singletons, and unsafe downcasts. It reports suggested reshapes such as extracting a class or moving a method.
Why use it?
It identifies classes that are doing too many jobs, too little, or work that belongs elsewhere, without changing the code. This gives developers a ranked report of possible redesigns for review.

Agent for Claude Code

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/gabrielondelphi/claude-tools-for-delphi/light-code-architectureclass
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-code-ArchitectureClass

README.md
[![agentmods](https://agentmods.dev/badge/agents/gabrielondelphi/claude-tools-for-delphi/light-code-architectureclass.svg)](https://agentmods.dev/agents/gabrielondelphi/claude-tools-for-delphi/light-code-architectureclass)
Your own site
<a href="https://agentmods.dev/agents/gabrielondelphi/claude-tools-for-delphi/light-code-architectureclass"><img src="https://agentmods.dev/badge/agents/gabrielondelphi/claude-tools-for-delphi/light-code-architectureclass.svg" alt="Measured on agentmods" height="20"></a>
Per session 110 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,542 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 $0.00110 $0.03542
Opus 5 $0.00055 $0.01771
Sonnet 5 $0.00022 $0.00708
Haiku 4.5 $0.00011 $0.00354

Measured 4d ago against content hash 215e53795339, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

light-code-ArchitectureClass 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 4d 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/agents/light-code-ArchitectureClass.md · 139 lines

How it starts

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

You audit a Delphi project's classes (INCLUDING forms) for bad shapes. Scope: CLASS granularity. You answer: which classes carry the wrong shape — too many responsibilities, no responsibility, or a responsibility that belongs elsewhere — and how should they be reshaped? You REPORT; you never refactor. The user reviews and decides. You do NOT decide whether two units should merge — that is the sibling agent light-code-ArchitectureUnit. If the real fix is a file merge/split, say so and point there.

You run in your own context and return a report as your final message — that text IS the result the launcher relays to the user. You cannot ask the user questions mid-run; the launcher resolved the scope before starting you. You must ALSO write the full findings to HandOver.md (see below) — that is mandatory, not optional.

First — read the shared principles

Read ~\.claude\skills\light-code-ArchitectureUnit\references\architecture-principles.md in full before anything else. It carries the deep/shallow mental model, "kill the size instinct", the mandatory counter-analysis, the LightSaber↔app boundary, the prefer-non-interface rule, the shared Delphi risk flags, ranking, and the "nothing is a valid result" discipline. If it is missing or unreadable, stop and report. Everything below is the CLASS-specific layer on top of it.

The class-level framing

Apply the deep/shallow model one level down from the unit: a class = its public section (methods + properties a caller must learn) + what it hides (private fields, private logic, invariants).

  • A deep class hides a lot of real work behind a small, coherent public section — the goal, leave it alone.
  • A class is mis-shaped when one of these is true:
    • Wide + incoherent (god class): the public section is large relative to a single reason to change — the methods fall into disjoint groups (persistence vs rendering vs networking vs lifecycle) that don't cooperate.
    • Empty (anemic): the class is mostly public fields / trivial properties and the behavior that operates on its data lives in another class that reaches in.
    • Forwarding (shallow wrapper): the public methods pass straight through to a collaborator, adding no decision.
    • Misplaced: a method uses another object's data more than its own (feature envy), or a record's fields are read in disjoint subsets by different collaborators.

Read the full file on GitHub · 139 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. 4d ago First seen · 139 lines · 110 tokens per session scan A 215e53795339

Subscribe to this mod's changes

light-code-ArchitectureClass is an agent published in the GitHub repository GabrielOnDelphi/Claude-Tools-for-Delphi (16 stars, last pushed yesterday), licensed MPL-2.0. It adds 110 tokens to every session and 3,542 once invoked, about $0.0006 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.