# The whole feature. In the controller.

> Copilot writes the common shape, not yours.

- **Format:** short video, 9 steps, ~51 seconds
- **Topic:** Building a GitHub Copilot Skill for .NET — why Copilot writes a whole feature inside the controller, and how one SKILL.md with a trigger-rich description, rules, a workflow and a checklist makes it produce a Query, a handler, a thin controller and tests.
- **Author:** Suthahar Jegatheesan (MSDEVBUILD)
- **Category:** GitHub Copilot · copilot
- **Published:** 2026-02-06
- **Tags:** githubcopilot, dotnet, aspnetcore, cleanarchitecture, cqrs, aicoding, csharp, msdevbuild
- **Canonical URL:** https://blog.msdevbuild.com/shorts/copilot-skill-dotnet-thin-controller/

---
## What you'll learn

- Why Copilot puts business logic in ASP.NET controllers
- Why a Skill description is its activation trigger
- How rules, a workflow and a checklist produce a thin controller

## Understand it one step at a time

### 1. Add a query

A developer asks Copilot for a GetOrderById query. No Skill exists yet.

### 2. All in the controller

DbContext in the action, NotFound decided inline, an anonymous object returned.

### 3. Explained, then forgotten

The tech lead explained the method in chat two weeks ago. The chat is gone.

### 4. Write a SKILL.md

One folder under .github/skills with the method in it: dotnet-cqrs-feature.

### 5. The description is the trigger

Copilot reads only the description until it matches. A vague one never fires.

### 6. Rules, workflow, checklist

Flat rules, numbered steps, real examples, and a checklist that decides when it is done.

### 7. Same prompt, again

"add" and "query" match the description. The Skill loads and Copilot follows it.

### 8. Checklist passes

Every check ticked. The three grep commands in CI return nothing.

### 9. Write the method once

A trigger-rich description, flat rules, a workflow, real examples and a checklist.

---

## The takeaway

**Write the method once. Copilot loads it when it matches.**

The description is the trigger; the checklist decides when the feature is done.
