Configuring Horizon
coollabsio/coolify
A skill your agent uses whenever the user mentions Horizon by name in a Laravel context.
Detailed documentation of the 4 authentication systems, token lifecycle, middleware pipeline, session management, and RBAC authorization.
$ npx skills add gjovanovicst/golang-auth-api --skill auth-flows -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install gjovanovicst/golang-auth-api auth-flows --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/gjovanovicst/golang-auth-api.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.opencode/skills/auth-flows .claude/skills/auth-flows && rm -rf skills-srcUse ~/.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/
Install the "auth-flows" agent skill from https://github.com/gjovanovicst/golang-auth-api/tree/main/.opencode/skills/auth-flows into .claude/skills/auth-flows/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "auth-flows", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/gjovanovicst/golang-auth-api/tree/main/.opencode/skills/auth-flowsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add gjovanovicst/golang-auth-api --skill auth-flows -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install gjovanovicst/golang-auth-api auth-flows --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/gjovanovicst/golang-auth-api.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.opencode/skills/auth-flows .agents/skills/auth-flows && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "auth-flows" agent skill from https://github.com/gjovanovicst/golang-auth-api/tree/main/.opencode/skills/auth-flows into .agents/skills/auth-flows/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "auth-flows", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add gjovanovicst/golang-auth-api --skill auth-flows -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install gjovanovicst/golang-auth-api auth-flows --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/gjovanovicst/golang-auth-api.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.opencode/skills/auth-flows .cursor/skills/auth-flows && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "auth-flows" agent skill from https://github.com/gjovanovicst/golang-auth-api/tree/main/.opencode/skills/auth-flows into .cursor/skills/auth-flows/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "auth-flows", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/gjovanovicst/golang-auth-api.git --path .opencode/skills/auth-flows--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add gjovanovicst/golang-auth-api --skill auth-flows -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install gjovanovicst/golang-auth-api auth-flows --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/gjovanovicst/golang-auth-api.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.opencode/skills/auth-flows .gemini/skills/auth-flows && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "auth-flows" agent skill from https://github.com/gjovanovicst/golang-auth-api/tree/main/.opencode/skills/auth-flows into .gemini/skills/auth-flows/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "auth-flows", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install gjovanovicst/golang-auth-api auth-flowsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add gjovanovicst/golang-auth-api --skill auth-flows -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/gjovanovicst/golang-auth-api.git skills-src && mkdir -p .github/skills && cp -r skills-src/.opencode/skills/auth-flows .github/skills/auth-flows && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "auth-flows" agent skill from https://github.com/gjovanovicst/golang-auth-api/tree/main/.opencode/skills/auth-flows into .github/skills/auth-flows/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "auth-flows", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add gjovanovicst/golang-auth-api --skill auth-flows -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install gjovanovicst/golang-auth-api auth-flows --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/gjovanovicst/golang-auth-api.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.opencode/skills/auth-flows .opencode/skills/auth-flows && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "auth-flows" agent skill from https://github.com/gjovanovicst/golang-auth-api/tree/main/.opencode/skills/auth-flows into .opencode/skills/auth-flows/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "auth-flows", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
auth-flowsDetailed documentation of the 4 authentication systems, token lifecycle, middleware pipeline, session management, and RBAC authorization.
Auth Flows is an agent skill from gjovanovicst/golang-auth-api. Detailed documentation of the 4 authentication systems, token lifecycle, middleware pipeline, session management, and RBAC authorization.
Its SKILL.md is about 2.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, covering Authentication and Authorization and RBAC. It works with Redis. The repository describes itself as: A modern, production-ready Go REST API for authentication and authorization, featuring social login, email verification, JWT, and Redis integration. The licence is MIT.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 795d18d. It shows what the files ask for, not the result of running them.
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.
No scripts in the folder and no shell commands in SKILL.md (its code samples are go).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
ADMIN_API_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Auth Flows loads about 2.2k tokens when it runs. Until then it costs about 37 tokens; SKILL.md has 405 words of instructions outside code blocks.
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.
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.
The full file from gjovanovicst/golang-auth-api at commit 795d18d, republished under its MIT licence (© gjovanovicst). 405 words, ~2,189 tokens.
.claude/skills/auth-flows/SKILL.md (or your agent's skills folder).The project has 4 independent authentication systems:
| System | Mechanism | Middleware File | Context Keys Set |
|---|---|---|---|
| User JWT | Bearer token | internal/middleware/auth.go | userID, appID, roles, sessionID |
| Admin API Key | Static env + DB keys | internal/middleware/admin_auth.go | auth_type = "admin" |
| App API Key | DB-backed per-app keys | internal/middleware/app_api_key.go | auth_type = "app" |
| Admin GUI Session | HTTP-only cookie + Redis | internal/middleware/gui_auth.go | admin_id, admin_username, admin_session_id |
Access Token:
ACCESS_TOKEN_EXPIRATION_MINUTES)AuthMiddleware() on every protected requestRefresh Token:
REFRESH_TOKEN_EXPIRATION_HOURS)POST /refresh-token to get a new access+refresh pairToken Blacklisting (Redis):
internal/middleware/auth.go)1. Extract "Authorization" header, strip "Bearer " prefix
2. Parse JWT via jwt.ParseToken()
3. Reject if TokenType is "refresh" (prevents refresh token misuse)
4. Check Redis: is this specific access token blacklisted?
5. Check Redis: are ALL tokens for this user blacklisted?
6. If claims.SessionID exists: check session still exists in Redis
7. Set context: userID, appID, roles, sessionID1. POST /login with email + password
2. userHandler.Login -> userService.Login
3. Verify password with bcrypt
4. Check if 2FA is enabled for user
- If YES: return temp 2FA token, require POST /2fa/login-verify
- If NO: generate access+refresh tokens, create session, return tokens
5. On success: activity log "USER_LOGIN"1. User logs in, gets temp 2FA token
2. POST /2fa/login-verify with temp token + code (TOTP/email/recovery)
OR POST /2fa/passkey/begin + /finish for passkey 2FA
3. Verify code against:
- TOTP: pquerna/otp library validation
- Email: 6-digit code stored in Redis (10 min TTL)
- Recovery: bcrypt-hashed codes stored in user record
- Passkey: WebAuthn assertion ceremony
4. On success: generate real access+refresh tokens, create session1. GET /auth/{provider}/login -> redirect to OAuth provider
2. Provider redirects to GET /auth/{provider}/callback
3. Exchange code for tokens, fetch user profile
4. Find or create user (match by provider+provider_user_id+app_id)
5. Generate access+refresh tokens, create session
6. If 2FA enabled: same 2FA flow as above1. POST /magic-link/request with email
2. Generate single-use token, store in Redis (10 min TTL)
3. Send email with magic link URL
4. POST /magic-link/verify with token
5. Validate token from Redis, delete after use
6. Generate access+refresh tokens, create session1. POST /passkey/login/begin -> return WebAuthn challenge
2. Client performs assertion with authenticator
3. POST /passkey/login/finish with assertion response
4. Validate credential, look up user
5. Generate access+refresh tokens, create sessioninternal/middleware/admin_auth.go)1. Read X-Admin-API-Key header
2. Fast path: compare against ADMIN_API_KEY env var (constant-time)
3. Fallback: SHA-256 hash the key, look up in api_keys table
- Validate key_type == "admin"
- Async update last_used_at
4. Set context: auth_type = "admin"ak_ + 24 random bytes base64-encodedinternal/admin/apikey_util.gointernal/middleware/app_api_key.go)1. Read X-App-API-Key header
2. Read app_id from context (set by AppIDMiddleware)
3. SHA-256 hash the key, look up in api_keys table
4. Validate key_type == "app"
5. Validate key.AppID matches context app_id (cross-app prevention)
6. Async update last_used_at
7. Set context: auth_type = "app"internal/middleware/app_route_guard.go)Additional guard that ensures the :id URL parameter matches the X-App-ID header, preventing URL manipulation attacks on /app/:id/* routes.
internal/middleware/gui_auth.go)1. Read "admin_session" cookie
2. Call sessionValidator.ValidateSession(sessionID) -> *AdminAccount
3. If invalid: clear cookie, redirect to /gui/login
4. Set context: admin_id, admin_username, admin_session_id1. POST /gui/login with username + password
2. accountService.Authenticate(username, password) via bcrypt
3. If 2FA enabled:
- Create pending 2FA session in Redis
- Redirect to /gui/2fa-verify
- POST /gui/2fa-verify with code
- Promote pending session to full session
4. If no 2FA:
- Create full session in Redis
- Set admin_session cookie (HttpOnly, SameSite=Strict, Secure)internal/middleware/csrf.go)Safe methods (GET/HEAD/OPTIONS):
-> Generate CSRF token, store in context for template rendering
State-changing methods (POST/PUT/DELETE):
-> Read token from X-CSRF-Token header (HTMX) OR _csrf form field
-> Validate against session's stored token
-> 403 on mismatchPermissions are resource:action pairs (e.g., user:read, settings:write).
internal/middleware/auth.go)1. Read userID and appID from context
2. Call rbacService.HasPermission(appID, userID, resource, action)
3. RBAC service checks Redis cache first, then DB
4. Cache key: rbac:{appID}:{userID}
5. Cache TTL: matches access token TTL
6. Returns 403 on failure| Role | Permissions |
|---|---|
| admin | All permissions |
| member | Read + limited write |
| viewer | Read-only |
user, settings, log -- used with actions read, write, delete.
internal/session/service.go)Redis storage:
session:{appID}:{sessionID} -- hash with user_id, refresh_token, ip, user_agent, created_at, last_activeuser_sessions:{appID}:{userID} -- set of session IDsLifecycle:
internal/redis/redis.go)blacklist:access:{tokenHash} -- individual token blacklist (TTL = remaining token life)blacklist:user:{userID} -- user-wide blacklist (TTL = access token TTL)internal/middleware/app_id.go)1. Skip for /swagger, /admin, /gui paths
2. Read X-App-ID header
3. Fallback: app_id query parameter
4. Skip for /auth/*/callback (OAuth state carries app_id)
5. Parse as UUID, set in context
Default: 00000000-0000-0000-0000-000000000001web/context_keys.go)type SessionValidator interface {
ValidateSession(sessionID string) (*models.AdminAccount, error)
GenerateCSRFToken(sessionID string) (string, error)
ValidateCSRFToken(sessionID, token string) bool
}
type ApiKeyValidator interface {
FindActiveKeyByHash(keyHash string) (*models.ApiKey, error)
UpdateApiKeyLastUsed(id uuid.UUID)
}Load this skill when working on authentication, authorization, middleware, token handling, session management, or any security-related feature.
© gjovanovicst, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .opencode/skills/auth-flows of gjovanovicst/golang-auth-api.
Open the folder on GitHubat commit 795d18d
Auth Flows 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Auth Flows this skillgjovanovicst/golang-auth-api | 130 | — | ~2.2k | Automated safety check: Pass | MIT | |
| Configuring Horizoncoollabsio/coolify | 63k | 4 repos | ~898 | Automated safety check: Pass | MIT | |
| Cognitoitsmostafa/aws-agent-skills | 1.2k | 1 repos | ~2.3k | Automated safety check: Pass | MIT | |
| Auth Implementation Patternsynulihao/AgentSkillOS | 617 | 10 repos | ~4.4k | Automated safety check: Pass | None | |
| Pulse DevelopmentMineTrax/minetrax | 115 | 1 repos | ~1.7k | Automated safety check: Pass | MIT | |
| Configuration Cryptogreenpau/caddy-security | 2.3k | — | ~3.5k | Automated safety check: Pass | Apache-2.0 |
coollabsio/coolify
A skill your agent uses whenever the user mentions Horizon by name in a Laravel context.
itsmostafa/aws-agent-skills
AWS Cognito user authentication and authorization service. An agent skill from itsmostafa/aws-agent-skills.
ynulihao/AgentSkillOS
Master authentication and authorization patterns including JWT, OAuth2, session management, and RBAC to build secure, scalable access control systems.
MineTrax/minetrax
Handles Laravel Pulse setup, configuration, and custom card development.
greenpau/caddy-security
Configure portal/policy JWT keys, token names and lifetimes, key loading and generation, public-key discovery, and System API encryption keys.
supercheck-io/supercheck
Work on Supercheck authentication, RBAC, tenant isolation, sessions, API and trigger keys, invitations, project membership, project variables, OAuth, super-admin behavior, SSRF, or…
gjovanovicst/golang-auth-api
Documentation of the HTMX admin GUI including template rendering, session management, CRUD patterns, and the GUIHandler structure.
gjovanovicst/golang-auth-api
All 17 GORM database models with fields, relationships, indexes, and the entity relationship diagram for the Auth API.
gjovanovicst/golang-auth-api
Complete documentation of the email subsystem including template resolution, variable pipeline, rendering engines, SMTP config, and default templates.
gjovanovicst/golang-auth-api
Complete module inventory of the Auth API project with file paths, dependencies, and architecture overview.
gjovanovicst/golang-auth-api
Complete HTTP route structure with auth layers, middleware chains, rate limiting, and handler mappings for all API and GUI endpoints.
Works with
Categories
Detailed documentation of the 4 authentication systems, token lifecycle, middleware pipeline, session management, and RBAC authorization. Auth Flows is an agent skill from gjovanovicst/golang-auth-api. Detailed documentation of the 4 authentication systems, token lifecycle, middleware pipeline, session management, and RBAC authorization.
Auth Flows fits situations like: tasks that involve Authentication; tasks that involve Authorization and RBAC.
Run `npx skills add gjovanovicst/golang-auth-api --skill auth-flows -a claude-code`. Or copy the skill folder (.opencode/skills/auth-flows in gjovanovicst/golang-auth-api) into .claude/skills/auth-flows in your project. Claude Code loads it when a task matches its description.
Run `npx skills add gjovanovicst/golang-auth-api --skill auth-flows -a codex`. Or copy the skill folder (.opencode/skills/auth-flows in gjovanovicst/golang-auth-api) into .agents/skills/auth-flows in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add gjovanovicst/golang-auth-api --skill auth-flows -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/auth-flows, .gemini/skills/auth-flows, .github/skills/auth-flows and .opencode/skills/auth-flows in your project.
Going by SKILL.md and its folder, Auth Flows needs credentials named ADMIN_API_KEY. Our summary lists: A credential in ADMIN_API_KEY.
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.
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.
Auth Flows is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.2k tokens (SKILL.md is roughly 8.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Auth Flows: Configuring Horizon (coollabsio/coolify, 63k stars), Cognito (itsmostafa/aws-agent-skills, 1.2k stars), Auth Implementation Patterns (ynulihao/AgentSkillOS, 617 stars) and Pulse Development (MineTrax/minetrax, 115 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
gjovanovicst (a GitHub user) maintains it in gjovanovicst/golang-auth-api, which has 130 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on July 30, 2026.
Source: gjovanovicst/golang-auth-api on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.