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.
npx agentmods add skills/hashload/horse/horse-database-poolingnpx skills add HashLoad/horse --skill horse-database-poolinggit clone --depth 1 https://github.com/HashLoad/horseWrote 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.
[](https://agentmods.dev/skills/hashload/horse/horse-database-pooling)<a href="https://agentmods.dev/skills/hashload/horse/horse-database-pooling"><img src="https://agentmods.dev/badge/skills/hashload/horse/horse-database-pooling.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00030 | $0.01301 |
| Opus 5 | $0.00015 | $0.00651 |
| Sonnet 5 | $0.00006 | $0.00260 |
| Haiku 4.5 | $0.00003 | $0.00130 |
Grade A, and why
horse-database-pooling 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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 157 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Horse Database Pooling
1. The Multithreaded Database Rule
Horse handles each incoming HTTP request in a separate thread. Therefore, sharing a single database connection components (like a global TFDConnection or query component placed on a global DataModule/Controller) across requests will cause race conditions, data corruption, and Access Violations.
- Rule: Every route handler thread must instantiate its own database connection (or request one from a thread-safe connection pool) and free it immediately after use.
2. Setting Up FireDAC Connection Pooling
FireDAC provides built-in, highly optimized connection pooling. To configure and use it:
Phase A: Defining the Connection Definition (Global Setup)
Configure the connection definition globally in your application bootstrap (program block or startup class) using TFDManager:
uses
FireDAC.Stan.Intf, FireDAC.Phys.PG, FireDAC.Comp.Client;
procedure SetupConnectionPool;
var
LParams: TStrings;
begin
LParams := TStringList.Create;
try
LParams.Values['DriverID'] := 'PG'; // PostgreSQL example
LParams.Values['Server'] := 'localhost';
LParams.Values['Database'] := 'my_db';
LParams.Values['User_Name'] := 'postgres';
LParams.Values['Password'] := 'secret';
LParams.Values['Pooled'] := 'True'; // CRITICAL: Enables pooling
LParams.Values['POOL_MaximumItems'] := '50'; // Set maximum connections in pool
// Register the definition with FDManager
FDManager.AddConnectionDef('MyPooledPGDef', 'PG', LParams);
finally
LParams.Free;
end;
end;
Phase B: Acquiring and Releasing Connections in Handlers
In your route handlers, instantiate the TFDConnection locally, referencing the pooled definition name. Always protect resources with try...finally:
procedure GetUsersHandler(Req: THorseRequest; Res: THorseResponse; Next: TProc);
var
LConnection: TFDConnection;
LQuery: TFDQuery;
begin
LConnection := TFDConnection.Create(nil);
LQuery := TFDQuery.Create(nil);
try
// Reference the pooled definition - this will instantly pull a connection from the pool
LConnection.ConnectionDefName := 'MyPooledPGDef';
LConnection.Connected := True;
LQuery.Connection := LConnection;
LQuery.SQL.Text := 'SELECT id, name FROM users';
LQuery.Open;
// Johnson middleware takes ownership of the JSON object/array
Res.Send(LQuery.ToJSONArray);
finally
LQuery.Free;
LConnection.Free; // Automatically releases connection back to the pool
end;
end;
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.
- 4d ago First seen · 157 lines · 30 tokens per session scan A eb5e6f86738f
horse-database-pooling is a skill published in the GitHub repository HashLoad/horse (1,371 stars, last pushed 2d ago), licensed MIT. It adds 30 tokens to every session and 1,301 once invoked, about $0.0002 per session on Opus 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.
Other skills, from other repositories
api-design-patterns
Comprehensive API design patterns covering REST, GraphQL, gRPC, versioning, authentication, and modern API best practices.
plain-optimize
Captures and analyzes performance traces to identify slow queries and N+1 problems. Use when a page is slow, there are too many queries, or the user asks about performance.
plain-postgres-doctor
Check overall database health — schema correctness and operational health. Use when asked to check the database, validate schema, optimize indexes, or diagnose Postgres problems.
airtable
Airtable base management — records, views, and formulas via REST API.
context7
Retrieves up-to-date documentation, API references, and code examples for any developer technology. Use this skill whenever the user asks about a specific library, framework, SDK, CLI tool, or cloud service -- even for well-known ones like React, Next.js, Prisma, Express, Tailwind, Django, or Spring Boot. Your…
api-design-patterns
Comprehensive API design patterns covering REST, GraphQL, gRPC, versioning, authentication, and modern API best practices.