Agent skill

Horse Writing Middleware

by HashLoad in HashLoad/horse

Guide to writing custom middlewares for the Horse framework, following the callback flow with the Next parameter.

MITAuto-check passed

Install Horse Writing Middleware

skills CLI
$ npx skills add HashLoad/horse --skill horse-writing-middleware -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install HashLoad/horse horse-writing-middleware --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/HashLoad/horse.git skills-src && mkdir -p .claude/skills && cp -r skills-src/doc/skills/horse-writing-middleware .claude/skills/horse-writing-middleware && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
horse-writing-middleware
GitHub stars
1.4k
Token cost
~355 tokens
SKILL.md length
49 words
Files
1
Skills in repo
23
Repo updated
First seen
Licence
MIT

At a glance

Guide to writing custom middlewares for the Horse framework, following the callback flow with the Next parameter.

  • SKILL.md covers Middleware Signature and Terminating Execution Early
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Horse Writing Middleware is an agent skill from HashLoad/horse. Guide to writing custom middlewares for the Horse framework, following the callback flow with the Next parameter.

Its SKILL.md is about 360 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: Fast, opinionated, minimalist web framework for Delphi. The licence is MIT.

Example prompts

  • “/horse-writing-middleware”

What it can do on your machine

Read from SKILL.md and the folder at commit d4351a5. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are pascal).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Horse Writing Middleware loads about 355 tokens when it runs. Until then it costs about 35 tokens; SKILL.md has 49 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~35
When it runs · the whole SKILL.md, loaded when a task matches
~355

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from HashLoad/horse at commit d4351a5, republished under its MIT licence (© HashLoad). 49 words, ~355 tokens.

