From c42bed92d78cd9d0bb06f4d1e20d8f2fe8d947bd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 11:04:43 +0000 Subject: [PATCH] sync: update cli-for-beginners mirror from upstream (2026-04-22) Chapter 01: add /statusline Display section, Auto model tip, copilot --autopilot note, /share HTML export Chapter 03: update Bug Fix Workflow with git add step and commit step 6 Chapter 05: replace manual skill copy with gh skill install command Source: github/copilot-cli-for-beginners commits 68e67e78, a0962a17, 2c16bcc0, feab3fbc, 96cb6fd0, f163532f Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../01-setup-and-first-steps.md | 18 +++++++---- .../03-development-workflows.md | 30 ++++++++++++++----- .../cli-for-beginners/05-skills.md | 20 ++++++------- 3 files changed, 45 insertions(+), 23 deletions(-) diff --git a/website/src/content/docs/learning-hub/cli-for-beginners/01-setup-and-first-steps.md b/website/src/content/docs/learning-hub/cli-for-beginners/01-setup-and-first-steps.md index 42cce797e..4a276ae4c 100644 --- a/website/src/content/docs/learning-hub/cli-for-beginners/01-setup-and-first-steps.md +++ b/website/src/content/docs/learning-hub/cli-for-beginners/01-setup-and-first-steps.md @@ -3,7 +3,7 @@ title: '01 ยท First Steps' description: 'Experience your first GitHub Copilot CLI demos and learn the three main interaction modes.' authors: - GitHub Copilot Learning Hub Team -lastUpdated: 2026-03-20 +lastUpdated: 2026-04-24 --- ![Chapter 01: First Steps](/images/learning-hub/copilot-cli-for-beginners/01/chapter-header.png) @@ -320,7 +320,7 @@ Proceed with implementation? [Y/n] > ๐Ÿ’ก **Want something more complex?** Try: `/plan Add search and filter capabilities to the book app`. Plan mode scales from simple features to full applications. -> ๐Ÿ“š **Autopilot mode**: You may have noticed Shift+Tab cycles through a third mode called **Autopilot**. In autopilot mode, Copilot works through an entire plan without waiting for your input after each step โ€” like handing a task to a colleague and saying "let me know when you're finished." The typical workflow is plan โ†’ accept โ†’ autopilot, which means you need to be good at writing plans first. Get comfortable with Interactive and Plan modes, then see the [official docs](https://docs.github.com/copilot/concepts/agents/copilot-cli/autopilot) when you're ready. +> ๐Ÿ“š **Autopilot mode**: You may have noticed Shift+Tab cycles through a third mode called **Autopilot**. In autopilot mode, Copilot works through an entire plan without waiting for your input after each step โ€” like handing a task to a colleague and saying "let me know when you're finished." The typical workflow is plan โ†’ accept โ†’ autopilot, which means you need to be good at writing plans first. You can also launch directly into autopilot with `copilot --autopilot`. Get comfortable with Interactive and Plan modes first, then see the [official docs](https://docs.github.com/copilot/concepts/agents/copilot-cli/autopilot) when you're ready. --- @@ -436,16 +436,22 @@ That's it for getting started! As you become comfortable, you can explore additi | `/usage` | Display session usage metrics and statistics | | `/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 a markdown file, GitHub gist, or self-contained HTML file | + +### Display + +| Command | What It Does | +|---------|--------------| +| `/statusline` (or `/footer`) | Customize which items appear in the status bar at the bottom of the session (directory, branch, effort, context window, quota) | +| `/theme` | View or set terminal theme | ### Help and Feedback | Command | What It Does | |---------|--------------| -| `/help` | Show all available commands | | `/changelog` | Display changelog for CLI versions | | `/feedback` | Submit feedback to GitHub | -| `/theme` | View or set terminal theme | +| `/help` | Show all available commands | ### Quick Shell Commands @@ -474,6 +480,8 @@ copilot > ๐Ÿ’ก **Tip**: Some models cost more "premium requests" than others. Models marked **1x** (like Claude Sonnet 4.5) are a great default. They're capable and efficient. Higher-multiplier models use your premium request quota faster, so save those for when you really need them. +> ๐Ÿ’ก **Not sure which model to pick?** Select **`Auto`** from the model picker to let Copilot automatically choose the best available model for each session. This is a great default if you're just getting started and don't want to think about model selection. + --- diff --git a/website/src/content/docs/learning-hub/cli-for-beginners/03-development-workflows.md b/website/src/content/docs/learning-hub/cli-for-beginners/03-development-workflows.md index 8d73b40fe..3257b4a98 100644 --- a/website/src/content/docs/learning-hub/cli-for-beginners/03-development-workflows.md +++ b/website/src/content/docs/learning-hub/cli-for-beginners/03-development-workflows.md @@ -3,7 +3,7 @@ title: '03 ยท Development Workflows' description: 'Mirror the source development workflow chapter covering review, debugging, testing, and git support.' authors: - GitHub Copilot Learning Hub Team -lastUpdated: 2026-03-20 +lastUpdated: 2026-04-24 --- ![Chapter 03: Development Workflows](/images/learning-hub/copilot-cli-for-beginners/03/chapter-header.png) @@ -732,7 +732,7 @@ copilot > Users report: 'Finding books by author name doesn't work for partial names' > @samples/book-app-project/books.py Analyze and identify the likely cause -# 2. Debug the issue (continuing in same session) +# 2. Debug the issue and fix (continuing in same session) > Based on the analysis, show me the find_by_author function and explain the issue > Fix the find_by_author function to handle partial name matches @@ -744,10 +744,23 @@ copilot > - Case-insensitive matching > - Author name not found -# 4. Generate commit message +# Exit the interactive session + +> /exit + +# 4. Run git add + +# Stage the changes so git diff --staged has something to work with +git add . + +# 5. Generate commit message copilot -p "Generate commit message for: $(git diff --staged)" -# Output: "fix(books): support partial author name search" +# Example Output: "fix(books): support partial author name search" + +# 6. Commit changes (optional) + +git commit -m "" ``` ### Bug Fix Workflow Summary @@ -755,10 +768,11 @@ copilot -p "Generate commit message for: $(git diff --staged)" | Step | Action | Copilot Command | |------|--------|-----------------| | 1 | Understand the bug | `> [describe bug] @relevant-file.py Analyze the likely cause` | -| 2 | Get detailed analysis | `> Show me the function and explain the issue` | -| 3 | Implement the fix | `> Fix the [specific issue]` | -| 4 | Generate tests | `> Generate tests for [specific scenarios]` | -| 5 | Commit | `copilot -p "Generate commit message for: $(git diff --staged)"` | +| 2 | Analysis and fix | `> Show me the function and fix the issue` | +| 3 | Generate tests | `> Generate tests for [specific scenarios]` | +| 4 | Stage changes | `git add .` | +| 5 | Generate commit message | `copilot -p "Generate commit message for: $(git diff --staged)"` | +| 6 | Commit changes| `git commit -m ""` | --- diff --git a/website/src/content/docs/learning-hub/cli-for-beginners/05-skills.md b/website/src/content/docs/learning-hub/cli-for-beginners/05-skills.md index 859f6ac31..adfa1b407 100644 --- a/website/src/content/docs/learning-hub/cli-for-beginners/05-skills.md +++ b/website/src/content/docs/learning-hub/cli-for-beginners/05-skills.md @@ -3,7 +3,7 @@ title: '05 ยท Automate Repetitive Tasks' description: 'Mirror the source chapter on skills that load automatically for repeated GitHub Copilot CLI workflows.' authors: - GitHub Copilot Learning Hub Team -lastUpdated: 2026-03-20 +lastUpdated: 2026-04-24 --- ![Chapter 05: Skills System](/images/learning-hub/copilot-cli-for-beginners/05/chapter-header.png) @@ -560,22 +560,22 @@ Pre-made skills are also available from community repositories: - **[Awesome Copilot](https://github.com/github/awesome-copilot)** - Official GitHub Copilot resources including skills documentation and examples -### Installing a Community Skill Manually +### Installing a Community Skill with GitHub CLI -If you find a skill in a GitHub repository, copy its folder into your skills directory: +The easiest way to install a skill from a GitHub repository is using the `gh skill install` command (requires [GitHub CLI v2.90.0+](https://github.blog/changelog/2026-04-16-manage-agent-skills-with-github-cli/)): ```bash -# Clone the awesome-copilot repository -git clone https://github.com/github/awesome-copilot.git /tmp/awesome-copilot +# Browse and interactively select a skill from awesome-copilot +gh skill install github/awesome-copilot -# Copy a specific skill to your project -cp -r /tmp/awesome-copilot/skills/code-checklist .github/skills/ +# Or install a specific skill directly +gh skill install github/awesome-copilot code-checklist -# Or for personal use across all projects -cp -r /tmp/awesome-copilot/skills/code-checklist ~/.copilot/skills/ +# Install for personal use across all projects (user scope) +gh skill install github/awesome-copilot code-checklist --scope user ``` -> โš ๏ธ **Review before installing**: Always read a skill's `SKILL.md` before copying it into your project. Skills control what Copilot does, and a malicious skill could instruct it to run harmful commands or modify code in unexpected ways. +> โš ๏ธ **Review before installing**: Always read a skill's `SKILL.md` before installing it. Skills control what Copilot does, and a malicious skill could instruct it to run harmful commands or modify code in unexpected ways. ---