horse: Skill for Claude Code

.agents/skills/horse-advanced-routing/SKILL.md

horse-advanced-routing is a skill for Claude Code, Codex from HashLoad/horse. It costs 25 tokens per session (503 once invoked), scanned A, original, MIT.

A development guide for regular-expression constraints and optional parameters in the Horse web framework. Regular expressions are patterns used to validate text, and route parameters are values captured from URL paths.

In plain words
What is it for?
Use it to add or debug optional URL parameters and pattern-based route constraints while following Horse's routing and cleanup rules.
Why use it?
It helps keep routing behavior correct across supported compilers and preserves compatibility with older route syntax.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is HashLoad/horse's own configuration. It tells Claude Code and Codex how to work on horse itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything horse configures →

About the project

Horse is a lightweight web framework for Delphi and Lazarus programs, providing tools for building HTTP servers and APIs. It is for developers who need routing, request handling, middleware, streaming, WebSockets, and related server features in those languages. Its catalogue skills support working with the framework.

HashLoad/horse · 1,373 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to HashLoad/horse. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/HashLoad/horse/master/.agents/skills/horse-advanced-routing/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/HashLoad/horse

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for horse-advanced-routing

README.md
[![agentmods](https://agentmods.dev/badge/skills/hashload/horse/horse-advanced-routing/github.svg)](https://agentmods.dev/skills/hashload/horse/horse-advanced-routing)
Your own site
<a href="https://agentmods.dev/skills/hashload/horse/horse-advanced-routing"><img src="https://agentmods.dev/badge/skills/hashload/horse/horse-advanced-routing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for horse-advanced-routing

Your own site · 80×15
<a href="https://agentmods.dev/skills/hashload/horse/horse-advanced-routing"><img src="https://agentmods.dev/badge/skills/hashload/horse/horse-advanced-routing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 503 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00025 $0.00503
Opus 5 $0.00013 $0.00251
Sonnet 5 $0.00005 $0.00101
Haiku 4.5 $0.00003 $0.00050

Measured 10d ago against content hash 9d56a43eb5a4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

horse-advanced-routing 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 10d 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.

.agents/skills/horse-advanced-routing/SKILL.md · 42 lines

How it starts

The opening of the file, as written. The whole thing — 42 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Horse Advanced Routing Skill

This skill guides AI agents in maintaining, expanding, and debugging Advanced Routing features (Regular Expression constraints and Optional path parameters) within the Horse framework.

💡 Syntax Reference

  • Optional parameters: :paramName?
    • Example: /users/:id?
  • Regex constraints: :paramName(regexPattern)
    • Example: /users/:id(\d+)
  • Legacy segment Regex: (regexPattern) (Keep for backwards compatibility only)
    • Example: /users/(\d+)

⚙️ Architecture and Execution Flow

1. Regex Helper (src/Horse.Core.Regex.pas)

Always use the unified THorseRegex abstraction. Do NOT import System.RegularExpressions (Delphi) or RegExpr (FPC) directly in routers to prevent cross-compilation breaks.

  • Use THorseRegex.Create(APattern) to instantiate.
  • Use THorseRegex.Match(AContent) which returns Boolean indicating if the exact string matches the pattern.
  • Always free the regex matcher instance inside the node destructions (TRadixNode.Destroy / THorseRouterTree.Destroy).

2. Parameter Injection

When a path segment matches a route parameter, always ensure it is registered in THorseRequest.Params even if optional and empty:

  • Optional parameter missing → Params.Items['param'] = ''.
  • Ensure backtracking logic in CallNextPath (Tree) and FindNode (Radix) clears parameters during path rejection to prevent parameters from bleeding into other matched paths.

3. Route Precedence

When routing, the engines prioritize matches as follows:

  1. Exact static segment matches (/users/new)
  2. Regular expression matched parameters (/users/:id(\d+))
  3. Optional or general parameters (/users/:id?)

🧪 Testing Guidelines

  • Always write integration tests in tests/src/tests/Tests.Integration.AdvancedRouting.pas verifying both THorseRadixRouter and THorseRouterTree.
  • Test real network calls with System.Net.HttpClient to confirm full transport compatibility.
  • Ensure ports are freed properly during TearDown using the ClearGlobalState helper.

Read the full file on GitHub · 42 lines

Changes

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.

  1. 10d ago First seen · 42 lines · 25 tokens per session scan A 9d56a43eb5a4

Subscribe to this mod's changes

horse-advanced-routing is a skill published in the GitHub repository HashLoad/horse (1,373 stars, last pushed today), licensed MIT. It adds 25 tokens to every session and 503 once invoked, about $0.0001 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.