Skip to content

Commit f1004d0

Browse files
docs: update Learning Hub for CLI v1.0.10/v1.0.11 features (#1150)
- Add monorepo support section to copilot-configuration-basics: customizations discovered at every directory level up to git root - Add personal skills directory (~/.agents/skills/) documentation - Add /clear vs /new session command distinction + /undo command - Add MCP organization policy enforcement to understanding-mcp-servers - Add sessionStart additionalContext injection to automating-with-hooks - Add extension hooks merging behaviour to automating-with-hooks Source: https://github.com/github/copilot-cli/releases/tag/v1.0.11 Source: https://github.com/github/copilot-cli/releases/tag/v1.0.10 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 7471eb5 commit f1004d0

3 files changed

Lines changed: 88 additions & 3 deletions

File tree

website/src/content/docs/learning-hub/automating-with-hooks.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: 'Automating with Hooks'
33
description: 'Learn how to use hooks to automate lifecycle events like formatting, linting, and governance checks during Copilot agent sessions.'
44
authors:
55
- GitHub Copilot Learning Hub Team
6-
lastUpdated: 2026-03-22
6+
lastUpdated: 2026-03-24
77
estimatedReadingTime: '8 minutes'
88
tags:
99
- hooks
@@ -99,6 +99,26 @@ Hooks can trigger on several lifecycle events:
9999

100100
> **Key insight**: The `preToolUse` hook is the most powerful — it can **approve or deny** individual tool executions. This enables fine-grained security policies like blocking specific shell commands or requiring approval for sensitive file operations.
101101
102+
### sessionStart additionalContext
103+
104+
The `sessionStart` hook supports an `additionalContext` field in its output. When your hook script writes JSON to stdout containing an `additionalContext` key, that text is **injected directly into the conversation** at the start of the session. This lets hooks dynamically provide environment-specific context—such as the current git branch, deployment environment, or team onboarding notes—without requiring the user to paste it manually.
105+
106+
Example hook script that surfaces context:
107+
108+
```bash
109+
#!/usr/bin/env bash
110+
# Output JSON with additionalContext to inject into the session
111+
cat <<EOF
112+
{
113+
"additionalContext": "Current branch: $(git rev-parse --abbrev-ref HEAD). Open tickets: $(gh issue list --limit 3 --json number,title | jq -r '.[] | \"#\(.number) \(.title)\"' | tr '\n' '; ')"
114+
}
115+
EOF
116+
```
117+
118+
### Extension Hooks Merging
119+
120+
When multiple IDE extensions (or a mix of extensions and a `hooks.json` file) each define hooks, all hook definitions are **merged** rather than the last one overwriting the others. This means you can layer hooks from different sources—a project's `.github/hooks/` file, an extension you have installed, and a personal settings file—and all of them will fire for the relevant events.
121+
102122
### Cross-Platform Event Name Compatibility
103123

104124
Hook event names can be written in **camelCase** (e.g., `preToolUse`) or **PascalCase** (e.g., `PreToolUse`). Both are accepted, making hook configuration files compatible across GitHub Copilot CLI, VS Code, and Claude Code without modification. Hooks also support Claude Code's nested `matcher`/`hooks` structure alongside the standard flat format.

website/src/content/docs/learning-hub/copilot-configuration-basics.md

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: 'Copilot Configuration Basics'
33
description: 'Learn how to configure GitHub Copilot at user, workspace, and repository levels to optimize your AI-assisted development experience.'
44
authors:
55
- GitHub Copilot Learning Hub Team
6-
lastUpdated: 2026-03-23
6+
lastUpdated: 2026-03-24
77
estimatedReadingTime: '10 minutes'
88
tags:
99
- configuration
@@ -170,6 +170,43 @@ A well-organized Copilot configuration directory looks like this:
170170
└── api-design.instructions.md
171171
```
172172

173+
### Monorepo Support
174+
175+
In monorepos with multiple packages or services, GitHub Copilot CLI discovers customizations at **every directory level** from your working directory up to the git repository root. This means each package or service can have its own `.github/` folder with specialized agents, instructions, skills, and MCP servers, while still inheriting configuration from parent directories.
176+
177+
```
178+
my-monorepo/
179+
├── .github/
180+
│ └── instructions/
181+
│ └── shared-conventions.instructions.md ← applies everywhere
182+
├── packages/
183+
│ ├── api/
184+
│ │ └── .github/
185+
│ │ └── agents/
186+
│ │ └── api-expert.agent.md ← applies in packages/api/
187+
│ └── web/
188+
│ └── .github/
189+
│ └── instructions/
190+
│ └── react-conventions.instructions.md ← applies in packages/web/
191+
```
192+
193+
When you work inside `packages/api/`, Copilot loads configuration from `packages/api/.github/`, then `packages/.github/` (if it exists), then the root `.github/`. This layered discovery ensures the right context is active no matter where in the repository you're working.
194+
195+
### Personal Skills Directory
196+
197+
In addition to repository-level skills, GitHub Copilot CLI supports a **personal skills directory** at `~/.agents/skills/`. Skills you place here are discovered automatically across all your projects, making them ideal for personal workflows and reusable utilities that are not project-specific.
198+
199+
```
200+
~/.agents/
201+
└── skills/
202+
├── my-review-style/
203+
│ └── SKILL.md ← available in all sessions
204+
└── cleanup-todos/
205+
└── SKILL.md
206+
```
207+
208+
This personal directory aligns with the VS Code GitHub Copilot for Azure extension's default skill discovery path, so skills defined here work consistently across tools.
209+
173210
### Custom Agents
174211

175212
Agents are specialized assistants for specific workflows. Place agent definition files in `.github/agents/`.
@@ -357,6 +394,25 @@ CLI settings use **camelCase** naming. Key settings added in recent releases:
357394

358395
> **Note**: Older snake_case names (e.g., `include_gitignored`, `auto_updates_channel`) are still accepted for backward compatibility, but camelCase is now the preferred format.
359396
397+
### CLI Session Commands
398+
399+
GitHub Copilot CLI has two commands for managing session state, with distinct behaviours:
400+
401+
| Command | Behaviour |
402+
|---------|-----------|
403+
| `/new [prompt]` | Starts a fresh conversation while keeping the current session backgrounded. You can switch back to backgrounded sessions. |
404+
| `/clear [prompt]` | Abandons the current session entirely and starts a new one. Backgrounded sessions are not affected. |
405+
406+
Both commands accept an optional prompt argument to seed the new session with an opening message, for example `/new Add error handling to the login flow`.
407+
408+
The `/undo` command reverts the last turn—including any file changes the agent made—letting you course-correct without manually undoing edits:
409+
410+
```
411+
/undo
412+
```
413+
414+
Use `/undo` when the agent's last response went in an unwanted direction and you want to try a different approach from that point.
415+
360416
## Common Questions
361417

362418
**Q: How do I disable Copilot for specific files?**

website/src/content/docs/learning-hub/understanding-mcp-servers.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: 'Understanding MCP Servers'
33
description: 'Learn how Model Context Protocol servers extend GitHub Copilot with access to external tools, databases, and APIs.'
44
authors:
55
- GitHub Copilot Learning Hub Team
6-
lastUpdated: 2026-03-23
6+
lastUpdated: 2026-03-24
77
estimatedReadingTime: '8 minutes'
88
tags:
99
- mcp
@@ -207,6 +207,15 @@ MCP server SDKs are available in [Python](https://github.com/modelcontextprotoco
207207
- **Test server connectivity**: Verify MCP servers start correctly before relying on them in agent workflows.
208208
- **Use the MCP allowlist (experimental)**: In high-security environments, the `MCP_ALLOWLIST` feature flag lets you validate MCP servers against a configured registry, blocking unrecognized servers from loading. This is an experimental feature for enterprise environments requiring strict control over which MCP servers are permitted.
209209

210+
### Organization Policy for Third-Party MCP Servers
211+
212+
GitHub organizations can enforce a policy that restricts which third-party MCP servers members are permitted to use. When this policy is active:
213+
214+
- Copilot CLI **enforces** the policy for all users in the organization.
215+
- A **warning is shown** if a configured MCP server is blocked by the policy, so you know which servers are restricted before expecting them to work.
216+
217+
If you see a warning that an MCP server is blocked, contact your organization administrator to find out which servers are on the allowlist, or switch to an approved alternative.
218+
210219
## Common Questions
211220

212221
**Q: Do MCP servers run in the cloud?**

0 commit comments

Comments
 (0)