dotnet-auth

dotnet-auth is a skill for Claude Code from landim32/awesome-ai-skills. It costs 89 tokens per session (4,447 once invoked), scanned A, original, MIT.

A standard for adding user sign-up and login to .NET 8 APIs using JWT bearer tokens. JWT is a signed token that an API can use to recognise a logged-in user.

In plain words
What is it for?
Use it to implement registration, login, the current-user endpoint, optional roles, password hashing, JWT settings, and Swagger support in a .NET API.
Why use it?
It provides a consistent approach to issuing tokens, checking them, storing passwords safely, and reading the current user's identity. It also avoids using the named legacy authentication system for new code.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the awesome-ai-skills plugin — 42 skills, 11 commands, 9 agents shipped together

Good fit Use it to implement registration, login, the current-user endpoint, optional roles, password hashing, JWT settings, and Swagger support in a .NET API.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/landim32/awesome-ai-skills/dotnet-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 landim32/awesome-ai-skills --skill dotnet-auth
Clone the repo
git clone --depth 1 https://github.com/landim32/awesome-ai-skills

Made for: Claude Code.

Or install awesome-ai-skills, the plugin that ships this one along with the rest of its 42 skills, 11 commands, 9 agents.

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 dotnet-auth

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/landim32/awesome-ai-skills/dotnet-auth"><img src="https://agentmods.dev/badge/skills/landim32/awesome-ai-skills/dotnet-auth.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,447 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.00089 $0.04447
Opus 5.5 $0.00036 $0.01779
Sonnet 5.5 $0.00018 $0.00889
Haiku 4.5 $0.00009 $0.00445

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

Security

Grade A, and why

dotnet-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 2d 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/dotnet-auth/SKILL.md · 480 lines

How it starts

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

dotnet-auth — autenticação JWT em .NET

Padrão consolidado dos projetos .NET da emagine (finami, Roll6, ambrosio). Encaixa nas camadas da skill dotnet-architecture (DTO → Infra.Interfaces → Domain → Infra → Application → API).

Entrada

Contexto opcional em $ARGUMENTS (ex.: "só login por email", "com roles", "SignalR"). Sem argumentos, aplique o padrão completo: cadastro, login, me, roles opcionais.

0. Antes de começar

  1. Leia a solução: nomes dos projetos ({Project}.DTO, .Domain, .Infra.Interfaces, .Infra, .Application, .API), o Startup.cs da Application, a entidade de usuário (se existir) e a forma como os controllers tratam erros. Siga o que já existe; este padrão preenche o que falta.

  2. A autenticação é sempre própria do projeto, com este padrão. Não usar NAuth (sistema legado): nada de pacote NAuth, NAuthHandler, IUserClient ou chamadas à API do NAuth em código novo. Multi-tenant com secret por tenant: combine com dotnet-multi-tenant.

  3. Pacotes:

    Projeto Pacote
    {Project}.Infra System.IdentityModel.Tokens.Jwt 8.x, Microsoft.Extensions.Identity.Core 8.x
    {Project}.Application (ou API, onde estiver o DI) Microsoft.AspNetCore.Authentication.JwtBearer 8.x

1. Decisões do padrão

Item Padrão
Esquema Authorization: Bearer {token} — JwtBearerDefaults.AuthenticationScheme
Algoritmo HS256 (SecurityAlgorithms.HmacSha256), chave Encoding.UTF8 do Jwt:Secret
Tamanho mínimo do secret 32 bytes — a API não sobe com secret menor (fail-fast)
Expiração 90 dias (Jwt:ExpirationDays = 90), configurável por ambiente (Jwt__ExpirationDays)
Validação issuer, audience, lifetime e assinatura; ClockSkew = 1 min
Claims sub (userId), email, name, jti; role (uma por papel) quando houver roles
Mapeamento de claims MapInboundClaims = false (claims chegam com o nome curto: sub, email, role)
Senha PasswordHasher<T> do ASP.NET Core Identity (PBKDF2-HMAC-SHA256 com salt), com rehash
Resposta do login { token, expiresAt, user } — expiresAt em UTC, igual ao exp do token
Usuário logado User.GetUserId() (claim sub) — nunca aceitar userId do body/query para "quem sou eu"
Refresh token não há: ao expirar, o cliente faz login de novo

Read the full file on GitHub · 480 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. 2d ago First seen · 480 lines · 89 tokens per session scan A baf1a42d60b4

Subscribe to this mod's changes

dotnet-auth is a skill published in the GitHub repository landim32/awesome-ai-skills (1 stars, last pushed 2d ago), licensed MIT. It adds 89 tokens to every session and 4,447 once invoked, about $0.0004 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-11-28.

Related

dotnet-auth compared with skills from other repositories

dotnet-auth next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
dotnet-authlandim32/awesome-ai-skillsSkill12d agoMITA89Claude Code
flask-expertJeffallan/claude-skillsSkill13ktodayMITA197Claude Code
api-designerJeffallan/claude-skillsSkill13ktodayMITA39Claude Code
laravel-specialistJeffallan/claude-skillsSkill13ktodayMITA86Claude Code
nestjs-expertJeffallan/claude-skillsSkill13ktodayMITA107Claude Code
firebase-expertJeffallan/claude-skillsSkill13ktodayMITA188Claude Code
django-expertJeffallan/claude-skillsSkill13ktodayMITA96Claude Code