Agent skill

Horse Integration Tests

by HashLoad in HashLoad/horse

Guide for writing automated integration tests for Horse endpoints using DUnit/DUnitX and THTTPClient.

MITAuto-check passedTesting & QA

Install Horse Integration Tests

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

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

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

At a glance

Guide for writing automated integration tests for Horse endpoints using DUnit/DUnitX and THTTPClient.

  • Works in 3 steps: The Dynamic Port Pattern → Integration Test Example (DUnitX) → Best Practices for Integration Testing
  • Tasks that involve Integration testing
  • SKILL.md covers 1. The Dynamic Port Pattern, 2. Integration Test Example… and 3. Best Practices for…
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Horse Integration Tests is an agent skill from HashLoad/horse. Guide for writing automated integration tests for Horse endpoints using DUnit/DUnitX and THTTPClient.

Its SKILL.md is about 960 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 Testing & QA, covering Integration testing. The repository describes itself as: Fast, opinionated, minimalist web framework for Delphi. The licence is MIT.

When your agent uses it

  • Tasks that involve Integration testing

Example prompts

  • “/horse-integration-tests”

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. The Dynamic Port Pattern
  2. Integration Test Example (DUnitX)
  3. Best Practices for Integration Testing

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 Integration Tests loads about 964 tokens when it runs. Until then it costs about 31 tokens; SKILL.md has 193 words of instructions outside code blocks.

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

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). 193 words, ~964 tokens.

