horse-lazarus-compatibility

horse-lazarus-compatibility is a skill for Claude Code, Codex from HashLoad/horse. It costs 34 tokens per session (791 once invoked), scanned A, original, MIT.

A compatibility guide for Horse web applications written in Delphi and Lazarus/Free Pascal, two Pascal development environments. It explains syntax and compiler settings needed to keep the same code working in both.

In plain words
What is it for?
Use it when writing or adapting Horse routes and handlers for cross-platform Pascal projects, especially when replacing anonymous methods and setting Lazarus compiler options.
Why use it?
It helps avoid code that compiles in Delphi but fails in Lazarus/Free Pascal because the two environments handle callbacks, JSON units, and compiler directives differently.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when writing or adapting Horse routes and handlers for cross-platform Pascal projects, especially when replacing anonymous methods and setting Lazarus compiler options.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hashload/horse/horse-lazarus-compatibility
About the project

Horse is a lightweight web framework for Delphi and Lazarus programs, providing tools for building HTTP servers and APIs. It is for developers who need routing, request handling, middleware, streaming, WebSockets, and related server features in those languages. Its catalogue skills support working with the framework.

HashLoad/horse · 1,373 stars · on GitHub

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.

Any agent
npx skills add HashLoad/horse --skill horse-lazarus-compatibility
Clone the repo
git clone --depth 1 https://github.com/HashLoad/horse

Made for: Claude Code, Codex.

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 horse-lazarus-compatibility

README.md
[![agentmods](https://agentmods.dev/badge/skills/hashload/horse/horse-lazarus-compatibility/github.svg)](https://agentmods.dev/skills/hashload/horse/horse-lazarus-compatibility)
Your own site
<a href="https://agentmods.dev/skills/hashload/horse/horse-lazarus-compatibility"><img src="https://agentmods.dev/badge/skills/hashload/horse/horse-lazarus-compatibility/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for horse-lazarus-compatibility

Your own site · 80×15
<a href="https://agentmods.dev/skills/hashload/horse/horse-lazarus-compatibility"><img src="https://agentmods.dev/badge/skills/hashload/horse/horse-lazarus-compatibility.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 791 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00034 $0.00791
Opus 5 $0.00017 $0.00396
Sonnet 5 $0.00007 $0.00158
Haiku 4.5 $0.00003 $0.00079

Measured 11d ago against content hash 2de0eb141986, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

horse-lazarus-compatibility 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 11d 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.

doc/skills/horse-lazarus-compatibility/SKILL.md · 103 lines

How it starts

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

Horse Lazarus & FPC Compatibility

To write cross-platform Horse applications that compile flawlessly in both Delphi and Lazarus/FPC, you must adhere to Free Pascal's compiler rules and syntax limitations.


1. No Anonymous Methods in FPC (The Core Rule)

While Delphi supports registering routes using inline anonymous procedures (methods) directly, Free Pascal (FPC) does not support anonymous methods with variable capturing in the same syntax.

Delphi Syntax (Will Fail to Compile on Lazarus)

// Do NOT use this inline syntax if targeting Lazarus/FPC
THorse.Get('/ping',
  procedure(Req: THorseRequest; Res: THorseResponse; Next: TProc)
  begin
    Res.Send('pong');
  end);

Lazarus/FPC Correct Syntax

Always declare handlers as standard standalone procedures or method pointers, and pass them as callback parameters:

{$MODE DELPHI}{$H+} // CRITICAL compiler directive for Lazarus

uses
  Horse;

// 1. Declare handler as a standard procedure
procedure GetPingHandler(Req: THorseRequest; Res: THorseResponse);
begin
  Res.Send('pong');
end;

begin
  // 2. Register the procedure callback
  THorse.Get('/ping', GetPingHandler);
  THorse.Listen(9000);
end.

2. Standard Compiler Directives for Lazarus

Always include these two compiler directives at the absolute top of your Lazarus .pas or .dpr (program) files:

{$MODE DELPHI}{$H+}
  • {$MODE DELPHI}: Instructs FPC to emulate Delphi's object-oriented syntax and generic type resolutions.
  • {$H+}: Enforces the use of Long Strings (AnsiString) by default instead of short strings (which are limited to 255 characters).

3. JSON Framework Differences

Delphi and Lazarus use entirely different built-in JSON serialization libraries.

  • Delphi: Uses System.JSON (TJSONObject, TJSONArray).
  • Lazarus/FPC: Uses fpjson and jsonparser (TJSONObject, TJSONArray).

Writing Cross-Compiler JSON Code

If your middleware or controllers need to compile on both platforms, use conditional compilation defines ($IFDEF):

Read the full file on GitHub · 103 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. 11d ago First seen · 103 lines · 34 tokens per session scan A 2de0eb141986

Subscribe to this mod's changes

horse-lazarus-compatibility is a skill published in the GitHub repository HashLoad/horse (1,373 stars, last pushed yesterday), licensed MIT. It adds 34 tokens to every session and 791 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.

Related

Other skills, from other repositories

api-design-patterns

Comprehensive API design patterns covering REST, GraphQL, gRPC, versioning, authentication, and modern API best practices.

aAAaqwq/AGI-Super-Team · 29 tokens

fastapi

Use when building, reviewing, testing, securing or shipping a FastAPI / async Python service — routers, Pydantic v2 schemas, dependency injection, async SQLAlchemy 2.0, OAuth2/JWT, ASGITransport tests, production wiring. NOT language-level Python or packaging (that is python), NOT engine-level SQL (that is…

ericrisco/rsc-harness · 94 tokens

fastapi-expert

Expert-level FastAPI development for high-performance Python APIs with async support. Use when the user mentions Python, API, async, REST, OpenAPI, or Pydantic, or when the task involves FastAPI Features.

personamanagmentlayer/pcl · 49 tokens

darto-add-route

Add or modify HTTP endpoints in a Darto (Dart) web app — verbs, path/query params, request-body reading, route groups, and Context response helpers. Use when building or changing API routes in a project that depends on the darto package (import 'package:darto/darto.dart'). Not for Express/Node — Darto handlers take a…

evandersondev/darto · 90 tokens

fastapi-patterns

FastAPI production patterns — routing, dependency injection, background tasks, streaming, error handling, and async. Use when building or reviewing a FastAPI service.

chandrudp29/skillhub · 36 tokens

api-design-patterns

Comprehensive API design patterns covering REST, GraphQL, gRPC, versioning, authentication, and modern API best practices.

bobmatnyc/claude-mpm · 29 tokens