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 24d 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 24d 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. 24d ago Changed · +872 lines · +2 tokens per session 0e6cdd7f4f44
  2. 25d ago Changed · +15 lines · +3 tokens per session 98d3037dce90
  3. 1mo 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 (5 stars, last pushed 24d 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

Other skills, from other repositories

groq-inference

Ultra-fast LLM inference on custom LPU hardware. OpenAI-compatible API at api.groq.com. Lowest latency in the industry (500-1000+ tok/s). Supports chat completions, vision, audio (Whisper STT + TTS), tool calling, JSON mode, and streaming. Free tier available. Inference only — no training.

synthetic-sciences/openscience · 77 tokens

opensrc

Fetch dependency source code to give AI agents deeper implementation context. Use when the agent needs to understand how a library works internally, read source code for a package, fetch implementation details for a dependency, or explore how an npm/PyPI/crates.io package is built. Triggers include "fetch source for"…

vercel-labs/opensrc · 103 tokens

bun-file-io

Use this when you are working on file operations like reading, writing, scanning, or deleting files. It summarizes the preferred file APIs and patterns used in this repo. It also notes when to use filesystem helpers for directories.

synthetic-sciences/openscience · 49 tokens

protocolsio-integration

Integration with protocols.io API for managing scientific protocols. This skill should be used when working with protocols.io to search, create, update, or publish protocols; manage protocol steps and materials; handle discussions and comments; organize workspaces; upload and manage files; or integrate protocols.io…

synthetic-sciences/openscience · 85 tokens

arkcli-infer-endpoint

A manager for inference endpoints, the online addresses used to send requests to deployed AI models. It can work with endpoints created by the current SSO sub-user, which is a separately identified account user.

volcengine/ark-cli · 258 tokens

arkcli-api-explorer

Inspect or invoke locally registered ArkCLI actions when product commands cannot cover a task. Use for registry errors or exact raw payloads. Not for public API catalogs or OpenAPI schemas.

volcengine/ark-cli · 42 tokens