PluginBench
Skill
Pass
Audit score 90

dotnet-init

codewithmukesh/dotnet-claude-kit

Interactively initialize .NET projects and generate customized CLAUDE.md files for Claude Code.

What is dotnet-init?

Detects your .NET project type, asks targeted architecture and tech-stack questions, then generates a fully customized CLAUDE.md—no manual template copying. Use when starting a new .NET project or adding dotnet-claude-kit to an existing codebase.

  • Detects project type (Web API, Blazor, Worker, Class Library, Modular Monolith) from existing .sln/.csproj files or asks for greenfield setup
  • Scaffolds new .NET solutions with modern slnx format, Directory.Build.props, and src/tests folder structure
  • Asks targeted architecture questions (domain complexity, team size, module boundaries) and recommends VSA, Clean Architecture, DDD, or Modular Monolith
  • Gathers tech-stack preferences (database, auth, caching, messaging) and configures them in the generated CLAUDE.md
  • Detects existing conventions via convention-learner skill for existing projects
  • Safely handles existing CLAUDE.md files with merge, overwrite, or keep options and automatic backups

How to install dotnet-init

npx skills add https://github.com/codewithmukesh/dotnet-claude-kit --skill dotnet-init
Prerequisites
  • Node.js and npx installed
  • dotnet CLI (version 9+) for scaffolding new projects
  • An existing .NET project or empty directory for greenfield setup
Claude Code
Cursor
Windsurf
Cline

How to use dotnet-init

  1. 1.Run the skill with /dotnet-init or say 'init project'
  2. 2.Answer questions about your project type (existing or greenfield) and architecture preferences
  3. 3.Review the recommended architecture pattern and tech-stack choices
  4. 4.Confirm or adjust the generated CLAUDE.md (merge, overwrite, or keep existing)
  5. 5.Run /health-check to establish a baseline or /scaffold to add your first feature

Use cases

Good for
  • Starting a new .NET REST API project with Claude Code and getting a pre-configured CLAUDE.md in seconds
  • Adding dotnet-claude-kit to an existing multi-project solution while preserving custom documentation sections
  • Scaffolding a greenfield Blazor or Worker Service with recommended architecture and tech stack
  • Detecting and documenting conventions in a legacy .NET codebase before refactoring with Claude Code
  • Setting up a modular monolith with bounded contexts and generating architecture-aware guidance
Who it's for
  • Solo .NET developers starting new projects with Claude Code
  • Small teams adopting dotnet-claude-kit on existing codebases
  • Architects designing new .NET solutions and needing quick scaffolding
  • Teams migrating legacy .NET projects to Claude Code workflows

dotnet-init FAQ

What happens if I already have a CLAUDE.md?

The skill detects it and asks whether to merge (keeping your custom sections), overwrite (replace entirely), or keep (leave untouched). Merge is recommended and always backs up the original to CLAUDE.md.bak.

Can I use this on a greenfield project?

Yes. If no .sln or .csproj is found, the skill asks what you're building, scaffolds the solution structure with dotnet new, and generates a customized CLAUDE.md ready for development.

Does this work with existing multi-project solutions?

Yes. It scans .csproj files to detect SDK types and project relationships, then recommends an architecture (e.g., Modular Monolith) and generates CLAUDE.md with all projects documented.

What architecture patterns does it recommend?

Vertical Slice Architecture (VSA), Clean Architecture, Domain-Driven Design (DDD), or Modular Monolith, based on your answers about domain complexity, team size, and module boundaries.

Do I need to manually configure tech stack after init?

No. The skill asks about database, auth, caching, and messaging preferences and bakes them into the generated CLAUDE.md. You can edit it later if needed.

Full instructions (SKILL.md)

Source of truth, from codewithmukesh/dotnet-claude-kit.


name: dotnet-init description: > Interactive project initialization. Detects project type, asks architecture questions, and generates a customized CLAUDE.md — no manual template copying. Use when: "init project", "setup project", "initialize", "new project setup", "generate CLAUDE.md", "configure for dotnet-claude-kit", or starting Claude Code on a fresh or existing .NET codebase.

/dotnet-init

What

Interactively initializes a .NET project for use with dotnet-claude-kit. Detects the project type, asks targeted questions about architecture and tech stack, then generates a fully customized CLAUDE.md in the project root.

No manual template copying required.

When

  • Starting a new .NET project with Claude Code
  • Adding dotnet-claude-kit to an existing project
  • "init project", "setup project", "generate CLAUDE.md", "configure for dotnet-claude-kit"

How

Step 1: Detect or Ask Project Type

Analyze the current directory to determine if this is an existing or greenfield project:

→ Look for .slnx / .sln files
→ If found, scan .csproj files for SDK type:
  - Microsoft.NET.Sdk.Web → web-api or blazor-app
  - Microsoft.NET.Sdk.Worker → worker-service
  - Microsoft.NET.Sdk → class-library
  - Multiple projects with inter-module references → modular-monolith
  - If ambiguous, ask the user

