security-authn-authz

security-authn-authz is a skill for Claude Code from contactandrewchl-wq/turtle-mcp. It costs 62 tokens per session (1,145 once invoked), scanned A, original, MIT.

A guide to user authentication and authorization: checking who a user is and deciding what that user may do. It covers passwords, sessions, tokens, OAuth2/OIDC, multi-factor authentication, and permission models.

In plain words
What is it for?
Implementing registration, login, logout, password resets, multi-factor authentication, sessions, tokens, role-based access, and other permission checks.
Why use it?
It helps keep login and access-control systems separate and apply safer patterns for passwords, sessions, and permissions.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the turtle plugin — 26 skills shipped together

Good fit Implementing registration, login, logout, password resets, multi-factor authentication, sessions, tokens, role-based access, and other permission checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/contactandrewchl-wq/turtle-mcp/security-authn-authz
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 contactandrewchl-wq/turtle-mcp --skill security-authn-authz
Clone the repo
git clone --depth 1 https://github.com/contactandrewchl-wq/turtle-mcp

Made for: Claude Code.

Or install turtle, the plugin that ships this one along with the rest of its 26 skills.

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 security-authn-authz

README.md
[![agentmods](https://agentmods.dev/badge/skills/contactandrewchl-wq/turtle-mcp/security-authn-authz/github.svg)](https://agentmods.dev/skills/contactandrewchl-wq/turtle-mcp/security-authn-authz)
Your own site
<a href="https://agentmods.dev/skills/contactandrewchl-wq/turtle-mcp/security-authn-authz"><img src="https://agentmods.dev/badge/skills/contactandrewchl-wq/turtle-mcp/security-authn-authz/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 security-authn-authz

Your own site · 80×15
<a href="https://agentmods.dev/skills/contactandrewchl-wq/turtle-mcp/security-authn-authz"><img src="https://agentmods.dev/badge/skills/contactandrewchl-wq/turtle-mcp/security-authn-authz.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,145 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.00062 $0.01145
Opus 5 $0.00031 $0.00573
Sonnet 5 $0.00012 $0.00229
Haiku 4.5 $0.00006 $0.00114

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

Security

Grade A, and why

security-authn-authz 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 12d 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/security-authn-authz/SKILL.md · 112 lines

How it starts

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

Autenticación y autorización

Cuándo usar

  • Implementar registro, login, logout, reset de contraseña, MFA.
  • Diseñar el modelo de permisos.
  • Resolver un bug que toca sesión o autorización.

Distinguir

  • Autenticación (authn): ¿quién sos? (login).
  • Autorización (authz): ¿qué podés hacer? (permisos).
  • Son independientes. Casi todo el daño viene de mezclarlas.

Contraseñas

  • Hash con argon2id (preferido, parámetros: 64 MB, 3 iter, 4 paralelismo como base) o bcrypt con cost ≥12.
  • Nunca MD5, SHA-1, SHA-256, ni "salt + sha" caseros.
  • Reglas: longitud mínima 12, sin requerir mezcla forzada de mayúsculas/símbolos (NIST 800-63B). Sí permitir hasta ≥64 chars, incluir emojis.
  • Verificá contra breached password lists (HaveIBeenPwned API con k-anonymity).
  • Reset por email: link de un solo uso, expira en ≤1 h, invalida sesiones activas.

Sesiones

Dos modelos, elegí uno y respetalo:

Server session (recomendado para apps web)

  • Cookie Set-Cookie: session=<opaque-id>; HttpOnly; Secure; SameSite=Lax; Path=/.
  • Sesión almacenada server-side (Redis, BD). Invalidable instantánea.
  • Rotación de ID al elevar privilegios (post-login, post-MFA).

JWT (para APIs stateless o SPAs)

  • Access token corto (5–15 min) + refresh token largo (días/semanas).
  • Firmá con RS256/EdDSA (asymétrico) si distribuís verificación a varios servicios; HS256 si todo es un solo servicio.
  • Nunca confíes en alg: none. Verificá alg en una whitelist.
  • Refresh token rotativo y revocable (almacenado server-side).
  • JWT en localStorage queda expuesto a XSS. Para web, preferí cookie HttpOnly.

MFA

  • TOTP (RFC 6238) por defecto: apps tipo Authy/Google Authenticator.
  • WebAuthn / passkeys para experiencia moderna y phishing-resistant.
  • SMS solo como fallback, no como factor principal (SIM swap).
  • Códigos de recuperación: 8 códigos one-time, mostrados una vez, hash en BD.

OAuth2 / OIDC

  • Authorization Code + PKCE para cualquier app pública (SPA, mobile, CLI).
  • Client Credentials para service-to-service.
  • state siempre presente (anti-CSRF en el flow).
  • nonce en OIDC para prevenir replay.
  • Tokens nunca en URL, salvo el code corto.

Read the full file on GitHub · 112 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. 12d ago First seen · 112 lines · 62 tokens per session scan A 6bb7906587cd

Subscribe to this mod's changes

security-authn-authz is a skill published in the GitHub repository contactandrewchl-wq/turtle-mcp (2 stars, last pushed 2mo ago), licensed MIT. It adds 62 tokens to every session and 1,145 once invoked, about $0.0003 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

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

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

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

knowledge-shared-api-and-runtime-schemas

Shared request and response definitions for the server and web app, with runtime checks for incoming data and cleaned JSON schemas for tools. TypeBox is the library used to describe these data shapes.

echoVic/blade-code · 149 tokens

gno

Search local documents, files, notes, and knowledge bases. Index directories, search with BM25/vector/hybrid, get AI answers with citations. Use when user wants to search files, find documents, query notes, look up information in local folders, index a directory, set up document search, build a knowledge base, needs…

gmickel/gno · 86 tokens