mirror of
https://github.com/github/awesome-copilot.git
synced 2026-04-13 11:45:56 +00:00
docs(learning-hub): sync cli-for-beginners with upstream 2026-04-03
Syncs Learning Hub mirror with upstream github/copilot-cli-for-beginners commit 6ea4d0623687e8235ceb7fa0e2be37cefd024071 (PR #43, PR #24 recovery). Changes applied: - Replace 'Copilot coding agent' with 'GitHub Copilot cloud agent' (01, 03, 05) - Add /new and /rewind commands to context management section (02) - Update context usage example to 62k/200k tokens (02) - Reorder and expand slash command reference tables (01) - Update /allow-all description to include [on|off|show] options (01) - Add /clear, /new, /rewind to Session command table (01) - Update /rename description (01) - Update context efficiency tips table with /rewind row (02) - Update best practices and summary to include new commands (01, 02) - Update demo intro text for Demo 1 (01) - Bump lastUpdated to 2026-04-03 on all modified pages Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
0c3c5bbbfb
commit
0f1ec92ac2
@@ -3,7 +3,7 @@ title: '01 · First Steps'
|
|||||||
description: 'Experience your first GitHub Copilot CLI demos and learn the three main interaction modes.'
|
description: 'Experience your first GitHub Copilot CLI demos and learn the three main interaction modes.'
|
||||||
authors:
|
authors:
|
||||||
- GitHub Copilot Learning Hub Team
|
- GitHub Copilot Learning Hub Team
|
||||||
lastUpdated: 2026-03-20
|
lastUpdated: 2026-04-03
|
||||||
---
|
---
|
||||||
|
|
||||||

|

|
||||||
@@ -70,7 +70,7 @@ Now let's see why developers are calling this "having a senior engineer on speed
|
|||||||
|
|
||||||
### Demo 1: Code Review in Seconds
|
### Demo 1: Code Review in Seconds
|
||||||
|
|
||||||
The course includes sample files with intentional code quality issues. Let's review one:
|
The course includes sample files with intentional code quality issues. If you're working on your local machine and haven't already cloned the repo, please run the `git clone` command below, navigate to the `copilot-cli-for-beginners` folder, and then run the `copilot` command.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Clone the course repository if you're working locally and haven't already
|
# Clone the course repository if you're working locally and haven't already
|
||||||
@@ -81,13 +81,13 @@ cd copilot-cli-for-beginners
|
|||||||
copilot
|
copilot
|
||||||
```
|
```
|
||||||
|
|
||||||
Once inside the interactive session:
|
Once inside the interactive Copilot CLI session, run the following:
|
||||||
|
|
||||||
```
|
```
|
||||||
> Review @samples/book-app-project/book_app.py for code quality issues and suggest improvements
|
> Review @samples/book-app-project/book_app.py for code quality issues and suggest improvements
|
||||||
```
|
```
|
||||||
|
|
||||||
> 💡 **What's the `@`?** The `@` symbol tells Copilot CLI to read a file. You'll learn all about this in Chapter 02. For now, just copy the command exactly as shown.
|
> 💡 **What's the `@` symbol used for?** The `@` symbol tells Copilot CLI to read a file. You'll learn all about this in Chapter 02. For now, just copy the command exactly as shown.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -369,11 +369,11 @@ These commands work in interactive mode. **Start with just these six** - they co
|
|||||||
|
|
||||||
| Command | What It Does | When to Use |
|
| Command | What It Does | When to Use |
|
||||||
|---------|--------------|-------------|
|
|---------|--------------|-------------|
|
||||||
| `/help` | Show all available commands | When you forget a command |
|
|
||||||
| `/clear` | Clear conversation and start fresh | When switching topics |
|
| `/clear` | Clear conversation and start fresh | When switching topics |
|
||||||
|
| `/help` | Show all available commands | When you forget a command |
|
||||||
|
| `/model` | Show or switch AI model | When you want to change the AI model |
|
||||||
| `/plan` | Plan your work out before coding | For more complex features |
|
| `/plan` | Plan your work out before coding | For more complex features |
|
||||||
| `/research` | Deep research using GitHub and web sources | When you need to investigate a topic before coding |
|
| `/research` | Deep research using GitHub and web sources | When you need to investigate a topic before coding |
|
||||||
| `/model` | Show or switch AI model | When you want to change the AI model |
|
|
||||||
| `/exit` | End the session | When you're done |
|
| `/exit` | End the session | When you're done |
|
||||||
|
|
||||||
That's it for getting started! As you become comfortable, you can explore additional commands.
|
That's it for getting started! As you become comfortable, you can explore additional commands.
|
||||||
@@ -389,20 +389,20 @@ That's it for getting started! As you become comfortable, you can explore additi
|
|||||||
|
|
||||||
| Command | What It Does |
|
| Command | What It Does |
|
||||||
|---------|--------------|
|
|---------|--------------|
|
||||||
| `/init` | Initialize Copilot instructions for your repository |
|
|
||||||
| `/agent` | Browse and select from available agents |
|
| `/agent` | Browse and select from available agents |
|
||||||
| `/skills` | Manage skills for enhanced capabilities |
|
| `/init` | Initialize Copilot instructions for your repository |
|
||||||
| `/mcp` | Manage MCP server configuration |
|
| `/mcp` | Manage MCP server configuration |
|
||||||
|
| `/skills` | Manage skills for enhanced capabilities |
|
||||||
|
|
||||||
> 💡 Skills are covered in detail in [Chapter 05](../05-skills/). MCP servers are covered in [Chapter 06](../06-mcp-servers/).
|
> 💡 Agents are covered in [Chapter 04](../04-agents-and-custom-instructions/), skills are covered in [Chapter 05](../05-skills/), and MCP servers are covered in [Chapter 06](../06-mcp-servers/).
|
||||||
|
|
||||||
### Models and Subagents
|
### Models and Subagents
|
||||||
|
|
||||||
| Command | What It Does |
|
| Command | What It Does |
|
||||||
|---------|--------------|
|
|---------|--------------|
|
||||||
| `/model` | Show or switch AI model |
|
| `/delegate` | Hand off task to GitHub Copilot cloud agent |
|
||||||
| `/delegate` | Hand off task to Copilot coding agent on GitHub (agent in the cloud) |
|
|
||||||
| `/fleet` | Split a complex task into parallel subtasks for faster completion |
|
| `/fleet` | Split a complex task into parallel subtasks for faster completion |
|
||||||
|
| `/model` | Show or switch AI model |
|
||||||
| `/tasks` | View background subagents and detached shell sessions |
|
| `/tasks` | View background subagents and detached shell sessions |
|
||||||
|
|
||||||
### Code
|
### Code
|
||||||
@@ -411,18 +411,18 @@ That's it for getting started! As you become comfortable, you can explore additi
|
|||||||
|---------|--------------|
|
|---------|--------------|
|
||||||
| `/diff` | Review the changes made in the current directory |
|
| `/diff` | Review the changes made in the current directory |
|
||||||
| `/pr` | Operate on pull requests for the current branch |
|
| `/pr` | Operate on pull requests for the current branch |
|
||||||
| `/review` | Run the code-review agent to analyze changes |
|
|
||||||
| `/research` | Run deep research investigation using GitHub and web sources |
|
| `/research` | Run deep research investigation using GitHub and web sources |
|
||||||
|
| `/review` | Run the code-review agent to analyze changes |
|
||||||
| `/terminal-setup` | Enable multiline input support (shift+enter and ctrl+enter) |
|
| `/terminal-setup` | Enable multiline input support (shift+enter and ctrl+enter) |
|
||||||
|
|
||||||
### Permissions
|
### Permissions
|
||||||
|
|
||||||
| Command | What It Does |
|
| Command | What It Does |
|
||||||
|---------|--------------|
|
|---------|--------------|
|
||||||
| `/allow-all` | Auto-approve all permission prompts for this session |
|
|
||||||
| `/add-dir <directory>` | Add a directory to allowed list |
|
| `/add-dir <directory>` | Add a directory to allowed list |
|
||||||
| `/list-dirs` | Show all allowed directories |
|
| `/allow-all [on|off|show]` | Auto-approve all permission prompts; use `on` to enable, `off` to disable, `show` to check current status |
|
||||||
| `/cwd`, `/cd [directory]` | View or change working directory |
|
| `/cwd`, `/cd [directory]` | View or change working directory |
|
||||||
|
| `/list-dirs` | Show all allowed directories |
|
||||||
|
|
||||||
> ⚠️ **Use with caution**: `/allow-all` skips confirmation prompts. Great for trusted projects, but be careful with untrusted code.
|
> ⚠️ **Use with caution**: `/allow-all` skips confirmation prompts. Great for trusted projects, but be careful with untrusted code.
|
||||||
|
|
||||||
@@ -430,21 +430,24 @@ That's it for getting started! As you become comfortable, you can explore additi
|
|||||||
|
|
||||||
| Command | What It Does |
|
| Command | What It Does |
|
||||||
|---------|--------------|
|
|---------|--------------|
|
||||||
| `/resume` | Switch to a different session (optionally specify session ID) |
|
| `/clear` | Abandons the current session (no history saved) and starts a fresh conversation |
|
||||||
| `/rename` | Rename the current session |
|
| `/compact` | Summarize conversation to reduce context usage |
|
||||||
| `/context` | Show context window token usage and visualization |
|
| `/context` | Show context window token usage and visualization |
|
||||||
|
| `/new` | Ends the current session (saving it to history for search/resume) and starts a fresh conversation |
|
||||||
|
| `/resume` | Switch to a different session (optionally specify session ID) |
|
||||||
|
| `/rename` | Rename the current session (omit the name to auto-generate one) |
|
||||||
|
| `/rewind` | Open a timeline picker to roll back to any earlier point in the conversation |
|
||||||
| `/usage` | Display session usage metrics and statistics |
|
| `/usage` | Display session usage metrics and statistics |
|
||||||
| `/session` | Show session info and workspace summary |
|
| `/session` | Show session info and workspace summary |
|
||||||
| `/compact` | Summarize conversation to reduce context usage |
|
|
||||||
| `/share` | Export session as markdown file or GitHub gist |
|
| `/share` | Export session as markdown file or GitHub gist |
|
||||||
|
|
||||||
### Help and Feedback
|
### Help and Feedback
|
||||||
|
|
||||||
| Command | What It Does |
|
| Command | What It Does |
|
||||||
|---------|--------------|
|
|---------|--------------|
|
||||||
| `/help` | Show all available commands |
|
|
||||||
| `/changelog` | Display changelog for CLI versions |
|
| `/changelog` | Display changelog for CLI versions |
|
||||||
| `/feedback` | Submit feedback to GitHub |
|
| `/feedback` | Submit feedback to GitHub |
|
||||||
|
| `/help` | Show all available commands |
|
||||||
| `/theme` | View or set terminal theme |
|
| `/theme` | View or set terminal theme |
|
||||||
|
|
||||||
### Quick Shell Commands
|
### Quick Shell Commands
|
||||||
@@ -629,7 +632,7 @@ The examples used `/plan` for a search feature and `-p` for batch reviews. Now t
|
|||||||
1. **Interactive mode** is for exploration and iteration - context carries forward. It's like having a conversation with someone who remembers what you've said up to that point.
|
1. **Interactive mode** is for exploration and iteration - context carries forward. It's like having a conversation with someone who remembers what you've said up to that point.
|
||||||
2. **Plan mode** is normally for more involved tasks. Review before implementation.
|
2. **Plan mode** is normally for more involved tasks. Review before implementation.
|
||||||
3. **Programmatic mode** is for automation. No interaction needed.
|
3. **Programmatic mode** is for automation. No interaction needed.
|
||||||
4. **Four essential commands** (`/help`, `/clear`, `/plan`, `/exit`) cover most daily use.
|
4. **Essential commands** (`/help`, `/clear`, `/plan`, `/research`, `/model`, `/exit`) cover most daily use.
|
||||||
|
|
||||||
> 📋 **Quick Reference**: See the [GitHub Copilot CLI command reference](https://docs.github.com/en/copilot/reference/cli-command-reference) for a complete list of commands and shortcuts.
|
> 📋 **Quick Reference**: See the [GitHub Copilot CLI command reference](https://docs.github.com/en/copilot/reference/cli-command-reference) for a complete list of commands and shortcuts.
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ title: '02 · Context and Conversations'
|
|||||||
description: 'Learn how to give Copilot CLI richer context and build stronger multi-turn conversations.'
|
description: 'Learn how to give Copilot CLI richer context and build stronger multi-turn conversations.'
|
||||||
authors:
|
authors:
|
||||||
- GitHub Copilot Learning Hub Team
|
- GitHub Copilot Learning Hub Team
|
||||||
lastUpdated: 2026-03-20
|
lastUpdated: 2026-04-03
|
||||||
---
|
---
|
||||||
|
|
||||||

|

|
||||||
@@ -338,19 +338,27 @@ copilot
|
|||||||
|
|
||||||
### Check and Manage Context
|
### Check and Manage Context
|
||||||
|
|
||||||
As you add files and conversation, Copilot CLI's [context window](https://github.com/github/copilot-cli-for-beginners/blob/main/GLOSSARY.md#context-window) fills up. Two commands help you stay in control:
|
As you add files and conversation, Copilot CLI's [context window](https://github.com/github/copilot-cli-for-beginners/blob/main/GLOSSARY.md#context-window) fills up. Several commands are available to help you stay in control:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
copilot
|
copilot
|
||||||
|
|
||||||
> /context
|
> /context
|
||||||
Context usage: 45,000 / 128,000 tokens (35%)
|
Context usage: 62k/200k tokens (31%)
|
||||||
|
|
||||||
> /clear
|
> /clear
|
||||||
# Wipes context and starts fresh. Use when switching topics
|
# Abandons the current session (no history saved) and starts a fresh conversation
|
||||||
|
|
||||||
|
> /new
|
||||||
|
# Ends the current session (saving it to history for search/resume) and starts a fresh conversation
|
||||||
|
|
||||||
|
> /rewind
|
||||||
|
# Opens a timeline picker allowing you to roll back to an earlier point in your conversation
|
||||||
```
|
```
|
||||||
|
|
||||||
> 💡 **When to use `/clear`**: If you've been reviewing `books.py` and want to switch to discussing `utils.py`, run `/clear` first. Otherwise stale context from the old topic may confuse responses.
|
> 💡 **When to use `/clear` or `/new`**: If you've been reviewing `books.py` and want to switch to discussing `utils.py`, run `/new` first (or `/clear` if you don't need the session history). Otherwise stale context from the old topic may confuse responses.
|
||||||
|
|
||||||
|
> 💡 **Made a mistake or want to try a different approach?** Use `/rewind` (or press Esc twice) to open a **timeline picker** that lets you roll back to any earlier point in your conversation, not just the most recent one. This is useful when you went down the wrong path and want to backtrack without starting over entirely.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -567,15 +575,16 @@ copilot
|
|||||||
| Situation | Action | Why |
|
| Situation | Action | Why |
|
||||||
|-----------|--------|-----|
|
|-----------|--------|-----|
|
||||||
| Starting new topic | `/clear` | Removes irrelevant context |
|
| Starting new topic | `/clear` | Removes irrelevant context |
|
||||||
|
| Went down wrong path | `/rewind` | Roll back to any earlier point |
|
||||||
| Long conversation | `/compact` | Summarizes history, frees tokens |
|
| Long conversation | `/compact` | Summarizes history, frees tokens |
|
||||||
| Need specific file | `@file.py` not `@folder/` | Loads only what you need |
|
| Need specific file | `@file.py` not `@folder/` | Loads only what you need |
|
||||||
| Hitting limits | Start new session | Fresh 128K context |
|
| Hitting limits | `/new` or `/clear` | Fresh context |
|
||||||
| Multiple topics | Use `/rename` per topic | Easy to resume right session |
|
| Multiple topics | Use `/rename` per topic | Easy to resume right session |
|
||||||
|
|
||||||
#### Best Practices for Large Codebases
|
#### Best Practices for Large Codebases
|
||||||
|
|
||||||
1. **Be specific**: `@samples/book-app-project/books.py` instead of `@samples/book-app-project/`
|
1. **Be specific**: `@samples/book-app-project/books.py` instead of `@samples/book-app-project/`
|
||||||
2. **Clear between topics**: Use `/clear` when switching focus
|
2. **Clear context between topics**: Use `/new` or `/clear` when switching focus
|
||||||
3. **Use `/compact`**: Summarize conversation to free up context
|
3. **Use `/compact`**: Summarize conversation to free up context
|
||||||
4. **Use multiple sessions**: One session per feature or topic
|
4. **Use multiple sessions**: One session per feature or topic
|
||||||
|
|
||||||
@@ -854,7 +863,7 @@ copilot --add-dir /path/to/directory
|
|||||||
1. **`@` syntax** gives Copilot CLI context about files, directories, and images
|
1. **`@` syntax** gives Copilot CLI context about files, directories, and images
|
||||||
2. **Multi-turn conversations** build on each other as context accumulates
|
2. **Multi-turn conversations** build on each other as context accumulates
|
||||||
3. **Sessions auto-save**: use `--continue` or `--resume` to pick up where you left off
|
3. **Sessions auto-save**: use `--continue` or `--resume` to pick up where you left off
|
||||||
4. **Context windows** have limits: manage them with `/context`, `/clear`, and `/compact`
|
4. **Context windows** have limits: manage them with `/clear`, `/compact`, `/context`, `/new`, and `/rewind`
|
||||||
5. **Permission flags** (`--add-dir`, `--allow-all`) control multi-directory access. Use them wisely!
|
5. **Permission flags** (`--add-dir`, `--allow-all`) control multi-directory access. Use them wisely!
|
||||||
6. **Image references** (`@screenshot.png`) help debug UI issues visually
|
6. **Image references** (`@screenshot.png`) help debug UI issues visually
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ title: '03 · Development Workflows'
|
|||||||
description: 'Mirror the source development workflow chapter covering review, debugging, testing, and git support.'
|
description: 'Mirror the source development workflow chapter covering review, debugging, testing, and git support.'
|
||||||
authors:
|
authors:
|
||||||
- GitHub Copilot Learning Hub Team
|
- GitHub Copilot Learning Hub Team
|
||||||
lastUpdated: 2026-03-20
|
lastUpdated: 2026-04-03
|
||||||
---
|
---
|
||||||
|
|
||||||

|

|
||||||
@@ -667,7 +667,7 @@ $(git diff main..HEAD)"
|
|||||||
|
|
||||||
### Using /delegate for Background Tasks
|
### Using /delegate for Background Tasks
|
||||||
|
|
||||||
The `/delegate` command hands off work to the Copilot coding agent on GitHub. Use the `/delegate` slash command (or the `&` shortcut) to offload a well-defined task to a background agent.
|
The `/delegate` command hands off work to the GitHub Copilot cloud agent. Use the `/delegate` slash command (or the `&` shortcut) to offload a well-defined task to a background agent.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
copilot
|
copilot
|
||||||
|
|||||||
@@ -3,14 +3,14 @@ title: '05 · Automate Repetitive Tasks'
|
|||||||
description: 'Mirror the source chapter on skills that load automatically for repeated GitHub Copilot CLI workflows.'
|
description: 'Mirror the source chapter on skills that load automatically for repeated GitHub Copilot CLI workflows.'
|
||||||
authors:
|
authors:
|
||||||
- GitHub Copilot Learning Hub Team
|
- GitHub Copilot Learning Hub Team
|
||||||
lastUpdated: 2026-03-20
|
lastUpdated: 2026-04-03
|
||||||
---
|
---
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
> **What if Copilot could automatically apply your team's best practices without you having to explain them every time?**
|
> **What if Copilot could automatically apply your team's best practices without you having to explain them every time?**
|
||||||
|
|
||||||
In this chapter, you'll learn about Agent Skills: folders of instructions that Copilot automatically loads when relevant to your task. While agents change *how* Copilot thinks, skills teach Copilot *specific ways to complete tasks*. You'll create a security audit skill that Copilot applies whenever you ask about security, build team-standard review criteria that ensure consistent code quality, and learn how skills work across Copilot CLI, VS Code, and the Copilot coding agent.
|
In this chapter, you'll learn about Agent Skills: folders of instructions that Copilot automatically loads when relevant to your task. While agents change *how* Copilot thinks, skills teach Copilot *specific ways to complete tasks*. You'll create a security audit skill that Copilot applies whenever you ask about security, build team-standard review criteria that ensure consistent code quality, and learn how skills work across Copilot CLI, VS Code, and the GitHub Copilot cloud agent.
|
||||||
|
|
||||||
|
|
||||||
## 🎯 Learning Objectives
|
## 🎯 Learning Objectives
|
||||||
|
|||||||
Reference in New Issue
Block a user