→ If NO solution/project found (greenfield):
  - Ask: "What are you building?"
    - REST API / microservice → web-api
    - Blazor application → blazor-app
    - Background worker / queue processor → worker-service
    - NuGet package / shared library → class-library
    - Multi-module system → modular-monolith
  - Ask: "Project name?"
  - Scaffold the solution structure:
    - dotnet new sln -n ProjectName --format slnx   (modern XML solution format)
    - dotnet new webapi / worker / classlib as appropriate
    - Set up Directory.Build.props with .NET 10 defaults
    - Create src/ and tests/ folder structure

Step 2: Architecture Questionnaire

Load the architecture-advisor skill and ask targeted questions:

  1. Domain complexity — CRUD-heavy, moderate business rules, or rich domain?
  2. Team size — Solo, small team, or large team?
  3. Module boundaries — Single deployable or multiple bounded contexts?
  4. Existing patterns — (existing projects only) Detect conventions via convention-learner skill

→ Recommend: VSA, Clean Architecture, DDD, or Modular Monolith with rationale.

Step 3: Tech Stack Selection

Ask about specific technology choices:

  • Database: PostgreSQL, SQL Server, SQLite, or none yet
  • Auth: JWT, OIDC, Cookie, or none yet
  • Caching: HybridCache, Redis, or none yet
  • Messaging: Wolverine, MassTransit, or none yet
  • Testing: Confirm xUnit + Testcontainers defaults

Step 4: Generate CLAUDE.md

Load the appropriate template from templates/ as a base, then customize:

  • Replace [ProjectName] with the actual project/solution name
  • Set the chosen architecture
  • Configure the tech stack section
  • For existing projects: add project-specific conventions detected in Step 2
  • For greenfield: add recommended conventions based on architecture choice

Before writing, check for an existing CLAUDE.md. Never overwrite it silently.

→ If ./CLAUDE.md does NOT exist:
  - Write the generated content to ./CLAUDE.md

→ If ./CLAUDE.md ALREADY exists:
  - Read it and identify hand-written / custom sections
    (anything not produced by a kit template)
  - Ask: "You already have a CLAUDE.md. How should I proceed?"
    - Merge (recommended) → keep the user's custom sections, add or refresh the
      kit's architecture, tech-stack, and convention sections in place
    - Overwrite → replace it entirely with the freshly generated file
    - Keep → leave the file untouched and print the generated content so the
      user can copy what they want by hand
  - For Merge and Overwrite: back the original up to ./CLAUDE.md.bak first.
    Never discard user content without a .bak backup.

Step 5: Verify Setup

→ Confirm .mcp.json exists or create it (for Roslyn MCP server)
→ For existing projects:
  - Verify the solution file is discoverable
  - Run a quick health check to establish baseline
  - Report: "Project initialized. Run /health-check to see your baseline."
→ For greenfield projects:
  - Verify dotnet build succeeds on the scaffolded solution
  - Report: "Project created. Run /scaffold to add your first feature."

Skills invoked: project-setup, architecture-advisor, convention-learner Agent: dotnet-architect

Example — Existing Project

User: /dotnet-init

Claude: Detected:
  - Solution: MyApp.slnx (3 projects)
  - SDK: Microsoft.NET.Sdk.Web → Web API
  - Database: PostgreSQL (from connection string)
  - Auth: JWT (from appsettings)

  1. Domain complexity? [CRUD-heavy / Moderate / Rich domain]
  > Moderate

  2. Team size? [Solo / Small / Large]
  > Small

  Recommendation: Vertical Slice Architecture
  Generated: ./CLAUDE.md (MyApp + VSA + PostgreSQL + JWT)
  Run /health-check to see your baseline.

Example — Greenfield Project

User: /dotnet-init

Claude: No .sln or .csproj found. Let's set up a new project.

  1. What are you building? [REST API / Blazor / Worker / Library / Modular Monolith]
  > REST API

  2. Project name?
  > OrderService

  3. Domain complexity? [CRUD-heavy / Moderate / Rich domain]
  > CRUD-heavy

  Recommendation: Vertical Slice Architecture

  Creating solution...
  → dotnet new sln -n OrderService --format slnx
  → dotnet new webapi -n OrderService.Api -o src/OrderService.Api
  → dotnet new xunit3 -n OrderService.Tests -o tests/OrderService.Tests
  → Directory.Build.props with .NET 10 defaults
  → Generated: ./CLAUDE.md (OrderService + VSA + scaffold-ready)

  Run /scaffold to add your first feature.

Example — Existing Project With a CLAUDE.md

User: /dotnet-init

Claude: Detected:
  - Solution: MyApp.slnx (3 projects) → Web API
  - Found an existing CLAUDE.md (custom "Deployment" and "Team conventions" sections)

  You already have a CLAUDE.md. How should I proceed?
  [Merge (recommended) / Overwrite / Keep]
  > Merge

  → Backed up original to ./CLAUDE.md.bak
  → Kept your Deployment + Team conventions sections
  → Refreshed architecture (VSA), tech-stack (PostgreSQL + JWT), and convention sections
  Generated: ./CLAUDE.md
  Run /health-check to see your baseline.

Related

  • /plan — Plan before building features
  • /health-check — Assess project health after init
  • /scaffold — Scaffold features using the chosen architecture