dotnet-multi-tenant

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

A guide for adding multi-tenant behavior to .NET APIs, where one application serves multiple customers while keeping their data and access separate. It covers identifying tenants, tenant-specific login secrets, database selection, and access-control propagation.

In plain words
What is it for?
Use it to implement tenant middleware, tenant context and resolution, per-tenant JWT settings, isolated databases, and automatic tenant identifiers on requests.
Why use it?
It addresses the risk of mixing customer data or applying the wrong permissions when several customers share an API.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the awesome-ai-skills plugin — 36 skills, 11 commands, 8 agents shipped together

Good fit Use it to implement tenant middleware, tenant context and resolution, per-tenant JWT settings, isolated databases, and automatic tenant identifiers on requests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/landim32/awesome-ai-skills/dotnet-multi-tenant
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-multi-tenant
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 36 skills, 11 commands, 8 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-multi-tenant

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/landim32/awesome-ai-skills/dotnet-multi-tenant"><img src="https://agentmods.dev/badge/skills/landim32/awesome-ai-skills/dotnet-multi-tenant.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,195 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.00072 $0.04195
Opus 5 $0.00036 $0.02098
Sonnet 5 $0.00014 $0.00839
Haiku 4.5 $0.00007 $0.00419

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

Security

Grade A, and why

dotnet-multi-tenant 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 11d 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-multi-tenant/SKILL.md · 620 lines

How it starts

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

.NET Multi-Tenant API Implementation Guide

You are an expert assistant that helps developers implement the Multi-Tenant pattern in .NET APIs. You guide the user through all required components: tenant resolution, JWT per-tenant, database isolation, and ACL propagation.

Input

The user will describe what to create or modify: $ARGUMENTS

Before generating code:

  1. Read the solution structure — Identify all projects/layers (API, ACL, Application, Domain, Infra)
  2. Find existing patterns — Check for existing authentication, DbContext, and HttpClient registrations
  3. Read appsettings.json — Check for existing tenant configuration
  4. Read Program.cs or Startup.cs — Understand current DI and middleware setup
  5. Identify existing DbContext — You must NOT modify Models, DTOs, or DbContext structure

Architecture Overview

Multi-Tenant Resolution Flow

┌─────────────────────────────────────────────────────────┐
│                      API Layer                          │
│                                                         │
│  ┌─────────────────┐    ┌────────────────────────────┐  │
│  │ TenantMiddleware │───▶│ HttpContext.Items["TenantId"]│ │
│  │ (runs before     │    └────────────────────────────┘  │
│  │  auth pipeline)  │                                    │
│  └─────────────────┘                                    │
│                                                         │
│  Unauthenticated endpoints → Header: X-Tenant-Id       │
│  Authenticated endpoints   → JWT claim: tenant_id       │
└─────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────┐
│                      ACL Layer                          │
│                                                         │
│  ┌──────────────────────┐   ┌────────────────────────┐  │
│  │ TenantHeaderHandler   │──▶│ Injects X-Tenant-Id    │  │
│  │ (DelegatingHandler)   │   │ into ALL HttpClient    │  │
│  │                       │   │ requests automatically │  │
│  └──────────────────────┘   └────────────────────────┘  │
│                                                         │
│  TenantId source: appsettings.json → Tenant:DefaultId   │
│  NEVER passed as method parameter                       │
└─────────────────────────────────────────────────────────┘

Read the full file on GitHub · 620 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. 11d ago First seen · 620 lines · 72 tokens per session scan A d7140599804d

Subscribe to this mod's changes

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

api-designer

Use when designing REST or GraphQL APIs, creating OpenAPI specifications, or planning API architecture. Invoke for resource modeling, versioning strategies, pagination patterns, error handling standards.

Jeffallan/claude-skills · 39 tokens

django-storages-s3

Use when configuring Django to store static and media files on AWS S3 with django-storages. Invoke when working with the STORAGES setting, S3 buckets, presigned URLs, CloudFront, or boto3-backed file storage in settings.py. Configures the Django 4.2+ STORAGES dict, public/private custom backends, presigned GET/POST…

Jeffallan/claude-skills · 138 tokens

fastapi-expert

Use when building high-performance async Python APIs with FastAPI and Pydantic V2. Invoke to create REST endpoints, define Pydantic models, implement authentication flows, set up async SQLAlchemy database operations, add JWT authentication, build WebSocket endpoints, or generate OpenAPI documentation. Trigger terms…

Jeffallan/claude-skills · 95 tokens

laravel-specialist

Build and configure Laravel 10+ applications, including creating Eloquent models and relationships, implementing Sanctum authentication, configuring Horizon queues, designing RESTful APIs with API resources, and building reactive interfaces with Livewire. Use when creating Laravel models, setting up queue workers…

Jeffallan/claude-skills · 86 tokens

microservices-architect

Designs distributed system architectures, decomposes monoliths into bounded-context services, recommends communication patterns, and produces service boundary diagrams and resilience strategies. Use when designing distributed systems, decomposing monoliths, or implementing microservices patterns — including service…

Jeffallan/claude-skills · 75 tokens

nestjs-expert

Creates and configures NestJS modules, controllers, services, DTOs, guards, and interceptors for enterprise-grade TypeScript backend applications. Use when building NestJS REST APIs or GraphQL services, implementing dependency injection, scaffolding modular architecture, adding JWT/Passport authentication, integrating…

Jeffallan/claude-skills · 107 tokens