Skip to content

Microsoft GitHub Copilot

Source: My personal notes from Microsoft training sessions in 2025, 2026

Use case: Doing computer programming with an assistant.

Using AI to improve productivity with code summaries, analysis, generation, and other methods.

Create documentation: Write an architecture markdown file describing the project and its code.

Improve code: Improve the user interface of the application to modernize the interface.

Testing: Write a test case

Troubleshooting: Analyze this code and error for solution options.

Inquiry: Ask questions on code, documentation

  • Selection of different models depending on purpose and trying different responses
  • Code completion
  • Chat - discussions with agent
    • Create code, make changes
    • Assess application, tests/looks at it, do code, test, and submit pull request for review
    • Ask to execute tasks, assign tasks to Copilot in GitHub and it can do pull requests:
    • Ask, edit, agent task execution, plan
  • Provide system prompt in instructions for AI to always follow

Instructions for Using Microsoft GitHub Copilot

Section titled “Instructions for Using Microsoft GitHub Copilot”

Source: GitHub Copilot documentation, What is GitHub Copilot? - GitHub Enterprise Cloud Docs

Github (Enterprise) Copilot user settings and other instructions: GitHub Copilot Settings

For GitHub Enterprise, when prompted to login, choose GitHub Enterprise login.

  • Try accessing it, for example inside Visual Studio / Visual Studio Code or tool of your choice.
  • If using Visual Studio, it can look like a different account than the account used by Visual Studio.

For example, using VS Code, install VS Code and the GitHub Copilot extension, then use sign into GitHub account.

Multiple models are available for Copilot users. Example: Gemini, OpenAI models like GPT, Anthropic. Pricing and quotes will vary on better models and request types.

To see models context size and capabilities, see AI model comparison - GitHub Copilot Docs or in VS Code “Manage Models” function with models.

Also see for other AI Models - AI Models for possible use with CLI.

Demonstration of Use Case of Building an Application

Section titled “Demonstration of Use Case of Building an Application”

Main article: GitHub Copilot, Building a Full Stack Application - GitHub Copilot, Building a Full Stack Application

Use principles from AI Prompts - AI Prompts to give instructions to Copilot.

Examples on an existing repository with a Calculator

Section titled “Examples on an existing repository with a Calculator”

Create architecture documentation and diagrams in mermaid for this repository.

The web app looks outdated. Modernize the app and make it stylish by adding different themes. Add more functionality to the app like scientific calculator functions.

Add a custom instructions file in repository to set up themes and developer preferences and standards.

Main article: GitHub Copilot Workspace Index and Retrieval Augmented Generation (RAG) - GitHub Copilot Workspace Index and Retrieval Augmented Generation (RAG)

GitHub Copilot can index files in a workspace for use with prompts, search, and for use as context.

Instructions, Skills, Agents, Model Context Protocol (MCP), CLI

Section titled “Instructions, Skills, Agents, Model Context Protocol (MCP), CLI”

Source: GitHub - haslam93/FY26—Advanced-GitHub-Copilot-Workshop: Advanced GitHub Copilot workshop covering Advanced Topics · GitHub

Provide instructions to copilot using .github/copilot-instructions.md and AGENTS.md. In VS Code, can use provide instructions function.

Include:

  • Language and runtime
  • Naming conventions
  • Architecture
  • Requirements (Security, documentation standards)
  • Restrictions of specific files like apply only to certain type of files (example *.java files)

Copilot also respect Claude code files and configurations like .claude/rules

  1. Prompt files

    Saved as .github/*.prompt.md

    Instructions for specific things like code review, new developer review. In VS Code GitHub Copilot chat, reference using /prompt-file

Custom agents for tasks like documentation, research, DevOps and others can be created at .github/agents. They are natural language instructions for tasks and assigned tools and resources to access. Example custom agent files are at awesome-copilot/agents at main · github/awesome-copilot · GitHub or build your own.

Provides Copilot with additional functionality like programming language files like Python to do work for specific tasks. Example is creating presentations in HTML and PowerPoint.

Use case: for tasks that can be executed reliably by an agent and it has clear steps and required input and output.

Example: Write an issue and draft pull request for git repository.

Can interact with external resources to do tasks for you and needs to be secured using MCP.

In VS Code, need to install local MCP servers for use by the agent and remote MCP servers can be used.

Examples: interact with JIRA tickets, work on Azure resources, use websites (use playwright MCP server), test an application

Run with copilot, can be run interactively and as single command with single task and output/results.

CLI can be configured. During use, can select model and configure it.

  1. Features

    • Autopilot: With a requirement, CLI does many tasks until it believes outcome is complete.
    • /fleet can use multiple models depending on prompt
    • Other local and open source models can be used with CLI

Keep instructions concise and include detailed instructions in prompt files instead

Source: GitHub - haslam93/FY26—Advanced-GitHub-Copilot-Workshop: Advanced GitHub Copilot workshop covering Advanced Topics · GitHub

VS Code has extensions for .NET and Java Upgrade Assistance with Copilot. More powerful than individual prompts since it plans changes.

Analyze code and determine possible test cases and code coverage. For specified pages and components, write integration/unit tests and ensure accessibility requirements.

Example: Playwright user interface testing using MCP.

In VS Code, can use database extensions like SQL Server (mssql). It has tools like analyzing a database and running queries. Copilot can access these tools; however, be careful due to modification and good practice is use AI assistance on database only in a non-production environment.

  • Reviewing changes, pull requests
  • Optimize code or make suggestions
  • GitHub.com agents can help with code review, tests, fixes, branches and commits
  1. Prompts, Configurations, Agents