Skip to main content
skill CX Codex

dotnet-api-security — Claude Code skill for ASP.NET Core auth and API security

dotnet-api-security is a Claude Code skill that handles authentication and authorization in ASP.NET Core APIs.

no license 169 installs ★ 92 updated 2026-02-27

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add wshaddix/dotnet-skills --skill dotnet-api-security -a claude-code
Open on GitHub

What dotnet-api-security does

The skill takes ownership of the API security layer in ASP.NET Core: Identity setup with password rules and account lockout, external provider integration via OAuth 2.0/OIDC (Entra ID, Auth0, Okta, Keycloak), JWT bearer validation with policy-based authorization, Content Security Policy headers, and CORS configuration.

Passkey support through WebAuthn is also covered — the skill knows the full .NET 10 flow from generating a PublicKeyCredentialCreationOptions challenge to verifying the assertion server-side. Fallback authorization policies via AddAuthorizationBuilder are part of the same scope.

The boundaries are explicit: OWASP Top 10 mitigations belong to dotnet-security-owasp, secrets management to dotnet-secrets-management, and Blazor auth components (AuthorizeView, CascadingAuthenticationState) to a separate skill. If you combine multiple skills from wshaddix/dotnet-skills in one project, knowing these lines prevents overlap.

What it helps with

  • Configure JWT bearer authentication with custom authorization policies
  • Wire up OAuth 2.0/OIDC against Entra ID, Auth0, or Keycloak
  • Add passwordless passkey (WebAuthn) login in a .NET 10 project
  • Set up ASP.NET Core Identity with lockout and two-factor authentication
  • Apply CORS policies and rate limiting to a public-facing API

Example prompts for the agent

  • Add JWT bearer auth to the /api/orders endpoint and require the PremiumUser policy
  • Connect OIDC via Keycloak, save tokens, and pull claims from the userinfo endpoint
  • Enable passkeys with AddPasskeys() and walk through the registration flow for an SPA client

How to install dotnet-api-security

1Skills CLI (Vercel)

npx skills add wshaddix/dotnet-skills --skill dotnet-api-security -a claude-code

2Manually: put the files in place

~/.claude/skills/dotnet-api-security/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/dotnet-api-security/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about dotnet-api-security

How do I install dotnet-api-security in Claude Code?

Run npx skills add wshaddix/dotnet-skills --skill dotnet-api-security -a claude-code in your terminal. The skill file will be placed at ~/.claude/skills/dotnet-api-security/SKILL.md.

What does the dotnet-api-security skill do?

It teaches the agent to implement API-level authentication and authorization in ASP.NET Core, covering Identity, JWT bearer, OAuth 2.0/OIDC, WebAuthn passkeys, CORS, and rate limiting.

How does dotnet-api-security differ from dotnet-security-owasp?

dotnet-api-security owns authentication and authorization mechanisms for APIs. dotnet-security-owasp handles cross-cutting vulnerability mitigations from the OWASP Top 10 — they are separate skills in the same repository.

Similar skills

All skills for Backend and APIs →

From the same set24

The whole set →
dotnet-wpf-modern dotnet-wpf-modern — a skill that steers your coding agent through modern WPF: generic host, MVVM Toolkit, Fluent theme, current C# features. CX Codex +1 358installs dotnet-winforms-basics dotnet-winforms-basics teaches coding agents how to build WinForms apps on modern .NET 8+. Helps configure dependency injection, SDK-style projects, and high-DPI scaling. CX Codex +1 295installs dotnet-csharp-code-smells dotnet-csharp-code-smells — a C# review skill: the agent catches leaked IDisposable, misused async and DI, suppressed warnings and other anti-patterns while it plans, writes or reviews code. CX Codex +1 180installs dotnet-security-owasp dotnet-security-owasp flags OWASP Top 10 vulnerabilities in .NET solutions and guides safe coding. Useful for reviewing ASP.NET Core endpoints and data queries. CX Codex +1 175installs dotnet-csharp-async-patterns dotnet-csharp-async-patterns teaches AI agents proper C# async patterns, stopping common blunders like .Result deadlocks, unhandled fire-and-forget tasks, and dropped cancellation tokens. CX Codex +1 136installs dotnet-architecture-patterns dotnet-architecture-patterns guides scalable .NET Minimal API architecture using vertical slices, route groups, endpoint filters, and structured error handling. CX Codex +1 125installs dotnet-csharp-dependency-injection dotnet-csharp-dependency-injection guides Microsoft DI in .NET, from service lifetimes and keyed registrations to decoration and hosted workers. CX Codex +1 125installs bootstrap5-ui bootstrap5-ui provides Bootstrap 5.3 layout patterns and component snippets for HTML and ASP.NET Core Razor views. CX Codex +1 122installs

Project sponsors

Companies that keep this analytics open