Agent skill

Horse Websocket

by HashLoad in HashLoad/horse

Guidelines and workflows for developing and maintaining WebSocket endpoints and protocol upgrades within the Horse framework.

MITAuto-check passedBackend & APIs

Install Horse Websocket

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

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

GitHub CLI
$ gh skill install HashLoad/horse horse-websocket --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-websocket .claude/skills/horse-websocket && 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-websocket
GitHub stars
1.4k
Token cost
~841 tokens
SKILL.md length
229 words
Files
1
Skills in repo
23
Repo updated
First seen
Licence
MIT

At a glance

Guidelines and workflows for developing and maintaining WebSocket endpoints and protocol upgrades within the Horse framework.

  • Works in 2 steps: IHorseWebSocketConnection.SendText and… → The HTTP request/response objects…
  • Tasks that involve Realtime and WebSockets
  • SKILL.md covers 🟢 Request Upgrade Pattern, 🟢 Broadcasts and Session…, 🟢 Error and Exception Handling and 🟢 Thread-Safety Rules
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Horse Websocket is an agent skill from HashLoad/horse. Guidelines and workflows for developing and maintaining WebSocket endpoints and protocol upgrades within the Horse framework.

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

It sits in Backend & APIs, covering Realtime and WebSockets. The repository describes itself as: Fast, opinionated, minimalist web framework for Delphi. The licence is MIT.

When your agent uses it

  • Tasks that involve Realtime and WebSockets

Example prompts

  • “Use the horse-websocket skill to guideline and workflows for developing and maintaining WebSocket endpoints and protocol upgrades within the Horse…”
  • “/horse-websocket”

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. IHorseWebSocketConnection.SendText and SendBinary are thread-safe and protected by an internal TCriticalSection. Do not add manual…
  2. The HTTP request/response objects (THorseRequest, THorseResponse) are recycled/destroyed once the upgrade is completed. Do not store or…

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 delphi and 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 Websocket loads about 841 tokens when it runs. Until then it costs about 35 tokens; SKILL.md has 229 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
~841

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). 229 words, ~841 tokens.

