Generates a multi-stage Dockerfile and .dockerignore for .NET apps with layer caching, non-root user, and chiseled image options. Use when the user asks to dockerize a .NET app or shrink an image.
Ships in TheCodeMan .NET AI ToolKit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Produce a production-grade multi-stage Dockerfile for a .NET app: fast cached builds, a small secure runtime image, and a non-root user.
Works on a target: a project/solution or GitHub URL. Detect the entry project and TFM: find <target> -name "*.csproj" and read <TargetFramework>. Note solution layout for correct copy/restore.
# build
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
WORKDIR /src
COPY ["MyApp/MyApp.csproj", "MyApp/"]
RUN dotnet restore "MyApp/MyApp.csproj" # restore as its own layer = cached unless csproj changes
COPY . .
RUN dotnet publish "MyApp/MyApp.csproj" -c Release -o /app/publish /p:UseAppHost=false
# runtime (small + non-root)
FROM mcr.microsoft.com/dotnet/aspnet:9.0-noble-chiseled AS final
WORKDIR /app
COPY --from=build /app/publish .
USER $APP_UID # non-root (chiseled images set this)
EXPOSE 8080
ENTRYPOINT ["dotnet", "MyApp.dll"]
**/bin/
**/obj/
**/.vs/
**/.git/
**/*.user
Dockerfile*
-chiseled — minimal, no shell, non-root by default. Best default for services.-alpine — small, musl libc (watch native deps).-noble/standard — largest, most compatible.runtime-deps for tiny self-contained images when the app is AOT-compatible..dockerignore.latest in production."Dockerize this .NET app", "give me a multi-stage Dockerfile", "shrink my image / use a chiseled image", "non-root container for my service". Pairs with cicd-pipeline-generator and microservice-template-generator.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
dockerfile, multi-stage-build, docker, container, dotnet, devops
/dotnet-ai-toolkit:dockerfile-generatorfrom TheCodeMan .NET AI ToolKit
npx claudepluginhub stefanthecode/dotnet-ai-toolkit --plugin dotnet-ai-toolkit49 skills in this plugin
/adonet-data-access-auditorAudit and fix classic ADO.NET data-access code (SqlConnection / SqlCommand / SqlDataReader / DataSet) on .NET Framework. Use this skill whenever the user shares raw ADO.NET code, a DAL / repository built on SqlCommand, stored-proc calls, string-concatenated SQL, or mentions SQL injection, parameterized queries, connection leaks, "using / Dispose", reading the same column multiple times, transactions, or "why does my old data layer leak connections / is it safe". Always use this skill for classic ADO.NET review instead of answering from memory; it applies a fixed security + correctness + performance checklist and rewrites the code./async-await-auditorAudit C#/.NET code for async/await anti-patterns and concurrency bugs. Use this skill whenever the user shares async C# code or asks about deadlocks, async void, .Result/.Wait(), blocking calls, ConfigureAwait, sync-over-async, fire-and-forget tasks, CancellationToken usage, or "why does my async code hang/deadlock". Always use this skill for async correctness/performance reviews instead of answering from memory; it applies a fixed checklist and rewrites the code./authorization-policy-generatorDesign ASP.NET Core authorization — policy-based, role-based, and claims/requirement-based with custom authorization handlers and resource-based checks. Use this skill whenever the user wants authorization policies, role/claim checks, custom AuthorizationHandler, resource-based authorization, permission checks, or asks "how do I authorize this / policy vs role / restrict this endpoint to X". Always use this skill for authorization requests; it generates policies, handlers, and endpoint wiring.Other plugins' skills for the same job