auth

auth is a skill for Claude Code, Codex from LuuOW/meridian-mcp. It costs 24 tokens per session (1,579 once invoked), scanned A, original, MIT.

Patterns for controlling access to applications and APIs. They cover JWTs, API keys, OAuth2, Supabase Auth and role-based access control, which limits actions according to a user's role.

In plain words
What is it for?
Use them to add login and token verification, protect FastAPI endpoints, support OAuth2 or Supabase Auth, and enforce roles such as administrator or regular user.
Why use it?
They provide common ways to identify users, verify requests and restrict protected operations. This reduces the need to design authentication and permissions flows from scratch.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use them to add login and token verification, protect FastAPI endpoints, support OAuth2 or Supabase Auth, and enforce roles such as administrator or regular user.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/luuow/meridian-mcp/auth
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add LuuOW/meridian-mcp --skill auth
Clone the repo
git clone --depth 1 https://github.com/LuuOW/meridian-mcp

Made for: Claude Code, Codex.

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 auth

README.md
[![agentmods](https://agentmods.dev/badge/skills/luuow/meridian-mcp/auth.svg)](https://agentmods.dev/skills/luuow/meridian-mcp/auth)
Your own site
<a href="https://agentmods.dev/skills/luuow/meridian-mcp/auth"><img src="https://agentmods.dev/badge/skills/luuow/meridian-mcp/auth.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,579 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.00024 $0.01579
Opus 5 $0.00012 $0.00790
Sonnet 5 $0.00005 $0.00316
Haiku 4.5 $0.00002 $0.00158

Measured 7d ago against content hash a10dee70ebf0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

auth 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 7d 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.

skills/auth/SKILL.md · 208 lines

How it starts

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

auth

Authentication and authorisation patterns across the stack: JWTs, API keys, Supabase Auth, and role-based access control.

1) JWT generation and verification (Python)

from jose import jwt, JWTError
from datetime import datetime, timedelta, timezone

SECRET_KEY = os.getenv("JWT_SECRET")
ALGORITHM  = "HS256"

def create_token(user_id: str, role: str, expires_min: int = 60) -> str:
    payload = {
        "sub": user_id,
        "role": role,
        "exp": datetime.now(timezone.utc) + timedelta(minutes=expires_min),
        "iat": datetime.now(timezone.utc),
    }
    return jwt.encode(payload, SECRET_KEY, algorithm=ALGORITHM)

def verify_token(token: str) -> dict:
    try:
        return jwt.decode(token, SECRET_KEY, algorithms=[ALGORITHM])
    except JWTError as e:
        raise HTTPException(401, detail=f"Invalid token: {e}")

2) FastAPI security dependency

from fastapi import Depends, HTTPException, Security
from fastapi.security import HTTPBearer, HTTPAuthorizationCredentials

bearer = HTTPBearer()

async def get_current_user(
    creds: HTTPAuthorizationCredentials = Security(bearer),
) -> dict:
    return verify_token(creds.credentials)

async def require_admin(user: dict = Depends(get_current_user)) -> dict:
    if user.get("role") != "admin":
        raise HTTPException(403, "Admin only")
    return user

# Route usage
@router.delete("/article/{slug}", dependencies=[Depends(require_admin)])
async def delete_article(slug: str): ...

3) API key authentication

from fastapi import Header

API_KEYS = set(os.getenv("API_KEYS", "").split(","))   # comma-separated in .env

async def api_key_auth(x_api_key: str = Header(...)):
    if x_api_key not in API_KEYS:
        raise HTTPException(401, "Invalid API key")
    return x_api_key

# Rotating keys — store in Redis with expiry
async def validate_api_key(key: str) -> bool:
    return bool(await redis.get(f"apikey:{key}"))

4) Supabase Auth (server-side, Python)

Read the full file on GitHub · 208 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. 7d ago First seen · 208 lines · 24 tokens per session scan A a10dee70ebf0

Subscribe to this mod's changes

auth is a skill published in the GitHub repository LuuOW/meridian-mcp (0 stars, last pushed 3d ago), licensed MIT. It adds 24 tokens to every session and 1,579 once invoked, about $0.0001 per session on Opus 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

fastapi-guard

Production-ready security middleware for FastAPI. Use when adding IP filtering, rate limiting, per-route security decorators, route-resolution strict mode, global behavior rules, passive/log-only mode, or Guard Agent SaaS telemetry to a FastAPI app. Covers SecurityMiddleware setup, SecurityConfig tuning, and the…

rennf93/fastapi-guard · 72 tokens

identity-access-expert

Design authentication and authorisation: OAuth 2.1 and OpenID Connect, session and token handling, RBAC and ABAC, and multi-tenant access control. Use when the user mentions OAuth, OIDC, SAML, SSO, JWT, refresh tokens, PKCE, login flows, sessions, roles and permissions, RBAC or ABAC, or when the task involves securing…

personamanagmentlayer/pcl · 99 tokens

fastapi-expert

Expert-level FastAPI development for high-performance Python APIs with async support. Use when the user mentions Python, API, async, REST, OpenAPI, or Pydantic, or when the task involves FastAPI Features.

personamanagmentlayer/pcl · 49 tokens

api-security-best-practices-v2

API Security Best Practices workflow skill. Use this skill when the user needs Implement secure API design patterns including authentication, authorization, input validation, rate limiting, and protection against common API vulnerabilities and the operator should preserve the upstream workflow, copied support files…

diegosouzapw/awesome-omni-skills · 66 tokens

generate-config

Generate an openapi-mcp-gateway config.yml from scratch for an API the user names or points to. Use when the user wants to expose a REST API (GitHub, Asana, an internal service, any OpenAPI backend) as MCP tools, asks to "generate", "build", "connect", "integrate", or "wire up" an API as MCP, or needs help writing or…

mroops0111/openapi-mcp-gateway · 119 tokens

fastapi

FastAPI best practices + Pydantic. Use when building or reviewing FastAPI APIs.

martineserios/thebrana · 21 tokens