This repository contains a complete developer setup for .NET backend vibe coding with GitHub Copilot in VS Code. It solves two problems:
- Automatically install and configure MCP servers — a single script sets up all required MCP servers (Model Context Protocol) so Copilot can access Azure DevOps, databases, Microsoft Docs, and other services.
- Provide unified coding standards for the AI agent — Instructions, Skills, Agents, and Prompts in the
.github/folder control how Copilot generates code, reviews it, and tests it.
The result: You open VS Code, start the Copilot Chat in Agent Mode, and immediately have an agent that knows your project conventions, can access your ADO work items, and produces code according to your standards.
Using a different tech stack? This setup is built for .NET, but it can be adapted for any stack. See CUSTOMIZATION.md for step-by-step migration examples (REST instead of GraphQL, Jira instead of Azure DevOps, Java instead of C#, and more).
Before you run the setup, make sure the following tools are installed and available:
| Tool | Minimum Version | Check Command | Note |
|---|---|---|---|
| Node.js | 20.0.0 | node --version |
LTS version recommended |
| npm | (with Node.js) | npm --version |
Required for npx |
| VS Code or VS Code Insiders | Current | — | Copilot Extension must be installed |
| GitHub Copilot | Current | — | License required (Individual, Business, or Enterprise) |
| Git | Current | git --version |
For symlinks and repo management |
Some MCP servers require connection strings as environment variables. You can set these before starting VS Code:
| Variable | Purpose | Example |
|---|---|---|
MDB_MCP_CONNECTION_STRING |
MongoDB connection for the MongoDB MCP server | mongodb://localhost:27017 |
MSSQL_MCP_CONNECTION_STRING |
SQL Server connection for the MSSQL MCP server | Server=localhost;Database=mydb;... |
Tip: Set variables permanently via Windows System Environment Variables or a
.envfile in your profile so they're available every time VS Code starts.
GitHub Copilot in Agent Mode can access external tools and services via the Model Context Protocol (MCP). Each MCP server must be registered in the VS Code configuration (mcp.json). Maintaining this manually is error-prone and time-consuming — especially when multiple servers with binaries, Docker containers, and NPX packages need to work together.
The setup script handles everything in a single pass:
- Pre-load NPX packages — so the first start of MCP servers is fast
- Generate and merge
mcp.json— for VS Code and VS Code Insiders, without overwriting existing entries
# Clone the repository
git clone <repo-url> C:\Repos\Vibe-Coding-Dev-Setup
cd C:\Repos\Vibe-Coding-Dev-Setup
# Run once
npm run setup-mcpThe script automatically detects whether you're on Windows or macOS and adjusts paths and binaries accordingly.
| Command | Description |
|---|---|
npm run setup-mcp |
Full setup (all MCP servers + cache) |
npm run setup-mcp:dry-run |
Shows what would be done without making any changes |
npm run setup-mcp:quick |
Skips cache warming — for quick re-setup |
Individual steps can also be skipped:
node setup-mcp-servers.mjs --skip-cache-warm # No NPX cache warmingAfter setup, the following MCP servers are configured:
| # | Server | Type | Purpose |
|---|---|---|---|
| 1 | azure-devops | npx, stdio | Access Work Items, Repos, Pipelines, Wikis in Azure DevOps |
| 2 | sequential-thinking | npx, stdio | Structured thinking for complex problem-solving |
| 3 | microsoft-learn | HTTP (remote) | Search and retrieve official Microsoft documentation |
| 4 | memory | npx, stdio | Knowledge Graph for persistent agent memory |
| 5 | mongodb | npx, stdio | Direct access to MongoDB databases |
| 6 | mssql | npx, stdio | Direct access to SQL Server databases |
The configuration is written to these files:
- VS Code:
%APPDATA%\Code\User\mcp.json - VS Code Insiders:
%APPDATA%\Code - Insiders\User\mcp.json
Important: Restart VS Code after setup. When first opening Copilot Chat in Agent Mode, activate the desired MCP servers under "Select Tools". The Azure DevOps server will ask for the organization name on first use.
In a MonoRepo setup (e.g., My-Backend/), you want to use the .github/ artifacts (Instructions, Skills, Agents, Prompts) without copying them to each repository. The solution: Symbolic Links (Symlinks).
- Single Source of Truth — Changes to Instructions or Skills are maintained centrally in this repository
- No Duplicates — no manual synchronization between repositories
- Git-compatible — Symlinks are tracked by Git (on Windows, Developer Mode must be active or Git configured with
core.symlinks=true)
Open an administrative PowerShell (or ensure Windows Developer Mode is active) and create the symlink in the target repository:
# In the target repository (e.g., My-Backend)
cd C:\Repos\My-Backend
# Symlink for the entire .github folder
New-Item -ItemType SymbolicLink -Path ".github" -Target "C:\Repos\Vibe-Coding-Dev-Setup\.github"If the target repository already has a .github folder (e.g., with workflows), link only the relevant subfolders:
# Link only agent-specific folders
New-Item -ItemType SymbolicLink -Path ".github\instructions" -Target "C:\Repos\Vibe-Coding-Dev-Setup\.github\instructions"
New-Item -ItemType SymbolicLink -Path ".github\skills" -Target "C:\Repos\Vibe-Coding-Dev-Setup\.github\skills"
New-Item -ItemType SymbolicLink -Path ".github\agents" -Target "C:\Repos\Vibe-Coding-Dev-Setup\.github\agents"
New-Item -ItemType SymbolicLink -Path ".github\prompts" -Target "C:\Repos\Vibe-Coding-Dev-Setup\.github\prompts"
# Optional: AGENTS.md in root
New-Item -ItemType SymbolicLink -Path ".github\AGENTS.md" -Target "C:\Repos\Vibe-Coding-Dev-Setup\.github\AGENTS.md"# Verify symlink
Get-Item ".github\instructions" | Select-Object Name, LinkTargetNote for Git on Windows: Ensure
git config core.symlinks trueis set so symlinks are checked out correctly. Symlinks work without admin rights in Windows Developer Mode (Settings → For Developers).
Once the setup is in place, it's time to do the actual work. This chapter explains how the AI configuration is structured and how to use it effectively.
The following diagram shows how the components interact:
flowchart TB
User["Developer (VS Code)"]
Chat["Copilot Chat\n(Agent Mode)"]
subgraph gh [".github/ — AI Configuration"]
AGENTS["AGENTS.md\n(Main Agent)"]
Instructions["instructions/\ngeneral · graphql · worker · tests"]
Agents["agents/\nC# · Debug · DevOps\nMongoDB · MSSQL\nAPI Stitching · HotChocolate"]
Skills["skills/\nbackend-developer\ncode-reviewer\ndatabase-specialist\ndevops-specialist\nservice-scaffolder\n..."]
Prompts["prompts/\nImplement_from_PBI"]
end
subgraph mcp ["MCP Servers"]
ADO["Azure DevOps"]
Mongo["MongoDB"]
MSSQL["SQL Server"]
MSLearn["Microsoft Learn"]
Memory["Memory\n(Graph Memory)"]
SeqThink["Sequential\nThinking"]
end
User --> Chat
Chat --> AGENTS
AGENTS --> Instructions
AGENTS --> Agents
AGENTS --> Skills
Chat --> Prompts
Chat --> mcp
All AI-related artifacts are in the .github/ folder and are automatically recognized by VS Code / Copilot:
.github/
├── AGENTS.md # Main agent definition (always loaded)
├── instructions/ # Coding standards and conventions
│ ├── general.instructions.md # → Applies to all files (**)
│ ├── graphql.instructions.md # → Applies to GraphQL layer (**/GraphQL/**/*.cs)
│ ├── worker.instructions.md # → Applies to Worker layer (**/Worker/**/*.cs)
│ └── tests.instructions.md # → Applies only to test files (**/test/**/*Tests.cs)
├── agents/ # Specialized agents
│ ├── APIStitchingExpert.agent.md # → Schema stitching, query delegation
│ ├── CSharpExpert.agent.md # → C#/.NET design, patterns, performance
│ ├── DebugExpert.agent.md # → Build errors, runtime exceptions
│ ├── DevOpsExpert.agent.md # → Pipelines, Docker, Kubernetes
│ ├── HotChocolateExpert.agent.md # → Advanced HotChocolate v15, schema design
│ ├── MongoDBExpert.agent.md # → Schema design, indexing, queries
│ └── MSSQLExpert.agent.md # → Stored procedures, execution plans
├── skills/ # Domain-specific knowledge
│ ├── backend-developer/ # → HotChocolate, MassTransit, MongoDB repos
│ ├── code-reviewer/ # → Code review per project standards
│ ├── database-specialist/ # → Data pipeline implementation
│ ├── devops-specialist/ # → Pipeline templates, Helm, K8s patterns
│ ├── service-scaffolder/ # → Scaffold new microservices end-to-end
│ ├── prompt-creator/ # → Write and optimize prompts
│ └── ... # → other skills (docx, pdf, xlsx, pptx, ...)
└── prompts/ # Reusable prompt workflows
└── Implement_from_PBI.prompt.md # → Implement feature end-to-end from ADO PBI
| Artifact | Description | When Loaded? |
|---|---|---|
| AGENTS.md | Defines the main agent: persona, trust boundary, non-negotiable patterns, workflow, and delegations to specialist agents | Always (on every chat) |
| Instructions | Coding standards that Copilot must follow when generating code (e.g., naming conventions, architecture rules, test patterns) | Automatically based on applyTo pattern |
| Agents | Specialist expert agents that the main agent delegates to as needed (e.g., C# questions → CSharpExpert) | By main agent as needed or directly via @agent |
| Skills | Deep domain knowledge with concrete code examples and patterns from the project. Skills are automatically loaded when Copilot detects they're relevant | Automatically on relevant context |
| Prompts | Predefined multi-step workflows for recurring tasks (e.g., feature implementation from PBI to PR) | Manually via prompt menu |
Prompts are predefined workflows that you trigger through Copilot Chat. They provide a structured approach for complex tasks.
- Open Copilot Chat in Agent Mode (the agent icon in the chat window)
- Type
/and select the desired prompt from the list - Follow the prompt's instructions — for example, it might ask for a PBI number
The Implement_from_PBI prompt guides you through the entire implementation process:
- Phase 0 — Identify PBI: You provide the Work Item ID
- Phase 1 — Analysis: The agent reads the PBI, parent, children, and linked items from Azure DevOps
- Phase 2 — Codebase Analysis: The agent examines affected domain services and their patterns
- Phase 3 — Implementation Plan: A step-by-step plan is created — you confirm it before code is written
- Phase 4 — Implementation: Step by step, compilation and tests run after each step
- Phase 5 — Write Tests: Unit tests per project conventions, target ≥82% coverage on new code
- Phase 6 — Code Review: The
code-reviewerskill checks changes against project standards
Important: The agent waits for your explicit confirmation after Phase 3. You always stay in control of the plan before code is generated.
You don't need to use prompts to be productive. The agent is powerful in free chat mode too, because Instructions and Skills are automatically loaded.
Simply ask the agent questions or give instructions:
"Add a new property 'ExpirationDate' of type DateTimeOffset
to the Contract model and adapt all affected layers."
The agent will:
- Follow
general.instructions.md(naming, architecture rules) - Load the
backend-developerskill (HotChocolate resolver pattern, MongoDB repository) - Work step-by-step through the layers (Abstractions → Core → DataAccess → GraphQL)
You can also address specialized agents directly:
"@CSharpExpert How should I best implement the Repository pattern here
with a generic base class?"
"@DebugExpert This MassTransit consumer throws a NullReferenceException.
Help me debug it."
"@MongoDBExpert Analyze the indexes on the contracts collection and
suggest improvements."
The MCP servers are automatically available to the agent. You can ask it to actively use them:
"Show me the open PBIs in the current sprint."
"Search Microsoft documentation for best practices
on HotChocolate DataLoader."
"What does the schema of the 'contracts' collection look like in the database?"
"Create an overview of the last 10 commits in the My-Backend repo."
The more context you give, the better the result:
❌ "Add a field."
✅ "Add a property 'LastModifiedBy' (string, required) to the
ConsultationDocument model in the Consultation service.
It should be exposed in the GraphQL schema and set
in the repository on update."
Break large changes into small steps:
Step 1: "Create the new model in Abstractions."
Step 2: "Implement the service in Core."
Step 3: "Add the repository in DataAccess."
Step 4: "Expose it via GraphQL."
Step 5: "Write the unit tests."
After larger changes:
"Review my current changes on this branch."
The code-reviewer skill is automatically loaded and checks against project standards.
Trust but verify:
- Does the code compile? — The agent should run
dotnet buildafter each step - Do the tests pass? — Existing tests must not break
- Is the architecture correct? — No HotChocolate dependencies in the Core layer, no business logic in the API layer
Instructions in .github/instructions/ are automatically loaded based on the applyTo pattern. To add new standards:
- Create a new
.instructions.mdfile - Define in the frontmatter which files it applies to:
---
applyTo: "**/src/**/GraphQL/**/*.cs"
---- Write the rules as clear, imperative instructions
A new skill consists of a folder under .github/skills/ with a SKILL.md file:
.github/skills/my-new-skill/
└── SKILL.md
The SKILL.md contains:
- Frontmatter with name, description, and trigger keywords
- Concrete domain knowledge with code examples from the project
- Dos and Don'ts for the specific context
Tip: Use the
skill-creatorskill to create new skills in a structured way: "Create a new skill for [domain]."
New agents are stored as .agent.md files under .github/agents/. Each agent defines:
- Persona and expertise — which area they're expert in
- Rules and conventions — specific patterns they must follow
- Workflow — how they approach tasks
Tip: Use the
agent-creatorskill to create new agents in a structured way: "Create a new agent for [domain]."
- Restart VS Code — MCP servers are initialized on startup
- Activate MCP servers — In Copilot Chat under "Select Tools" check if servers are enabled
- Check logs —
Ctrl+Shift+P→ "Output: Show Output Channel" → select "GitHub Copilot Chat" - Check
mcp.json file— Open the file and ensure configuration is correct:%APPDATA%\Code\User\mcp.json
- Make sure you're logged into GitHub and Azure DevOps in VS Code
- On first use, you'll be asked for the ADO organization name — provide it without URL prefix (e.g.,
myorg, nothttps://dev.azure.com/myorg)
The script can be run again at any time. Existing mcp.json entries are merged, not overwritten:
npm run setup-mcpThis setup gives you an AI coding agent that:
- Knows your conventions — through Instructions and Skills in the
.github/folder - Can access your tools — Azure DevOps, MongoDB, SQL Server, Microsoft Docs
- Works in a structured way — through predefined prompts for recurring workflows
- Can specialize — through agents for C#, debugging, DevOps, databases, API stitching
The key to effective work: provide context, work incrementally, validate results. The agent is a powerful tool — but you remain the architect.
After setup, verify everything works by asking these three questions in Copilot Chat (Agent Mode):
Search Microsoft Learn for "HotChocolate DataLoader best practices".
Expected: The agent uses the microsoft-learn MCP server and returns documentation results.
Review the coding standards that apply to test files in this project.
Expected: The agent references tests.instructions.md and summarizes the test conventions (xUnit, Moq, FluentAssertions, naming pattern MethodName_Scenario_ExpectedBehavior).
Break down the steps needed to add a new "Notes" property (string, optional)
to an existing entity in the Consultation service.
Expected: The agent uses sequential thinking to produce a layered plan (Abstractions → Core → DataAccess → GraphQL → Tests).
If all three produce meaningful results, your setup is working correctly.
This project is licensed under the GNU General Public License v3.0 with two Section 7 additional terms:
- Patent Grant — Contributors grant an irrevocable patent license for the Work
- Attribution Requirement (Section 7b) — The original author and source repository must be retained in all copies and derivative works:
Original Author: Andreas Karz | Source: github.com/AndreasKarz/DotNET-Developer-AI-Setup
See LICENSE for the full text.
Some skills bundled under .github/skills/ are third-party works with their own licenses:
| Skill | License | License File |
|---|---|---|
docx, pdf, pptx, xlsx |
Anthropic Proprietary | LICENSE.txt in each skill folder |
skill-creator, agent-creator, prompt-creator |
Apache License 2.0 | LICENSE.txt in each skill folder |
All other skills, agents, instructions, and prompts fall under the repository's GPLv3 + Patent Grant license.
Reviewed: All 4 instructions, 7 agents, 17 skills, 1 prompt, AGENTS.md, LICENSE Perspective: Senior Architecture Review (second-pass audit after initial review + implementation of all findings)
The .github/ agent configuration is well-architected, consistent, and ready for use as a template repository.
| Category | Status | Details |
|---|---|---|
| Trust Boundary | Centralized | Single definition in general.instructions.md, all 7 agents + AGENTS.md reference it via one-liner — zero duplication |
| Layer-Specific Instructions | Complete | 4 instruction files with correct applyTo patterns: ** (general), **/GraphQL/**/*.cs, **/Worker/**/*.cs, **/test/**/*Tests.cs |
| Agent Sizing | Appropriate | MongoDBExpert and MSSQLExpert trimmed to Quick Reference + skill pointer; no agent exceeds ~250 lines of domain-specific content |
| Skill–Agent Separation | Clean | Agents diagnose and orchestrate; skills provide implementation knowledge; no role overlap |
| Cross-References | Consistent | Delegation tables in AGENTS.md and all agents match the actual skill/agent inventory |
| License Structure | Correct | GPLv3 + Patent Grant for repo; Apache 2.0 LICENSE.txt in creator skills; Proprietary LICENSE.txt in office skills; frontmatter license field present where applicable |
| Prompt Architecture | Clean | Implement_from_PBI.prompt.md references AGENTS.md for persona — no re-declaration |
| Dependency Rules | Single Source | Layer dependency graph defined once in general.instructions.md; DebugExpert references it instead of duplicating |
- Token Efficiency — Centralized trust boundary and deduplicated layer rules keep every agent prompt lean. Agent-level context stays within ~200-250 lines of domain-specific content.
- Clear Separation of Concerns — Instructions set conventions, agents orchestrate and diagnose, skills provide deep implementation knowledge. No role bleed between the three.
- Self-Learning Agents — HotChocolateExpert and DevOpsExpert fetch latest documentation before acting, reducing stale-knowledge risk.
- Composable Design — Symlink support enables the
.github/folder to serve multiple repositories from a single source of truth. - Security Posture — Trust boundary is comprehensive (12 untrusted source categories including DB results, pipeline YAML, and GraphQL schemas), with explicit injection-detection guidance.