.net-new-project

.NET 8 Clean Architecture Project Generator

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill ".net-new-project" with this command: npx skills add tringo0108/z-command/tringo0108-z-command-net-new-project

.NET 8 Clean Architecture Project Generator

This skill guides the creation of a new .NET 8 Web API solution using Clean Architecture. IMPORTANT: Do NOT generate code files manually. Use the CLI commands provided below to scaffold the solution and projects.

Prerequisite

  • .NET 8 SDK installed (dotnet --version )

Directory Structure

The final structure will look like this:

SolutionName/ ├── src/ │ ├── SolutionName.Domain/ # Core business logic, entities, interfaces (No dependencies) │ ├── SolutionName.Application/ # Use cases, DTOs, interfaces (Depends on Domain) │ ├── SolutionName.Infrastructure/ # External concerns, DB, file system (Depends on Application) │ └── SolutionName.Api/ # Presentation layer (Depends on Application, Infrastructure) ├── tests/ # Unit and Integration tests └── SolutionName.sln

Step-by-Step Instructions

  1. Create Solution

Run these commands in the terminal:

Create solution file

dotnet new sln -n SOLUTION_NAME

  1. Create Projects (Clean Architecture Layers)

Create src directory

mkdir src

DOMAIN Layer (Class Library)

dotnet new classlib -n SOLUTION_NAME.Domain -o src/SOLUTION_NAME.Domain

APPLICATION Layer (Class Library)

dotnet new classlib -n SOLUTION_NAME.Application -o src/SOLUTION_NAME.Application

INFRASTRUCTURE Layer (Class Library)

dotnet new classlib -n SOLUTION_NAME.Infrastructure -o src/SOLUTION_NAME.Infrastructure

API Layer (Web API)

dotnet new webapi -n SOLUTION_NAME.Api -o src/SOLUTION_NAME.Api --use-controllers

  1. Establish Dependencies

Application -> Domain

dotnet add src/SOLUTION_NAME.Application reference src/SOLUTION_NAME.Domain

Infrastructure -> Application

dotnet add src/SOLUTION_NAME.Infrastructure reference src/SOLUTION_NAME.Application

Api -> Application

dotnet add src/SOLUTION_NAME.Api reference src/SOLUTION_NAME.Application

Api -> Infrastructure

dotnet add src/SOLUTION_NAME.Api reference src/SOLUTION_NAME.Infrastructure

  1. Add Projects to Solution

dotnet sln add src/SOLUTION_NAME.Domain dotnet sln add src/SOLUTION_NAME.Application dotnet sln add src/SOLUTION_NAME.Infrastructure dotnet sln add src/SOLUTION_NAME.Api

  1. Cleanup
  • Remove default Class1.cs and WeatherForecast.cs files from all projects.

Verification

Run dotnet build to ensure the solution builds correctly.

Parent Hub

  • _backend-mastery

Part of Workflow

This skill is utilized in the following sequential workflows:

  • _workflow-feature-lifecycle

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

personal-financial-advisor

No summary provided by upstream source.

Repository SourceNeeds Review
General

image-gen

Generate AI images from text prompts. Triggers on: "生成图片", "画一张", "AI图", "generate image", "配图", "create picture", "draw", "visualize", "generate an image".

Archived SourceRecently Updated
General

explainer

Create explainer videos with narration and AI-generated visuals. Triggers on: "解说视频", "explainer video", "explain this as a video", "tutorial video", "introduce X (video)", "解释一下XX(视频形式)".

Archived SourceRecently Updated
General

asr

Transcribe audio files to text using local speech recognition. Triggers on: "转录", "transcribe", "语音转文字", "ASR", "识别音频", "把这段音频转成文字".

Archived SourceRecently Updated