Download SKILL.mdSave it as .claude/skills/horse-integration-tests/SKILL.md (or your agent's skills folder).
name
horse-integration-tests
description
Guide for writing automated integration tests for Horse endpoints using DUnit/DUnitX and THTTPClient.

Horse Integration Testing

Automated integration tests ensure your API routes, request parsing, and error-handling pipelines behave correctly under simulated HTTP traffic.


1. The Dynamic Port Pattern

When running tests locally or in CI/CD pipelines (like GitHub Actions), static ports (e.g., 9000) might be occupied. To avoid port conflicts:

  1. Generate a dynamic port for each test run.
  2. Start Horse on that port inside the setup method.
  3. Perform HTTP requests against http://localhost:<dynamic_port>.
  4. Terminate Horse inside the teardown method.

2. Integration Test Example (DUnitX)

Here is a complete integration test suite demonstrating how to bootstrap Horse, perform requests with Delphi's native THTTPClient, and assert responses:

pascal
unit Test.UserAPI;

interface

uses
  DUnitX.TestFramework,
  System.Net.HttpClient,
  System.SysUtils;

type
  [TestFixture]
  TTestUserAPI = class
  private
    FPort: Integer;
    FClient: THTTPClient;
    function GetBaseURL: string;
  public
    [SetupFixture]
    procedure SetupFixture; // Start Horse Server
    [TearDownFixture]
    procedure TearDownFixture; // Terminate Horse Server
    [Setup]
    procedure Setup;
    [TearDown]
    procedure TearDown;
    
    [Test]
    procedure TestGetPingReturnsPong;
    [Test]
    procedure TestGetInvalidUserReturns404;
  end;

implementation

uses
  Horse,
  System.JSON,
  System.Net.URLClient;

function TTestUserAPI.GetBaseURL: string;
begin
  Result := 'http://localhost:' + FPort.ToString;
end;

procedure TTestUserAPI.SetupFixture;
begin
  // Choose a random dynamic port
  Randomize;
  FPort := 10000 + Random(50000);
  
  // Register endpoints to test
  THorse.Get('/ping',
    procedure(Req: THorseRequest; Res: THorseResponse; Next: TProc)
    begin
      Res.Send('pong');
    end);

  THorse.Get('/users/:id',
    procedure(Req: THorseRequest; Res: THorseResponse; Next: TProc)
    var
      LId: Integer;
    begin
      LId := Req.Params.Field('id').AsInteger;
      if LId = 999 then
        Res.Status(THTTPStatus.NotFound).Send('User not found')
      else
        Res.Send('User found');
    end);

  // Start Horse asynchronously (non-blocking)
  THorse.Listen(FPort);
end;

procedure TTestUserAPI.TearDownFixture;
begin
  // Terminate the process / stop Horse provider
  THorse.Terminate;
end;

procedure TTestUserAPI.Setup;
begin
  FClient := THTTPClient.Create;
end;

procedure TTestUserAPI.TearDown;
begin
  FClient.Free;
end;

procedure TTestUserAPI.TestGetPingReturnsPong;
var
  LResponse: IHTTPResponse;
begin
  LResponse := FClient.Get(GetBaseURL + '/ping');
  
  Assert.AreEqual(200, LResponse.StatusCode);
  Assert.AreEqual('pong', LResponse.ContentAsString);
end;

procedure TTestUserAPI.TestGetInvalidUserReturns404;
var
  LResponse: IHTTPResponse;
begin
  LResponse := FClient.Get(GetBaseURL + '/users/999');
  
  Assert.AreEqual(404, LResponse.StatusCode);
  Assert.AreEqual('User not found', LResponse.ContentAsString);
end;

initialization
  TDUnitX.RegisterTestFixture(TTestUserAPI);
end.

3. Best Practices for Integration Testing

  1. Isolate Database State: Before running tests, mock database tables or use transactional rollbacks to ensure tests start with clean, predictable data.
  2. Separate Test Logic: Keep your route handlers in dedicated Controller units. Do not define routes inline in your test project setup unless you are testing general configuration middleware behavior.
  3. Always call THorse.Terminate: Failing to call Terminate in your tear down fixture will leave the TCP socket open, preventing subsequent test executions from binding to the same port.

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

Open the folder on GitHubat commit d4351a5

Compare with similar skills

Horse Integration Tests 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 Integration Tests compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Horse Integration Tests this skillHashLoad/horse1.4k—~964Automated safety check: PassMIT
Plugin Testingpolyipseity/obsidian-terminal948—~828Automated safety check: PassAGPL-3.0
Create Modulecartography-cncf/cartography4.1k—~2.5kAutomated safety check: PassApache-2.0
Td Integration Testmarcus/td251—~1.2kAutomated safety check: PassMIT
Integration E2E Testingshinpr/claude-code-workflows691—~3.5kAutomated safety check: PassMIT
JS-in-HTML Testingliaohch3/claude-tap3.3k—~924Automated safety check: PassMIT

Similar skills

  • Plugin Testing

    polyipseity/obsidian-terminal

    Skill for testing Obsidian plugin features in this repository.

    948 GitHub stars~828 tokensUpdated 5 days ago
    Testing & QAAuto-check passed
  • Create Module

    cartography-cncf/cartography

    Author a new Cartography intel module end-to-end (entry point, sync GET/TRANSFORM/LOAD/CLEANUP, declarative data model, integration test, schema docs).

    4.1k GitHub stars~2.5k tokensUpdated today
    Testing & QAAuto-check passed
  • Write integration tests for the td-sync admin API using the TestHarness in internal/api/testharnesstest.go.

    251 GitHub stars~1.2k tokensUpdated 8 days ago
    Testing & QAAuto-check passed
  • Integration E2E Testing

    shinpr/claude-code-workflows

    Integration and E2E test design principles, ROI calculation, test skeleton specification, and review criteria.

    691 GitHub stars~3.5k tokensUpdated 7 days ago
    Testing & QAAuto-check passed
  • JS-in-HTML Testing

    liaohch3/claude-tap

    Tests JavaScript embedded in an HTML file in two layers: pytest checks of the logic ported to Python, and Playwright runs in a real browser for the DOM.

    3.3k GitHub stars~924 tokensUpdated 16 days ago
    Testing & QAAuto-check passed
  • Crosvm Testing

    google/crosvm

    Official

    Skill to assist with running tests and managing test VMs in the crosvm repository.

    1.3k GitHub stars~847 tokensUpdated yesterday
    Testing & QAAuto-check passed

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 ensuring Lazarus and Free Pascal (FPC) compatibility, addressing anonymous methods differences, JSON units, and compiler directives.

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

Categories

Questions about Horse Integration Tests

What does Horse Integration Tests do?

Guide for writing automated integration tests for Horse endpoints using DUnit/DUnitX and THTTPClient. Horse Integration Tests is an agent skill from HashLoad/horse. Guide for writing automated integration tests for Horse endpoints using DUnit/DUnitX and THTTPClient.

When should I use Horse Integration Tests?

Horse Integration Tests fits situations like: tasks that involve Integration testing.

How do I install Horse Integration Tests in Claude Code?

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

How do I install Horse Integration Tests in Codex?

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

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

What does Horse Integration Tests need to run?

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

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

Horse Integration Tests 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 Integration Tests use?

About 964 tokens (SKILL.md is roughly 3.9k 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 Integration Tests?

Skills that share tags, products or a category with Horse Integration Tests: Plugin Testing (polyipseity/obsidian-terminal, 948 stars), Create Module (cartography-cncf/cartography, 4.1k stars), Td Integration Test (marcus/td, 251 stars) and Integration E2E Testing (shinpr/claude-code-workflows, 691 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Horse Integration Tests?

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.