hashload/horse/horse-security-auth
Claude Code and agent skill by hashload/horse
- community
Checking that the SKILL.md file is still in the repository.
Guide for securing routes, configuring JWT and Basic-Auth middlewares, and handling route authentication groups.
Install
npx vskill@latest install hashload/horse/horse-security-authSKILL.md
The same SKILL.md was published earlier as hashload/horse/horse-security-auth.
Horse Security & Authentication
1. Organizing Public and Protected Routes
Always separate public endpoints (e.g., authentication, login, system health) from protected ones. Use THorse.Group to configure middleware layers specifically for protected routes without affecting public endpoints:
2. Setting Up JWT (JSON Web Token) Authentication
The official JWT middleware is `horse-jwt`.
Acquiring Token Payload in Handlers
Once HorseJWT authenticates the request, it decodes the payload and stores it in the Session property of THorseRequest. You can retrieve claims using the Session dictionary:
3. Setting Up Basic Authentication
For quick, credential-based authentication, use the official `horse-basic-auth` middleware:
4. Security Best Practices
- Secret Management: Never hardcode encryption keys directly in the source code. Always pull them from Environment Variables or external configurations (e.g.,
GetEnvironmentVariable('JWT_SECRET_KEY')). - JWT Lifetime: Set short expiration times (
expclaim) on issued JWTs and implement a refresh token pattern for long-running client sessions. - Transport Security: Never transmit JWTs or credentials over HTTP. Always enforce HTTPS (SSL/TLS) in production environments.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingdoc/skills/horse-security-auth/SKILL.md
Popularity
- Repository stars
- 1,368
- Repository forks
- 244
- 7-day trend score
- 36
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/hashload/horse/horse-security-auth)