horse-multi-instance

horse-multi-instance is a skill for Claude Code, Codex from HashLoad/horse. It costs 28 tokens per session (583 once invoked), scanned A, original, MIT.

Guidelines for running several independent Horse web-server instances inside one Delphi application. Each instance can have its own routes, middleware, request tracking, and lifecycle settings.

In plain words
What is it for?
Use it to create and configure separate `THorseInstance` servers, register their endpoints and middleware, and start their listeners concurrently.
Why use it?
It lets one program expose separate HTTP interfaces without mixing their routes or middleware. For example, a public API and an administration or monitoring dashboard can run on different ports.

Skill for Claude CodeCodex

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

Good fit Use it to create and configure separate THorseInstance servers, register their endpoints and middleware, and start their listeners concurrently.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hashload/horse/horse-multi-instance
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,380 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-multi-instance
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-multi-instance

README.md
[![agentmods](https://agentmods.dev/badge/skills/hashload/horse/horse-multi-instance/github.svg)](https://agentmods.dev/skills/hashload/horse/horse-multi-instance)
Your own site
<a href="https://agentmods.dev/skills/hashload/horse/horse-multi-instance"><img src="https://agentmods.dev/badge/skills/hashload/horse/horse-multi-instance/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-multi-instance

Your own site · 80×15
<a href="https://agentmods.dev/skills/hashload/horse/horse-multi-instance"><img src="https://agentmods.dev/badge/skills/hashload/horse/horse-multi-instance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 583 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 warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 65
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Rogue Agent · line 66
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
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.00028 $0.00583
Opus 5.5 $0.00011 $0.00233
Sonnet 5.5 $0.00006 $0.00117
Haiku 4.5 $0.00003 $0.00058

Measured 1mo ago against content hash 4a9942cf28d5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

horse-multi-instance 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 1mo 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-multi-instance/SKILL.md · 78 lines

How it starts

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

Horse Multi-Instance

Decoupled Server Contexts

Use THorseInstance when your application needs to expose multiple separate HTTP interfaces (e.g., a public REST API on port 8080 and an admin/telemetry dashboard on port 9090) within the same process.

Each THorseInstance allocates its own isolated:

  • Routing tables
  • Middleware pipelines
  • Active requests telemetry counters
  • Lifecycle hooks (onRequest, preParsing, preValidation, onSend, onResponse)

Declaring and Configuring Instances

Always create and configure THorseInstance explicitly, registering endpoints and middlewares directly on the instance:

var
  FPublicApi: THorseInstance;
  FAdminPanel: THorseInstance;
begin
  // 1. Public API configuration
  FPublicApi := THorseInstance.Create;
  FPublicApi.Use(Jhonson); // Middleware registered only for FPublicApi
  FPublicApi.Get('/api/v1/ping', DoPingHandler);

  // 2. Admin Panel configuration
  FAdminPanel := THorseInstance.Create;
  FAdminPanel.Get('/admin/metrics', DoMetricsHandler);
end;

Starting Listeners Concurrently

Since listeners enter blocking execution loops (depending on the provider and application shape), you must start the physical socket listening in separate threads:

// Start Instance 1 in a background thread
TThread.CreateAnonymousThread(
  procedure
  begin
    FPublicApi.Listen(9001);
  end).Start;

// Start Instance 2 in a background thread
TThread.CreateAnonymousThread(
  procedure
  begin
    FAdminPanel.Listen(9002);
  end).Start;

Stopping Servers and Freeing Resources

When shutting down, stop listening on each instance before freeing the objects:

FPublicApi.StopListen;
FAdminPanel.StopListen;

FPublicApi.Free;
FAdminPanel.Free;

Design Safeguards & AI Best Practices

  1. Never write static vars inside local middlewares: Ensure any middleware used inside a THorseInstance relies on instance-specific configuration or request-scoped services (Req.Services).
  2. Backward Compatibility: If the project does not require multiple instances, continue using the static THorse facade class. It is automatically routed to a default instance under the hood.
  3. FPC/Lazarus Compatibility: When writing samples or libraries for Lazarus, avoid Delphi anonymous procedures inline (procedure begin end) for route handlers. Use standard global procedures instead.

Read the full file on GitHub · 78 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. 1mo ago First seen · 78 lines · 28 tokens per session scan A 4a9942cf28d5

Subscribe to this mod's changes

horse-multi-instance is a skill published in the GitHub repository HashLoad/horse (1,380 stars, last pushed 4d ago), licensed MIT. It adds 28 tokens to every session and 583 once invoked, about $0.0001 per session on Opus 5.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.