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.
npx agentmods add skills/hashload/horse/horse-zero-allocationnpx skills add HashLoad/horse --skill horse-zero-allocationgit clone --depth 1 https://github.com/HashLoad/horseWrote 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/hashload/horse/horse-zero-allocation)<a href="https://agentmods.dev/skills/hashload/horse/horse-zero-allocation"><img src="https://agentmods.dev/badge/skills/hashload/horse/horse-zero-allocation.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 | $0.00032 | $0.00814 |
| Opus 5 | $0.00016 | $0.00407 |
| Sonnet 5 | $0.00006 | $0.00163 |
| Haiku 4.5 | $0.00003 | $0.00081 |
Grade A, and why
horse-zero-allocation 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.
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.
Horse Zero-Allocation Programming
To write custom routers, high-performance middlewares, or request handlers that scale under extreme concurrency, you must minimize or eliminate memory allocations on the dynamic heap. Heap allocations require global memory manager locks, which cause lock contention and page faults across multi-threaded applications.
1. Zero-Allocation String Slicing (Avoid String Copying)
Using functions like Copy(MyString, Start, Length) or string concatenation (+) allocates new string segments on the heap. Under heavy concurrency, this degrades performance.
- Rule: Use index/pointer boundaries (such as
PChar) or specialized slice types to perform string matches and parsing. - Idiomatic Example: Create or use a slice structure (like
THorseBufferSlicein the Horse RouterTree) to match paths without generating new sub-strings.
type
TZeroAllocSlice = record
Buffer: PChar;
Start: Integer;
Length: Integer;
function Compare(const AString: string): Boolean;
end;
function TZeroAllocSlice.Compare(const AString: string): Boolean;
var
I: Integer;
begin
if Length <> System.Length(AString) then
Exit(False);
for I := 0 to Length - 1 do
if (Buffer + Start + I)^ <> AString[I + 1] then
Exit(False);
Result := True;
end;
2. Using the Stack (Records and Static Arrays)
Avoid creating temporary class instances or dynamic arrays (array of Byte) inside loop structures or high-frequency handler routines. These require heap overhead and reference-counting locks.
- Stack Allocation (Records): Declare local data carriers as
recordrather thanclass. Records are allocated automatically on the fast thread stack and cleaned up instantly upon exit. - Static Arrays: For local buffers (such as socket buffers or event arrays), declare static arrays with fixed sizes:
// Correct (Stack allocation - fast, zero page faults)
procedure ProcessEvents;
var
LEvents: array[0..255] of epoll_event; // Allocated on the stack
begin
// Process up to 256 events directly
end;
// Incorrect (Heap allocation - slow thread lock contention)
procedure ProcessEventsBad;
var
LEvents: array of epoll_event;
begin
SetLength(LEvents, 256); // Hits the memory manager heap
end;
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.
- 4d ago First seen · 86 lines · 32 tokens per session scan A 3faf16d49c2c
horse-zero-allocation is a skill published in the GitHub repository HashLoad/horse (1,371 stars, last pushed 2d ago), licensed MIT. It adds 32 tokens to every session and 814 once invoked, about $0.0002 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
api-design-patterns
Comprehensive API design patterns covering REST, GraphQL, gRPC, versioning, authentication, and modern API best practices.
api-design-patterns
Comprehensive API design patterns covering REST, GraphQL, gRPC, versioning, authentication, and modern API best practices.
api-design-patterns
Comprehensive API design patterns covering REST, GraphQL, gRPC, versioning, authentication, and modern API best practices.
recon-playbook
Use when starting or restructuring an authorized external web and API assessment.
create-tutorial
Scaffold a new Membrane API Gateway tutorial in the api-gateway repo — the numbered self-teaching YAML under distribution/tutorials/ /, its support files and README links, and the matching auto-discovered integration test. Use whenever the user asks to create, add, write, or scaffold a tutorial (or a tutorial step)…
optimize-interceptor-docs
Rewrite the reference documentation of a Membrane config element so the page generated at membrane-api.io comes out clean, exact, and reference-style. Use whenever the user wants to write, improve, optimize, polish, or review the docs / Javadoc / @description / @yaml example of an interceptor, plugin, or any…