repoforge: Skill for Claude Code

.claude/skills/backend/auth/SKILL.md

add-auth-routes is a skill for Claude Code from JNZader/repoforge. It costs 31 tokens per session (2,325 once invoked), scanned A, original, MIT.

A guide for adding authentication routes to a FastAPI server, including GitHub login and validation of JWT tokens. JWTs are signed tokens used to confirm that a request belongs to an authenticated user.

In plain words
What is it for?
Use it when adding login endpoints, connecting GitHub OAuth callbacks, validating tokens, or securing FastAPI routes.
Why use it?
It shows how to let users sign in and how to protect server routes that require a valid user.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is JNZader/repoforge's own configuration. It tells Claude Code how to work on repoforge 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 repoforge configures →

Reuse

Borrowing it

Nothing to install: this file belongs to JNZader/repoforge. 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/JNZader/repoforge/main/.claude/skills/backend/auth/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/JNZader/repoforge

Made for: Claude Code.

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 add-auth-routes

README.md
[![agentmods](https://agentmods.dev/badge/skills/jnzader/repoforge/auth/github.svg)](https://agentmods.dev/skills/jnzader/repoforge/auth)
Your own site
<a href="https://agentmods.dev/skills/jnzader/repoforge/auth"><img src="https://agentmods.dev/badge/skills/jnzader/repoforge/auth/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 add-auth-routes

Your own site · 80×15
<a href="https://agentmods.dev/skills/jnzader/repoforge/auth"><img src="https://agentmods.dev/badge/skills/jnzader/repoforge/auth.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,325 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.
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.00031 $0.02325
Opus 5.5 $0.00012 $0.00930
Sonnet 5.5 $0.00006 $0.00465
Haiku 4.5 $0.00003 $0.00232

Measured 2mo ago against content hash 0e6cdd7f4f44, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

add-auth-routes 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 2mo 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.

.claude/skills/backend/auth/SKILL.md · 977 lines

How it starts

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

add-a-t, 1-11.1111.11.1.1.1ant 1111.111.111.111.111.">Return to home.

Quick Reference

Task Pattern
login login(request)
validate_token validate_token(request, current_user)
logout logout(request, current_user)

Critical Patterns (Summary)

  • login: Handles GitHub OAuth initiation with OAuth2 flow
  • validate_token: Validates JWT and retrieves current user

Critical Patterns (Detailed)

login

Handles GitHub OAuth initiation. Redirects to GitHub's OAuth authorization page with required scopes.

// Real code using actual exported names from this module
from fastapi import Request
from fastapi.responses import RedirectResponse

async def login(request: Request) -> RedirectResponse:
    return RedirectResponse(url="/auth/github")

validate_token

Validates JWT token and retrieves the current authenticated user from the session.

// Real code using actual exported names from this module
from fastapi import Request
from typing import CurrentUser

async def validate_token(request: Request, current_user: CurrentUser) -> AuthValidateResponse:
    if not current_user:
        return {"valid": False, "detail": "Not authenticated"}
    return {"valid": True, "user": current_user}

When to Use

  • GitHub OAuth login flow initiation
  • JWT token validation for protected endpoints
  • User logout cleanup

Commands

# Start the server with auth routes
docker compose up -d
# Apply database migrations for auth tables
python -m alembic upgrade head

Anti-Patterns

Don't: reuse JWT across requests without validation

<Why it the anti-pattern is wrong — one sentence.> Storing raw JWT tokens in client-side storage without server-side validation allows token tampering and replay attacks.

// BAD
// Storing raw token without validation
token = request.cookies.get("jwt")
#on The1s on on, we., on, on, and test, on, 1,o, 
 
1. 1., 
t, ,u, 
n,,u,,u,,u,,u,,u, ,  (This,u,,u,,u, ,,n, ,,u,  (nil, ,u,,u, ,,u, ,,u,,u,  ,,n,,,u,,u, ,,,u, ,, ,,u,,,u,,u, ,,,u, ,,,u,,,u, ,,,,,,u,,,u, ,, , , ( (1,,u, , ,,u,  (,,u,,u,  (,,u, ,,u,,u,, 1, ,,,,u, ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,-,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, (,  , 1,  ,, 
-, 
,  , ,,  ,  1, ,,  ,  1,,  1, ,  1,,  1,  1, 
 ,  ,,  1,,  
 , 
 , 
, 
,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 
 
n. 
 
n. 
 
n. 
 
n. 
 
n. 
 
n. 
 
n. 
 
n. 
 
n. 
 
n. 
 
n. 
 
n. 
 
n. 
 
n. 
 
n. 
 
n. 
 
n. 
 
n. 
 
n. 
 
n. 
 
n. 
 
n. 
 
n. 
 
n. 
 
n. 
 
n. 
 

Read the full file on GitHub · 977 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. 2mo ago Changed · +872 lines · +2 tokens per session 0e6cdd7f4f44
  2. 2mo ago Changed · +15 lines · +3 tokens per session 98d3037dce90
  3. 3mo ago First seen · 90 lines · 26 tokens per session scan A c7a5fd360c5a

Subscribe to this mod's changes

add-auth-routes is a skill published in the GitHub repository JNZader/repoforge (4 stars, last pushed 2mo ago), licensed MIT. It adds 31 tokens to every session and 2,325 once invoked, about $0.0001 per session on Opus 5.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-31.

Related

add-auth-routes compared with skills from other repositories

add-auth-routes next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
add-auth-routesJNZader/repoforgeSkill42mo agoMITA31Claude Code
groq-inferencesynthetic-sciences/openscienceSkill4.5kyesterdayApache-2.0A77Claude Code, Codex
bun-file-iosynthetic-sciences/openscienceSkill4.5kyesterdayApache-2.0A49Claude Code, Codex
protocolsio-integrationsynthetic-sciences/openscienceSkill4.5kyesterdayApache-2.0B85Claude Code, Codex
opensrcvercel-labs/opensrcSkill3.0k2mo agoApache-2.0A103Claude Code
arkcli-infer-endpointvolcengine/ark-cliSkill1583d agoApache-2.0A443Claude Code, Codex
arkcli-api-explorervolcengine/ark-cliSkill1583d agoApache-2.0A42Claude Code, Codex