Skip to content

Commit a8a3edd

Browse files
GeekTrainerCopilot
andcommitted
refactor: reorder VS Code path with MCP first and split cloud agent into its own path
VS Code now leads with MCP, then custom instructions, then agent mode, matching how authors recommend learners experience the tooling. - vscode/1-mcp.mdx + vscode/2-custom-instructions.mdx replace the previous 1-custom-instructions / 2-mcp ordering - Renumber 5-custom-agents → 4, 6-managing-agents → 5, 7-iterating → 6 - Drop vscode/4-cloud-agent.mdx and the shared/cloud-agent/* stubs; cloud agent now lives exclusively in the cloud/ path - Update prose nav strips, ref-link labels, sidebar in astro.config.mjs, landing page exercise tables, and shared/0-prereqs.mdx next-vscode - Update vscode/3-agent-mode.mdx and cloud/2-cloud-agent.mdx to use npm install / npm run dev instead of the retired start-app.sh - Replace the agent-mode-dropdown screenshot with a chat-mode-selector image to match current VS Code UI - Refresh per-lesson body content across cli/, cloud/, and vscode/ to align with the new structure and partials Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 639df45 commit a8a3edd

30 files changed

Lines changed: 1185 additions & 1223 deletions

docs/astro.config.mjs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,12 @@ export default defineConfig({
3030
label: 'VS Code path',
3131
items: [
3232
{ label: 'Overview', link: '/vscode/' },
33-
{ label: '1. Custom instructions', link: '/vscode/1-custom-instructions/' },
34-
{ label: '2. MCP with VS Code', link: '/vscode/2-mcp/' },
33+
{ label: '1. MCP with VS Code', link: '/vscode/1-mcp/' },
34+
{ label: '2. Custom instructions', link: '/vscode/2-custom-instructions/' },
3535
{ label: '3. Agent mode', link: '/vscode/3-agent-mode/' },
36-
{ label: '4. Cloud agent', link: '/vscode/4-cloud-agent/' },
37-
{ label: '5. Custom agents', link: '/vscode/5-custom-agents/' },
38-
{ label: '6. Managing agents', link: '/vscode/6-managing-agents/' },
39-
{ label: '7. Iterating', link: '/vscode/7-iterating/' },
36+
{ label: '4. Custom agents', link: '/vscode/4-custom-agents/' },
37+
{ label: '5. Managing agents', link: '/vscode/5-managing-agents/' },
38+
{ label: '6. Iterating', link: '/vscode/6-iterating/' },
4039
],
4140
},
4241
{

docs/src/content/docs/cli/1-install-copilot-cli.mdx

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,29 @@ title: "Exercise 1 - Installing GitHub Copilot CLI"
44

55
import { Aside } from '@astrojs/starlight/components';
66

7-
[GitHub Copilot CLI][about-copilot-cli] is a powerful agentic coding assistant that runs in your terminal, enabling you to explore codebases, generate code, run commands, and interact with external tools - all from the command line.
8-
9-
## Scenario
10-
11-
Tailspin Toys is a nascent organization with a website that's lacking in many features. Their backlog is continuing to grow, and there's a strong demand to grow. To aid the developers, they want to begin utilizing AI agents through Copilot CLI. This will allow developers to be more productive, as they can focus on the bigger picture while moving faster. The first step to doing this is, of course, to install Copilot CLI!
7+
[GitHub Copilot CLI][about-copilot-cli] is a powerful agentic coding assistant that runs in your terminal, enabling you to explore codebases, generate code, run commands, and interact with external tools - all from the command line. It allows you to offload tasks, request changes, and stay in the zone. The first step, as you might imagine, is to install the tool! Fortunately this can be done using tools you're already familiar with.
128

139
In this exercise, you will learn how to:
1410

1511
- install GitHub Copilot CLI using npm.
1612
- authenticate with your GitHub account.
1713
- verify the installation.
1814

15+
## Scenario
16+
17+
Your team is starting to use AI agents to work through a growing backlog. Copilot CLI brings that capability into the terminal, where many developers already live. This exercise gets you installed, authenticated, and ready to use it for the rest of the workshop.
18+
1919
## Open a terminal in your codespace
2020

21-
Before installing Copilot CLI, you need to open a terminal window in VS Code.
21+
Before installing Copilot CLI, you need to open a terminal window in your codespace.
2222

2323
1. Return to your codespace if you're not already there.
2424
2. Open a terminal window by pressing <kbd>Ctrl</kbd>+<kbd>\`</kbd>.
2525
3. You should see a terminal panel appear at the bottom of your VS Code window.
2626

2727
## Install Copilot CLI
2828

29-
GitHub Codespaces come with Node.js pre-installed, so you can use npm to install Copilot CLI globally.
29+
You can install Copilot CLI through [npm][install-npm], [WinGet][install-winget], and [Homebrew][install-homebrew]. Since GitHub Codespaces come with Node.js pre-installed you'll use npm to install Copilot CLI.
3030

3131
1. In the terminal, verify Node.js is installed and meets the version requirement:
3232

@@ -36,7 +36,7 @@ GitHub Codespaces come with Node.js pre-installed, so you can use npm to install
3636

3737
You should see version 22 or higher (e.g., `v22.x.x`).
3838

39-
2. Install Copilot CLI globally using npm:
39+
2. Install Copilot CLI globally in the codespace using npm:
4040

4141
```bash
4242
npm install -g @github/copilot
@@ -48,7 +48,7 @@ GitHub Codespaces come with Node.js pre-installed, so you can use npm to install
4848
copilot --version
4949
```
5050

51-
You should see the version number displayed (e.g., `v0.0.393`).
51+
You should see the version number displayed (e.g., `v1.0.XX`).
5252

5353
<Aside type="tip">
5454
If you encounter permission errors, you may need to use `sudo npm install -g @github/copilot` on some systems. However, this shouldn't be necessary in GitHub Codespaces.
@@ -97,6 +97,12 @@ Now that you're at the Copilot CLI prompt for the first time, let's trust this w
9797
/help
9898
```
9999

100+
6. Exit Copilot CLI by entering the following command in the terminal. We will return back to Copilot CLI in a future exercise!
101+
102+
```
103+
exit
104+
```
105+
100106
## Summary and next steps
101107

102108
Congratulations! You've successfully installed and authenticated GitHub Copilot CLI. You learned how to:
@@ -117,5 +123,8 @@ Now that Copilot CLI is installed, let's see how it picks up your repository's c
117123
[previous-lesson]: ../../shared/0-prereqs/
118124
[next-lesson]: ../2-custom-instructions/
119125
[install-copilot-cli]: https://docs.github.com/copilot/how-tos/set-up/install-copilot-cli
126+
[install-npm]: https://docs.github.com/copilot/how-tos/copilot-cli/set-up-copilot-cli/install-copilot-cli#installing-with-npm-all-platforms
127+
[install-winget]: https://docs.github.com/copilot/how-tos/copilot-cli/set-up-copilot-cli/install-copilot-cli#installing-with-winget-windows
128+
[install-homebrew]: https://docs.github.com/copilot/how-tos/copilot-cli/set-up-copilot-cli/install-copilot-cli#installing-with-homebrew-macos-and-linux
120129
[about-copilot-cli]: https://docs.github.com/copilot/concepts/agents/about-copilot-cli
121130
[using-copilot-cli]: https://docs.github.com/copilot/how-tos/use-copilot-agents/use-copilot-cli

docs/src/content/docs/cli/2-custom-instructions.mdx

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,42 @@ title: "Exercise 2 - Custom instructions (Copilot CLI)"
33
---
44

55
import { Aside } from '@astrojs/starlight/components';
6-
import InstructionsOverview from '../_partials/section-instructions-overview.mdx';
7-
import AddDocstringInstructions from '../_partials/exercise-instructions-add-docstring.mdx';
8-
import StartCopilotCli from '../_partials/callout-start-copilot-cli.mdx';
6+
import SectionInstructionsOverview from '@partials/section-instructions-overview.mdx';
7+
import ExerciseExploreInstructionsFiles from '@partials/exercise-explore-instructions-files.mdx';
8+
import ExerciseInstructionsAddDocstring from '@partials/exercise-instructions-add-docstring.mdx';
9+
import CalloutStartCopilotCli from '@partials/callout-start-copilot-cli.mdx';
910

1011
[← Previous lesson: Install Copilot CLI][previous-lesson] · [Next lesson: MCP with CLI →][next-lesson]
1112

12-
Context is key when working with generative AI. If a task needs to be done a particular way — or there's background information Copilot should know — you want to make sure that context is reachable. [Instruction files][instruction-files] are how you provide that guidance, so Copilot understands not just *what* you want it to do but *how* you want it done.
13-
14-
Now that Copilot CLI is installed, you'll see those instruction files in action.
13+
Context is key when working with generative AI. If a task needs to be done a particular way — or there's background information Copilot should know — you want to make sure that context is available. There are several tools available to you to help Copilot, which we'll explore throughout this workshop. We're going to start with [instruction files][instruction-files], which are typically focused on how the code itself should be structured. This helps Copilot understand not just *what* code you want but *how* it should be structured.
1514

1615
In this exercise, you will:
1716

1817
- explore how project-specific context, coding guidelines, and documentation standards reach Copilot through repository custom instructions and path-scoped instruction files,
1918
- send a code-generation prompt to Copilot CLI with the *current* instructions in place,
20-
- add a new repository-wide standard to **`.github/copilot-instructions.md`**,
19+
- add a new repository-wide standard to `.github/copilot-instructions.md`,
2120
- re-run the same prompt and watch the regenerated code adopt the new standard.
2221

2322
<Aside type="caution">
2423
Generated code may diverge from some of the standards you set. Copilot is non-deterministic. The goal is to see the *trend* in behavior change after updating the instructions, not to match output character-for-character.
2524
</Aside>
2625

27-
<InstructionsOverview />
26+
## Instruction files
27+
28+
<SectionInstructionsOverview />
29+
30+
## Explore the custom instructions files in this project
31+
32+
<ExerciseExploreInstructionsFiles />
2833

29-
## Before you begin the hands-on
34+
## Create a branch
3035

3136
You'll be making code changes, so create a branch to work in.
3237

3338
1. From your codespace terminal, create and switch to a new branch:
3439

3540
```bash
36-
git checkout -b custom-instructions-cli
41+
git checkout -b update-custom-instructions
3742
```
3843

3944
2. Confirm Copilot CLI is installed and authenticated:
@@ -46,20 +51,20 @@ You'll be making code changes, so create a branch to work in.
4651

4752
## Use Copilot CLI *before* updating the instructions
4853

49-
<StartCopilotCli />
50-
5154
To see the impact of custom instructions, start by generating code with the current instructions in place. Later, you'll update the file and re-run the same prompt.
5255

53-
1. Make sure your Copilot CLI session is running from the **repository root** so it picks up **`.github/copilot-instructions.md`** automatically.
56+
<CalloutStartCopilotCli />
57+
58+
1. Make sure your Copilot CLI session is running from the **repository root** so it picks up `.github/copilot-instructions.md` automatically.
5459
2. At the Copilot CLI prompt, ask it to generate the publishers endpoint:
5560

5661
```plaintext
5762
Create a new endpoint at server/routes/publishers.py to return a list of all publishers. It should return the name and id for all publishers. Do not run the tests yet.
5863
```
5964

6065
3. Copilot CLI will explore the project, propose a plan, and (with your approval) write the file. Approve the file write when prompted.
61-
4. Open the generated **`server/routes/publishers.py`** in your editor.
62-
5. Notice the function signatures use [type hints][python-type-hints] — that's coming from a directive already in **`.github/copilot-instructions.md`**.
66+
4. Open the generated `server/routes/publishers.py` in your editor.
67+
5. Notice the function signatures use [type hints][python-type-hints] — that's coming from a directive already in `.github/copilot-instructions.md`.
6368
6. Notice the generated code **is missing** docstrings and a file-level comment header.
6469

6570
<Aside type="caution">
@@ -68,7 +73,7 @@ To see the impact of custom instructions, start by generating code with the curr
6873

6974
## Add a new repository standard
7075

71-
<AddDocstringInstructions />
76+
<ExerciseInstructionsAddDocstring />
7277

7378
## Re-run the prompt and observe the change
7479

@@ -81,7 +86,7 @@ Now that the instructions have a docstring rule, ask Copilot CLI to update the p
8186
Update server/routes/publishers.py to follow the latest documentation conventions in .github/copilot-instructions.md.
8287
```
8388

84-
3. Approve the file edit when prompted, then reopen **`server/routes/publishers.py`**.
89+
3. Approve the file edit when prompted, then reopen `server/routes/publishers.py`.
8590
4. Notice that the file now opens with a comment block similar to:
8691

8792
```python
@@ -102,16 +107,14 @@ Now that the instructions have a docstring rule, ask Copilot CLI to update the p
102107
"""
103108
```
104109

105-
6. Leave the generated file in place — there's no harm in keeping it, and you'll build on this work in a later exercise.
106-
107-
You just steered Copilot CLI to follow a new project standard with a single line of markdown — no flags, no plugins, no MCP servers. That's the power of repository custom instructions.
110+
6. Leave the generated file in place — you'll build on this work in a later exercise.
108111

109112
## Summary and next steps
110113

111114
You explored how Copilot picks up context from instruction files in this project, then used Copilot CLI to:
112115

113116
- generate a Flask endpoint with the *existing* instructions,
114-
- add a new repository-wide standard to **`.github/copilot-instructions.md`**,
117+
- add a new repository-wide standard to `.github/copilot-instructions.md`,
115118
- re-run the same prompt and watch the regenerated code adopt the new standard.
116119

117120
Next, you'll extend Copilot CLI's reach beyond the repo by [connecting to MCP servers][next-lesson] so it can talk to GitHub and other external systems.
@@ -125,7 +128,7 @@ Next, you'll extend Copilot CLI's reach beyond the repo by [connecting to MCP se
125128

126129
[previous-lesson]: ../1-install-copilot-cli/
127130
[next-lesson]: ../3-mcp/
128-
[instruction-files]: https://docs.github.com/en/copilot/customizing-copilot/about-customizing-github-copilot-chat-responses
131+
[instruction-files]: https://docs.github.com/copilot/customizing-copilot/about-customizing-github-copilot-chat-responses
129132
[python-type-hints]: https://docs.python.org/3/library/typing.html
130133
[instructions-best-practices]: https://docs.github.com/enterprise-cloud@latest/copilot/using-github-copilot/coding-agent/best-practices-for-using-copilot-to-work-on-tasks#adding-custom-instructions-to-your-repository
131134
[copilot-instructions-five-tips]: https://github.blog/ai-and-ml/github-copilot/5-tips-for-writing-better-custom-instructions-for-copilot/

docs/src/content/docs/cli/3-mcp.mdx

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,42 @@ title: "Exercise 3 - MCP Servers with GitHub Copilot CLI"
33
---
44

55
import { Aside } from '@astrojs/starlight/components';
6-
import StartCopilotCli from '../_partials/callout-start-copilot-cli.mdx';
7-
import McpOverview from '../_partials/section-mcp-overview.mdx';
6+
import CalloutStartCopilotCli from '@partials/callout-start-copilot-cli.mdx';
7+
import SectionMcpOverview from '@partials/section-mcp-overview.mdx';
88

99
There's more to writing code than just writing code. Issues need to be filed, external services need to be called, and information needs to be gathered. Typically this involves interacting with external tools, which can break a developer's flow. Through the power of Model Context Protocol (MCP), you can access all of this functionality right from Copilot CLI!
1010

11-
## Scenario
12-
13-
You are a part-time developer for Tailspin Toys - a crowdfunding platform for board games with a developer theme. You've been assigned various tasks to introduce new functionality to the website. Being a good team member, you want to file issues to track your work. To help future you, you've decided to enlist the help of Copilot. You will set up your backlog of work for the rest of the lab, using GitHub Copilot CLI and the GitHub Model Context Protocol (MCP) server to create the issues for you.
14-
1511
In this exercise, you will:
1612

1713
- understand what Model Context Protocol (MCP) is and how it works with Copilot CLI.
1814
- set up the GitHub MCP server in your repository.
1915
- use GitHub Copilot CLI to create issues in your repository.
2016

21-
By the end of this exercise, you will have created a backlog of GitHub issues for use throughout the remainder of the lab.
17+
## Scenario
18+
19+
You've been assigned various tasks to introduce new functionality to the website. Being a good team member, you want to file issues to track your work. To help future you, you've decided to enlist the help of Copilot. You will set up your backlog of work for the rest of the lab, using GitHub Copilot CLI and the GitHub Model Context Protocol (MCP) server to create the issues for you.
2220

2321
## What is Model Context Protocol (MCP)?
2422

25-
<McpOverview />
23+
<SectionMcpOverview />
24+
25+
26+
You can register MCP servers for Copilot CLI to use in a couple of locations. These allow you to both ensure the right MCP servers are available for a project, and to always have access to the ones you use frequently across all projects.
27+
28+
| Location | Access | Editing |
29+
| --- | --- | --- |
30+
| `<project-root>/.mcp.json` | Available to the current project. Becomes an asset in the project. | Manually update the file |
31+
| `~/.copilot/mcp.json` | Always available when you're using Copilot CLI on that system. | Manually update the file or through Copilot CLI directly by using `--mcp` or `/mcp` |
32+
33+
<Aside type="note">
34+
Copilot CLI always includes a readonly instance of the GitHub MCP server. In the next exercise you will register the full version to be able to create issues for your project.
35+
</Aside>
2636

2737
## Setting up the GitHub MCP server in Copilot CLI
2838

29-
<StartCopilotCli />
39+
Let's register the read/write GitHub MCP server for Copilot CLI.
3040

31-
Copilot CLI supports MCP servers via a configuration file at **~/.copilot/mcp.json**. Additionally, in your project the **.vscode/mcp.json** file can configure MCP servers for VS Code-based workflows, and Copilot CLI also reads from this file.
41+
<CalloutStartCopilotCli />
3242

3343
1. Register the GitHub MCP server in Copilot CLI using the `/mcp` command:
3444

@@ -47,7 +57,7 @@ You should see the GitHub MCP server listed and marked as active.
4757

4858
## Creating a backlog of tasks
4959

50-
Now that you have set up the GitHub MCP server, you can use Copilot CLI to create a backlog of tasks for use in the rest of the lab.
60+
Now that you have set up the full GitHub MCP server, you can use Copilot CLI to create a backlog of tasks for use in the rest of the workshop.
5161

5262
1. In the Copilot CLI prompt, type or paste the following prompt to create the issues you'll be working on in the lab:
5363

0 commit comments

Comments
 (0)