Agent skill

Horse Mvc Architecture

by HashLoad in HashLoad/horse

Guide for structuring corporate Horse applications using Clean MVC (Model-View-Controller) principles and decoupling HTTP layers from business logic.

MITAuto-check passedBackend & APIs

Install Horse Mvc Architecture

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

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

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

At a glance

Guide for structuring corporate Horse applications using Clean MVC (Model-View-Controller) principles and decoupling HTTP layers from business logic.

  • Works in 3 steps: Project Directory Structure → Decoupling Rules (The Golden Rule) → Implementation Blueprint
  • Backend & APIs work in your project
  • SKILL.md covers 1. Project Directory Structure, 2. Decoupling Rules (The… and 3. Implementation Blueprint
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Horse Mvc Architecture is an agent skill from HashLoad/horse. Guide for structuring corporate Horse applications using Clean MVC (Model-View-Controller) principles and decoupling HTTP layers from business logic.

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

When your agent uses it

  • Backend & APIs work in your project

Example prompts

  • “/horse-mvc-architecture”

Workflow steps

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

  1. Project Directory Structure
  2. Decoupling Rules (The Golden Rule)
  3. Implementation Blueprint

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 Mvc Architecture loads about 1.2k tokens when it runs. Until then it costs about 43 tokens; SKILL.md has 186 words of instructions outside code blocks.

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

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). 186 words, ~1,155 tokens.

