Agent skill

Horse Files Streams

by HashLoad in HashLoad/horse

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

MITAuto-check passedBackend & APIs

Install Horse Files Streams

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

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

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

At a glance

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

  • Works in 3 steps: File Uploads (Multipart FormData) → File Downloads & Streaming → Critical Memory Rule (Stream Ownership)
  • Tasks that involve File uploads and storage
  • SKILL.md covers 1. File Uploads (Multipart…, 2. File Downloads & Streaming and 3. Critical Memory Rule…
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Horse Files Streams is an agent skill from HashLoad/horse. Guide to handling file uploads (multipart), downloads, and stream lifetime management in the Horse framework.

Its SKILL.md is about 600 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 File uploads and storage. The repository describes itself as: Fast, opinionated, minimalist web framework for Delphi. The licence is MIT.

When your agent uses it

  • Tasks that involve File uploads and storage

Example prompts

  • “/horse-files-streams”

Workflow steps

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

  1. File Uploads (Multipart FormData)
  2. File Downloads & Streaming
  3. Critical Memory Rule (Stream Ownership)

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 Files Streams loads about 601 tokens when it runs. Until then it costs about 32 tokens; SKILL.md has 156 words of instructions outside code blocks.

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

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). 156 words, ~601 tokens.

Download SKILL.mdSave it as .claude/skills/horse-files-streams/SKILL.md (or your agent's skills folder).
name
horse-files-streams
description
Guide to handling file uploads (multipart), downloads, and stream lifetime management in the Horse framework.

Horse Files & Streams

1. File Uploads (Multipart FormData)

When clients upload files via multipart form data, you can retrieve the file as a stream or save it directly to the disk using the THorseCoreParamField helper from Req.ContentFields:

pascal
procedure UploadHandler(Req: THorseRequest; Res: THorseResponse; Next: TProc);
var
  LFileField: THorseCoreParamField;
  LStream: TStream;
begin
  // 1. Get the file field
  LFileField := Req.ContentFields.Field('file');
  
  if not Assigned(LFileField) then
    raise EHorseException.New
      .Status(THTTPStatus.BadRequest)
      .Error('No file was uploaded');

  // 2. Save it directly to disk
  LFileField.SaveToFile('C:\uploads\' + LFileField.FieldName);
  
  // 3. Or access the raw TStream
  LStream := LFileField.AsStream;
  // Note: DO NOT free LStream if it is owned by the request lifecycle.
  
  Res.Status(THTTPStatus.OK).Send('File uploaded successfully');
end;

2. File Downloads & Streaming

To send files or custom data streams to the client, use Res.SendFile or Res.Download.

  • SendFile: Sends the file stream to the client (displays inline in the browser if supported).
  • Download: Forces the browser to download the file with the specified filename.
pascal
procedure DownloadHandler(Req: THorseRequest; Res: THorseResponse; Next: TProc);
var
  LStream: TStream;
begin
  LStream := TFileStream.Create('C:\data\report.pdf', fmOpenRead or fmShareDenyWrite);
  
  // Sends the stream and instructs the client to download as "report_2026.pdf"
  Res.Status(THTTPStatus.OK).Download(LStream, 'report_2026.pdf');
  
  // CRITICAL MEMORY RULE: DO NOT FREE LStream here.
end;

3. Critical Memory Rule (Stream Ownership)

The THorseResponse object takes ownership of any stream passed into SendFile, Download, or Render.

  • Rule: NEVER call .Free or FreeAndNil on a stream after passing it to Res.SendFile, Res.Download, or Res.Render.
  • Reason: The framework will automatically destroy the stream object once the HTTP response is written to the socket. Freeing it manually in your handler will cause a Double-Free memory corruption (Access Violation) when the response lifecycle terminates.

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

Open the folder on GitHubat commit d4351a5

Compare with similar skills

Horse Files Streams 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 Files Streams compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Horse Files Streams this skillHashLoad/horse1.4k—~601Automated safety check: PassMIT
Stripe Projectsfossasia/eventyay1.7k5 repos~2kAutomated safety check: NotesApache-2.0
FoundatioFoundatioFx/Foundatio2.1k—~3.9kAutomated safety check: PassApache-2.0
Spatialduckdb/duckdb-skills6001 repos~1kAutomated safety check: NotesMIT
R Oopab604/claude-code-r-skills2062 repos~1.9kAutomated safety check: PassMIT
Edgestore Setupedgestorejs/edgestore454—~1.8kAutomated safety check: PassMIT

Similar skills

  • Stripe Projects

    fossasia/eventyay

    A skill your agent uses when the user wants to provision infrastructure or third-party services using Stripe Projects.

    1.7k GitHub starsUsed in 5 repos~2k tokens
    Backend & APIsAuto-check: notes
  • Foundatio

    FoundatioFx/Foundatio

    A skill your agent uses when working with Foundatio infrastructure abstractions for .NET -- caching, queuing, messaging, file storage, distributed locking, or background jobs.

    2.1k GitHub stars~3.9k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Spatial

    duckdb/duckdb-skills

    Official

    Answer questions about spatial data using DuckDB. An agent skill from duckdb/duckdb-skills.

    600 GitHub starsUsed in 1 repo~1k tokens
    Backend & APIsAuto-check: notes
  • R Oop

    ab604/claude-code-r-skills

    R object-oriented programming guide for S7, S3, S4, and vctrs.

    206 GitHub starsUsed in 2 repos~1.9k tokens
    Backend & APIsAuto-check passed
  • Edgestore Setup

    edgestorejs/edgestore

    A skill your agent uses when adding, extending, or troubleshooting EdgeStore file uploads, upload UI, or bucket access policies in a TypeScript/React application.

    454 GitHub stars~1.8k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • S3 Explore

    duckdb/duckdb-skills

    Official

    Explore and query data on S3, Cloudflare R2, GCS, MinIO, or any S3-compatible storage.

    600 GitHub starsUsed in 1 repo~848 tokens
    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 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 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
  • 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 Files Streams

What does Horse Files Streams do?

Guide to handling file uploads (multipart), downloads, and stream lifetime management in the Horse framework. Horse Files Streams is an agent skill from HashLoad/horse. Guide to handling file uploads (multipart), downloads, and stream lifetime management in the Horse framework.

When should I use Horse Files Streams?

Horse Files Streams fits situations like: tasks that involve File uploads and storage.

How do I install Horse Files Streams in Claude Code?

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

How do I install Horse Files Streams in Codex?

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

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

What does Horse Files Streams need to run?

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

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

Horse Files Streams 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 Files Streams use?

About 601 tokens (SKILL.md is roughly 2.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 Files Streams?

Skills that share tags, products or a category with Horse Files Streams: Stripe Projects (fossasia/eventyay, 1.7k stars), Foundatio (FoundatioFx/Foundatio, 2.1k stars), Spatial (duckdb/duckdb-skills, 600 stars) and R Oop (ab604/claude-code-r-skills, 206 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Horse Files Streams?

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.