Loading...
Loading...
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.
npx skill4agent add codewithmukesh/dotnet-claude-kit dotnet-initCLAUDE.md→ 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 structurearchitecture-advisorconvention-learnertemplates/[ProjectName]CLAUDE.md→ 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.→ 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."project-setuparchitecture-advisorconvention-learnerdotnet-architectUser: /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.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.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./plan/health-check/scaffold