Download SKILL.mdSave it as .claude/skills/horse-writing-middleware/SKILL.md (or your agent's skills folder).
name
horse-writing-middleware
description
Guide to writing custom middlewares for the Horse framework, following the callback flow with the Next parameter.

Writing Custom Horse Middlewares

Middleware Signature

A custom middleware is a procedure that receives THorseRequest, THorseResponse, and a callback procedure Next.

pascal
procedure MyCustomMiddleware(Req: THorseRequest; Res: THorseResponse; Next: TProc);
begin
  // 1. Logic BEFORE the request reaches the endpoint handler
  Req.Headers.AddOrSetValue('X-Processed-By', 'MyMiddleware');
  
  // 2. Call Next to delegate execution to the subsequent middleware or route handler
  Next;
  
  // 3. Logic AFTER the route handler completes its execution
  Res.Headers.AddOrSetValue('X-Execution-Finished', 'True');
end;

Terminating Execution Early

If a validation fails (e.g., authentication is missing), do NOT call Next. Set the status and send the response immediately. This halts the pipeline execution.

pascal
procedure AuthMiddleware(Req: THorseRequest; Res: THorseResponse; Next: TProc);
var
  LToken: string;
begin
  LToken := Req.Headers.Items['Authorization'];
  
  if LToken.IsEmpty then
  begin
    // Halt execution by sending response and omitting the Next call
    Res.Send('Unauthorized').Status(THTTPStatus.Unauthorized);
    Exit;
  end;
  
  // Token is valid, proceed with pipeline
  Next;
end;

© HashLoad, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in doc/skills/horse-writing-middleware of HashLoad/horse.

Open the folder on GitHubat commit d4351a5

Compare with similar skills

Horse Writing Middleware next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Horse Writing Middleware compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Horse Writing Middleware this skillHashLoad/horse1.4k—~355Automated safety check: PassMIT
Follow Up Resultspaperclipai/paperclip99k—~732Automated safety check: PassMIT
Signals Scout PR Follow UpPostHog/posthog40k—~8.7kAutomated safety check: PassCustom licence
Follow Up From Granolasuperset-sh/superset15k—~758Automated safety check: PassCustom licence
Tsed Middlewarestsedio/tsed3.1k—~2.4kAutomated safety check: PassMIT
You Might Not Need A Callbacksimstudioai/sim30k—~904Automated safety check: PassApache-2.0

Similar skills

  • Follow Up Results

    paperclipai/paperclip

    Find progress or deliverables from earlier Paperclip work and add user-requested feedback with human attribution.

    99k GitHub stars~732 tokensUpdated today
    Auto-check passed
  • Official

    Follow-up Signals scout for recently merged pull requests. An agent skill from PostHog/posthog.

    40k GitHub stars~8.7k tokensUpdated today
    DevelopmentAuto-check passed
  • Follow Up From Granola

    superset-sh/superset

    Turn a meeting into work — read its Granola notes, extract the commitments that belong to this user, and carry each one out or draft it (a code change, a ticket, a reply) with a trace back to the…

    15k GitHub stars~758 tokensUpdated today
    Auto-check passed
  • Tsed Middlewares

    tsedio/tsed

    Add cross-cutting request logic to a Ts.ED v8 application with middlewares, auth guards, interceptors and pipes.

    3.1k GitHub stars~2.4k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Analyze and fix useCallback anti-patterns in your code. An agent skill from simstudioai/sim.

    30k GitHub stars~904 tokensUpdated today
    Auto-check passed
  • Turn your latest Granola call into next steps (owner, team, due date, and the Linear issue that already tracks each one) and post them to Slack, using cognee memory of your calls, Linear issues and…

    32k GitHub stars~779 tokensUpdated today
    Productivity & AutomationAuto-check: notes

More from HashLoad/horse

All 23 skills in this repo
  • Horse App Structure

    HashLoad/horse

    Guide for setting up Horse applications, bootstrap program (.dpr), basic console initialization, and registering modules.

    1.4k GitHub stars~716 tokensUpdated 2 days ago
    Auto-check passed
  • Guide for setting up thread-safe database connection pooling (FireDAC / UniDAC) in multithreaded Horse applications.

    1.4k GitHub stars~1.4k tokensUpdated 2 days ago
    Auto-check passed
  • Guide for managing request-scoped contextual services and IoC (dependency injection) in Delphi and Lazarus.

    1.4k GitHub stars~985 tokensUpdated 2 days ago
    Auto-check passed
  • Horse Files Streams

    HashLoad/horse

    Guide to handling file uploads (multipart), downloads, and stream lifetime management in the Horse framework.

    1.4k GitHub stars~601 tokensUpdated 2 days ago
    Auto-check passed
  • Horse Grpc

    HashLoad/horse

    Guidelines and workflows for developing and maintaining gRPC services, HTTP/2 h2c transport, and Protobuf serialization within the Horse framework.

    1.4k GitHub stars~776 tokensUpdated 2 days ago
    Auto-check passed
  • Guide for writing automated integration tests for Horse endpoints using DUnit/DUnitX and THTTPClient.

    1.4k GitHub stars~964 tokensUpdated 2 days ago
    Auto-check passed

Questions about Horse Writing Middleware

What does Horse Writing Middleware do?

Guide to writing custom middlewares for the Horse framework, following the callback flow with the Next parameter. Horse Writing Middleware is an agent skill from HashLoad/horse. Guide to writing custom middlewares for the Horse framework, following the callback flow with the Next parameter.

How do I install Horse Writing Middleware in Claude Code?

Run `npx skills add HashLoad/horse --skill horse-writing-middleware -a claude-code`. Or copy the skill folder (doc/skills/horse-writing-middleware in HashLoad/horse) into .claude/skills/horse-writing-middleware in your project. Claude Code loads it when a task matches its description.

How do I install Horse Writing Middleware in Codex?

Run `npx skills add HashLoad/horse --skill horse-writing-middleware -a codex`. Or copy the skill folder (doc/skills/horse-writing-middleware in HashLoad/horse) into .agents/skills/horse-writing-middleware in your project. Codex loads it when a task matches its description.

Can I use Horse Writing Middleware in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add HashLoad/horse --skill horse-writing-middleware -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/horse-writing-middleware, .gemini/skills/horse-writing-middleware, .github/skills/horse-writing-middleware and .opencode/skills/horse-writing-middleware in your project.

What does Horse Writing Middleware need to run?

SKILL.md names no scripts, command-line tools or credentials: Horse Writing Middleware is instructions for the agent only.

Does Horse Writing Middleware access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Horse Writing Middleware safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Horse Writing Middleware use?

Horse Writing Middleware is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Horse Writing Middleware use?

About 355 tokens (SKILL.md is roughly 1.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Horse Writing Middleware?

Skills that share tags, products or a category with Horse Writing Middleware: Follow Up Results (paperclipai/paperclip, 99k stars), Signals Scout PR Follow Up (PostHog/posthog, 40k stars), Follow Up From Granola (superset-sh/superset, 15k stars) and Tsed Middlewares (tsedio/tsed, 3.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Horse Writing Middleware?

HashLoad (a GitHub organization) maintains it in HashLoad/horse, which has 1,378 GitHub stars. The repository holds 23 skills in this directory. The repository was last updated on October 7, 2026.

Source: HashLoad/horse on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.