Download SKILL.mdSave it as .claude/skills/horse-websocket/SKILL.md (or your agent's skills folder).
name
horse-websocket
description
Guidelines and workflows for developing and maintaining WebSocket endpoints and protocol upgrades within the Horse framework.

Horse WebSocket Coding Skill

This skill provides guidelines and patterns for developers and AI agents implementing, debugging, or maintaining WebSocket endpoints in the Horse framework.

🟢 Request Upgrade Pattern

To upgrade an HTTP request to a WebSocket connection, always call Res.UpgradeToWebSocket(AOnConnectCallback) inside the route handler.

Delphi Syntax (Anonymous Procedure / Closure)
delphi
THorse.Get('/ws',
  procedure(Req: THorseRequest; Res: THorseResponse)
  begin
    Res.UpgradeToWebSocket(
      procedure(const AConn: IHorseWebSocketConnection)
      begin
        AConn.OnMessage := procedure(const AConnection: IHorseWebSocketConnection; const AText: string)
        begin
          AConnection.SendText('Received: ' + AText);
        end;
      end);
  end);
Lazarus/FPC Syntax (Object Methods)

Always use regular object methods or class procedures for callbacks in Lazarus/FPC to ensure compatibility:

pascal
type
  TWebSocketController = class
  public
    class procedure HandleWS(Req: THorseRequest; Res: THorseResponse);
    class procedure OnConnect(const AConn: IHorseWebSocketConnection);
    class procedure OnMessage(const AConnection: IHorseWebSocketConnection; const AText: string);
  end;

class procedure TWebSocketController.HandleWS(Req: THorseRequest; Res: THorseResponse);
begin
  Res.UpgradeToWebSocket(OnConnect);
end;

class procedure TWebSocketController.OnConnect(const AConn: IConn);
begin
  AConn.OnMessage := OnMessage;
end;

class procedure TWebSocketController.OnMessage(const AConnection: IHorseWebSocketConnection; const AText: string);
begin
  AConnection.SendText('Received: ' + AText);
end;

🟢 Broadcasts and Session Management

Use THorseWebSocketManager for thread-safe operations across multiple connections.

  • Broadcast to all: THorseWebSocketManager.Broadcast('/ws', 'Hello all!');
  • Broadcast excluding sender: THorseWebSocketManager.Broadcast('/ws', 'Hello others!', AConnection);

🟢 Error and Exception Handling

  • Silencing normal interruptions: Normal connection validation errors or manual status sends followed by pipeline interruption should raise EHorseCallbackInterrupted (from unit Horse.Exception.Interrupted) to gracefully exit the middleware pipeline.
  • Callback Safety: Always place try-except blocks inside custom event handlers (like OnMessage) to prevent crashes inside the worker socket threads.
  • Fail-Fast Detection: If a client requests a WebSocket upgrade on an unsupported provider (e.g. HttpSys or hosted ISAPI/CGI), Res.UpgradeToWebSocket will automatically reply with 501 Not Implemented and raise EHorseCallbackInterrupted.

🟢 Thread-Safety Rules

  1. IHorseWebSocketConnection.SendText and SendBinary are thread-safe and protected by an internal TCriticalSection. Do not add manual synchronization wrappers around them.
  2. The HTTP request/response objects (THorseRequest, THorseResponse) are recycled/destroyed once the upgrade is completed. Do not store or reference them inside any of the WebSocket callbacks (OnMessage, OnDisconnect, etc.). Use the IHorseWebSocketConnection context instead.

© 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-websocket of HashLoad/horse.

Open the folder on GitHubat commit d4351a5

Compare with similar skills

Horse Websocket 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 Websocket compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Horse Websocket this skillHashLoad/horse1.4k—~841Automated safety check: PassMIT
Supabase Development and Debuggingsupabase/agent-skills2.7k3 repos~3.6kAutomated safety check: PassMIT
Use Yaakmountain-loop/yaak19k—~1.9kAutomated safety check: PassMIT
Gemini Live API Devgoogle-gemini/gemini-skills4.3k—~4.6kAutomated safety check: PassApache-2.0
Web3 PolymarketPolymarket/agent-skills1912 repos~2kAutomated safety check: PassNone
GraphQL ArchitectJeffallan/claude-skills12k1 repos~1.3kAutomated safety check: PassMIT

Similar skills

  • Official

    General Supabase skill for database, auth, Edge Functions, Realtime and storage work, plus client libraries, migrations, security audits, debugging and reading logs.

    2.7k GitHub starsUsed in 3 repos~3.6k tokens
    Backend & APIsAuto-check passed
  • Use Yaak

    mountain-loop/yaak

    A skill your agent uses when the user mentions Yaak, a Yaak workspace, or the yaak command, or asks to call, hit, or smoke test HTTP/REST endpoints, save or organize API requests for reuse or manual…

    19k GitHub stars~1.9k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Gemini Live API Dev

    google-gemini/gemini-skills

    Official

    A skill your agent uses when building real-time, bidirectional streaming applications with the Gemini Live API, or migrating legacy Live models (2.0/2.5/3.1) to Gemini 3.8 Live.

    4.3k GitHub stars~4.6k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Web3 Polymarket

    Polymarket/agent-skills

    Polymarket integration for prediction market trading on Polygon.

    191 GitHub starsUsed in 2 repos~2k tokens
    Backend & APIsAuto-check passed
  • GraphQL Architect

    Jeffallan/claude-skills

    Designs GraphQL schemas and Apollo Federation graphs, with DataLoader resolvers, subscriptions, query complexity limits and caching.

    12k GitHub starsUsed in 1 repo~1.3k tokens
    Backend & APIsAuto-check passed
  • Broker Integration

    marketcalls/openalgo

    Integrate a new Indian broker into OpenAlgo, or modify an existing broker plugin.

    2.8k GitHub stars~4.7k tokensUpdated today
    Backend & APIsAuto-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 yesterday
    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 yesterday
    Auto-check passed
  • Guide for managing request-scoped contextual services and IoC (dependency injection) in Delphi and Lazarus.

    1.4k GitHub stars~985 tokensUpdated yesterday
    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 yesterday
    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 yesterday
    Auto-check passed
  • Guide for writing automated integration tests for Horse endpoints using DUnit/DUnitX and THTTPClient.

    1.4k GitHub stars~964 tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Horse Websocket

What does Horse Websocket do?

Guidelines and workflows for developing and maintaining WebSocket endpoints and protocol upgrades within the Horse framework. Horse Websocket is an agent skill from HashLoad/horse. Guidelines and workflows for developing and maintaining WebSocket endpoints and protocol upgrades within the Horse framework.

When should I use Horse Websocket?

Horse Websocket fits situations like: tasks that involve Realtime and WebSockets.

How do I install Horse Websocket in Claude Code?

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

How do I install Horse Websocket in Codex?

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

Can I use Horse Websocket 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-websocket -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-websocket, .gemini/skills/horse-websocket, .github/skills/horse-websocket and .opencode/skills/horse-websocket in your project.

What does Horse Websocket need to run?

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

Does Horse Websocket 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 Websocket 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 Websocket use?

Horse Websocket 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 Websocket use?

About 841 tokens (SKILL.md is roughly 3.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 Websocket?

Skills that share tags, products or a category with Horse Websocket: Supabase Development and Debugging (supabase/agent-skills, 2.7k stars), Use Yaak (mountain-loop/yaak, 19k stars), Gemini Live API Dev (google-gemini/gemini-skills, 4.3k stars) and Web3 Polymarket (Polymarket/agent-skills, 191 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Horse Websocket?

HashLoad (a GitHub organization) maintains it in HashLoad/horse, which has 1,377 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.