Borrowing it
Nothing to install: this file belongs to GabrielOnDelphi/Claude-Tools-for-Delphi. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/GabrielOnDelphi/Claude-Tools-for-Delphi/main/.claude/skills/light-ref-Memory/SKILL.mdgit clone --depth 1 https://github.com/GabrielOnDelphi/Claude-Tools-for-DelphiWrote 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.
[](https://agentmods.dev/skills/gabrielondelphi/claude-tools-for-delphi/light-ref-memory)<a href="https://agentmods.dev/skills/gabrielondelphi/claude-tools-for-delphi/light-ref-memory"><img src="https://agentmods.dev/badge/skills/gabrielondelphi/claude-tools-for-delphi/light-ref-memory.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00072 | $0.00843 |
| Opus 5 | $0.00036 | $0.00421 |
| Sonnet 5 | $0.00014 | $0.00169 |
| Haiku 4.5 | $0.00007 | $0.00084 |
Grade A, and why
light-ref-Memory 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Delphi memory & exceptions — reference
Class instances are freed manually, on every target — desktop and mobile alike, no GC. Every ownerless Create must be freed on every path, the exception path included. The checklist at the end is the single source of truth: the light-review-step1 and light-review-step3 agents read this file and apply it, so keep the list here and nowhere else.
try immediately after Create
Anything between Create and try can raise and leak the instance.
LList := TStringList.Create;
try
LList.Add('item');
finally
LList.Free;
end;
Several locals: nest try..finally in reverse creation order, or nil them all up front and FreeAndNil each in one finally.
Functions that return an object — guard the newborn
If a later step raises before the caller receives the result, it leaks:
function BuildList: TStringList;
begin
Result := TStringList.Create;
try
Fill(Result); // may raise
except
Result.Free; // free before propagating
raise;
end;
end;
Never pass an inline .Create as a parameter unless the callee definitely takes ownership.
FreeAndNil vs Free · Owner-managed
FreeAndNil(F)for a field that may be re-tested withAssignedor freed twice; plainFreefor a local that dies at end of scope.- A component created with an Owner —
TButton.Create(Self)— is freed by that Owner. Do not free it yourself. - Owned fields allocated in a constructor are freed in the destructor,
inheritedlast.
Exceptions: specific, never swallowed
Catch the narrowest type you can act on. A bare except ... end hides EAccessViolation, EOutOfMemory and real bugs.
try
Commit;
except
on E: EFDDBEngineException do
begin
Log(E.Message);
raise EDatabaseError.Create('Service temporarily unavailable'); // translate to a domain error
end;
end;
- Re-raise with a bare
raise;—raise E;resets the stack trace. - Prefer a small domain tree (
EBusinessRule/EInfrastructureand their subclasses) over scatteredraise Exception.Create('...'), so upper layers can catch by category.
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.
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.
- 2d ago Changed · +2 lines 1eb10263ee69
- 7d ago First seen · 84 lines · 72 tokens per session scan A 8eb640252721
light-ref-Memory is a skill published in the GitHub repository GabrielOnDelphi/Claude-Tools-for-Delphi (17 stars, last pushed yesterday), licensed MPL-2.0. It adds 72 tokens to every session and 843 once invoked, about $0.0004 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.
Other skills, from other repositories
matlab
Build, review, migrate, and safely plan MATLAB or GNU Octave numerical workflows, including arrays, tabular/time data, tests, projects, graphics, MAT files, and explicit Python interoperability.
ast-grep
Guide for writing ast-grep rules to perform structural code search and analysis. Use when users need to search codebases using Abstract Syntax Tree (AST) patterns, find specific code structures, or perform complex code queries that go beyond simple text search. This skill should be used when users ask to search for…
platform-detection
Identify a .NET project's test platform, framework, command mode, and SDK-style vs classic project system. Use only for "which test platform/framework?", "VSTest or MTP?", or "what runner does this project use?", including bridge settings, UseVSTest opt-outs, and incompatible or conflicting VSTest/MTP configuration.…
unity-version-split
Split a C# file into Unity 6.5+ and pre-Unity 6.5 variants. Use when a file needs different implementations for different Unity versions due to API changes (e.g., EntityId vs int, GetEntityId vs GetInstanceID).
omh-rust
This is a Hermes-native rust workflow skill.
migrate-better-result-3
Migrate a TypeScript codebase from better-result 2.x to 3.0. Use when upgrading better-result across the TaggedError syntax, removed Result serialization helpers, recovery inference, matching, or retry APIs.