Download SKILL.mdSave it as .claude/skills/horse-mvc-architecture/SKILL.md (or your agent's skills folder).
name
horse-mvc-architecture
description
Guide for structuring corporate Horse applications using Clean MVC (Model-View-Controller) principles and decoupling HTTP layers from business logic.

Horse MVC Architecture

For large-scale, production-ready REST APIs, avoid placing business logic inside route handlers or keeping everything in the .dpr bootstrap file. Implement a clean, decoupled MVC (Model-View-Controller) architecture.


1. Project Directory Structure

Keep your project organized by dividing concerns into dedicated directories under the src/ folder:

text
my_project/
├── my_project.dpr
└── src/
    ├── controllers/   # Mappings of HTTP endpoints to service invocations
    ├── services/      # Core business rules, validations, and orchestration
    ├── repositories/  # Database access layer (SQL execution, FireDAC queries)
    └── models/        # Entity classes and data structures (Domain)

2. Decoupling Rules (The Golden Rule)

To ensure testability and maintenance, never couple your business logic to the web framework.

  • Rule: The Service, Repository, and Model layers must never import Horse units or reference Horse objects (like THorseRequest or THorseResponse).
  • Reason: If you decide to migrate from HTTP to a CLI application or gRPC, your business services and repositories remain 100% untouched.

3. Implementation Blueprint

A. The Repository Layer (Database Access)

Retrieves and updates raw database data. It knows nothing about HTTP.

pascal
unit Repository.Customer;

interface

uses
  System.JSON, FireDAC.Comp.Client;

type
  TCustomerRepository = class
  public
    class function FindById(const AId: Integer): TJSONObject;
  end;

implementation

class function TCustomerRepository.FindById(const AId: Integer): TJSONObject;
var
  LConnection: TFDConnection;
  LQuery: TFDQuery;
begin
  Result := nil;
  LConnection := TFDConnection.Create(nil);
  LQuery := TFDQuery.Create(nil);
  try
    LConnection.ConnectionDefName := 'MyPooledDef';
    LConnection.Connected := True;
    
    LQuery.Connection := LConnection;
    LQuery.SQL.Text := 'SELECT id, name, email FROM customers WHERE id = :id';
    LQuery.ParamByName('id').AsInteger := AId;
    LQuery.Open;
    
    if not LQuery.IsEmpty then
      Result := LQuery.ToJSONObject; // Returns raw JSON entity
  finally
    LQuery.Free;
    LConnection.Free;
  end;
end;

end.
B. The Service Layer (Business Logic)

Implements business validation and orchestrates repositories.

pascal
unit Service.Customer;

interface

uses
  System.JSON;

type
  TCustomerService = class
  public
    class function GetCustomer(const AId: Integer): TJSONObject;
  end;

implementation

uses
  Repository.Customer, System.SysUtils;

class function TCustomerService.GetCustomer(const AId: Integer): TJSONObject;
begin
  if AId <= 0 then
    raise Exception.Create('Invalid Customer ID');
    
  Result := TCustomerRepository.FindById(AId);
  
  if not Assigned(Result) then
    raise Exception.Create('Customer not found');
end;

end.
C. The Controller Layer (HTTP Transport Adapter)

The ONLY layer that depends on Horse. It parses incoming requests, calls services, and formats HTTP responses.

pascal
unit Controller.Customer;

interface

uses
  Horse;

type
  TCustomerController = class
  private
    class procedure GetCustomerHandler(Req: THorseRequest; Res: THorseResponse);
  public
    class procedure RegisterRoutes;
  end;

implementation

uses
  Service.Customer, System.JSON, System.SysUtils, Horse.Commons;

class procedure TCustomerController.RegisterRoutes;
begin
  THorse.Get('/customers/:id', GetCustomerHandler);
end;

class procedure TCustomerController.GetCustomerHandler(Req: THorseRequest; Res: THorseResponse);
var
  LId: Integer;
  LCustomer: TJSONObject;
begin
  try
    LId := Req.Params.Field('id').AsInteger;
    
    // Invocate Business Service (No Horse dependencies passed!)
    LCustomer := TCustomerService.GetCustomer(LId);
    
    Res.Send(LCustomer);
  except
    on E: Exception do
      Res.Status(THTTPStatus.BadRequest).Send(TJSONObject.Create(TJSONPair.Create('error', E.Message)));
  end;
end;

end.
unit
D. The Bootstrap (.dpr)

Now, your main bootstrap file only handles middleware setup and controller registration, keeping it extremely clean:

pascal
program MyAPI;

{$APPTYPE CONSOLE}

uses
  Horse,
  Horse.Jhonson,
  Controller.Customer;

begin
  THorse.Use(Jhonson);

  // Register all Controller routes
  TCustomerController.RegisterRoutes;

  THorse.Listen(9000);
end.

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

Open the folder on GitHubat commit d4351a5

Compare with similar skills

Horse Mvc Architecture 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 Mvc Architecture compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Horse Mvc Architecture this skillHashLoad/horse1.4k—~1.2kAutomated safety check: PassMIT
Configuring Horizoncoollabsio/coolify63k4 repos~898Automated safety check: PassMIT
Nestjs Best Practicesrolling-scopes/rsschool-app10k6 repos~1.2kAutomated safety check: PassMIT
Sub2API AdminWei-Shaw/sub2api44k1 repos~717Automated safety check: PassLGPL-3.0
Firecrawl Build Onboardingfirecrawl/firecrawl190k1 repos~1.4kAutomated safety check: NotesISC
Obsidian BasesAtmosphere/atmosphere3.8k22 repos~3.2kAutomated safety check: PassApache-2.0

Similar skills

  • Configuring Horizon

    coollabsio/coolify

    A skill your agent uses whenever the user mentions Horizon by name in a Laravel context.

    63k GitHub starsUsed in 4 repos~898 tokens
    Backend & APIsAuto-check passed
  • Nestjs Best Practices

    rolling-scopes/rsschool-app

    NestJS best practices and architecture patterns for building production-ready applications.

    10k GitHub starsUsed in 6 repos~1.2k tokens
    Backend & APIsAuto-check passed
  • Sub2API Admin

    Wei-Shaw/sub2api

    Manages a Sub2API deployment from the command line: accounts, redeem and invitation codes, groups, proxies, imports, exports and raw admin API calls.

    44k GitHub starsUsed in 1 repo~717 tokens
    Backend & APIsAuto-check passed
  • Firecrawl Build Onboarding

    firecrawl/firecrawl

    Gets Firecrawl working in a project: signs you in through the browser, saves FIRECRAWL_API_KEY to .env and picks the first SDK or REST path.

    190k GitHub starsUsed in 1 repo~1.4k tokens
    Backend & APIsAuto-check: notes
  • Obsidian Bases

    Atmosphere/atmosphere

    Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries.

    3.8k GitHub starsUsed in 22 repos~3.2k tokens
    Backend & APIsAuto-check passed
  • Fortify Development

    coollabsio/coolify

    ACTIVATE when the user works on authentication in Laravel. An agent skill from coollabsio/coolify.

    63k GitHub starsUsed in 4 repos~1.9k tokens
    Backend & APIsAuto-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 3 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 3 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 3 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 3 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 3 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 3 days ago
    Auto-check passed

Categories

Questions about Horse Mvc Architecture

What does Horse Mvc Architecture do?

Guide for structuring corporate Horse applications using Clean MVC (Model-View-Controller) principles and decoupling HTTP layers from business logic. Horse Mvc Architecture is an agent skill from HashLoad/horse. Guide for structuring corporate Horse applications using Clean MVC (Model-View-Controller) principles and decoupling HTTP layers from business logic.

When should I use Horse Mvc Architecture?

Horse Mvc Architecture fits situations like: backend & APIs work in your project.

How do I install Horse Mvc Architecture in Claude Code?

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

How do I install Horse Mvc Architecture in Codex?

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

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

What does Horse Mvc Architecture need to run?

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

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

Horse Mvc Architecture 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 Mvc Architecture use?

About 1.2k tokens (SKILL.md is roughly 4.6k 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 Mvc Architecture?

Skills that share tags, products or a category with Horse Mvc Architecture: Configuring Horizon (coollabsio/coolify, 63k stars), Nestjs Best Practices (rolling-scopes/rsschool-app, 10k stars), Sub2API Admin (Wei-Shaw/sub2api, 44k stars) and Firecrawl Build Onboarding (firecrawl/firecrawl, 190k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Horse Mvc Architecture?

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