mirror of
https://github.com/github/awesome-copilot.git
synced 2026-08-13 12:49:49 +00:00
[bot] docs(learning-hub): update for Copilot CLI v1.0.65–v1.0.67 (#2185)
* docs(learning-hub): update with Copilot CLI v1.0.65–v1.0.67 changes - Add Claude Sonnet 5 to model table in building-custom-agents.md (v1.0.67) - Document --allow-all-mcp-server-instructions flag in understanding-mcp-servers.md (v1.0.66) - Add @-style imports for instruction files in defining-custom-instructions.md (v1.0.66) - Add sessionLimits setting to configuration table in copilot-configuration-basics.md (v1.0.66) - Document subagent concurrency and depth limits in agents-and-subagents.md (v1.0.66) Sources: - https://github.com/github/copilot-cli/releases/tag/v1.0.67 (2026-06-30) - https://github.com/github/copilot-cli/releases/tag/v1.0.66 (2026-06-30) - https://github.com/github/copilot-cli/releases/tag/v1.0.65 (2026-06-24) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update website/src/content/docs/learning-hub/building-custom-agents.md --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Aaron Powell <me@aaron-powell.com>
This commit is contained in:
committed by
GitHub
parent
3169734bc2
commit
f6fc97747f
@@ -3,7 +3,7 @@ title: 'Defining Custom Instructions'
|
||||
description: 'Learn how to create persistent, context-aware instructions that guide GitHub Copilot automatically across your codebase.'
|
||||
authors:
|
||||
- GitHub Copilot Learning Hub Team
|
||||
lastUpdated: 2026-03-22
|
||||
lastUpdated: 2026-07-01
|
||||
estimatedReadingTime: '8 minutes'
|
||||
tags:
|
||||
- instructions
|
||||
@@ -142,7 +142,38 @@ applyTo: '**'
|
||||
**Expected Result**:
|
||||
When you work on a file matching the pattern, Copilot incorporates that instruction's context into suggestions and chat responses automatically.
|
||||
|
||||
## Real Examples from the Repository
|
||||
## Composing Instructions with @-style Imports
|
||||
|
||||
*(v1.0.66+)* Copilot CLI supports **@-style imports** in instruction files, AGENTS.md, and CLAUDE.md. Use a bare `@path/to/file.md` reference to embed the content of another file at that point:
|
||||
|
||||
```markdown
|
||||
---
|
||||
description: 'Full TypeScript standards for this project'
|
||||
applyTo: '**/*.ts, **/*.tsx'
|
||||
---
|
||||
|
||||
@shared/base-coding-standards.md
|
||||
@shared/security-rules.md
|
||||
|
||||
## TypeScript-Specific Rules
|
||||
|
||||
- Prefer `interface` over `type` for object shapes
|
||||
- Always provide return types for public functions
|
||||
```
|
||||
|
||||
When the instruction file is loaded, the referenced files are read and their content is substituted inline before being sent to the model.
|
||||
|
||||
**Why this matters**:
|
||||
- **DRY principle**: Maintain a shared `security-rules.md` and import it into every instruction rather than copying it
|
||||
- **Modular composition**: Build complex instructions from small, focused files
|
||||
- **Easy updates**: Edit the shared file once; every instruction that imports it picks up the change automatically
|
||||
|
||||
**Tips**:
|
||||
- Paths are resolved relative to the instruction file's location
|
||||
- Referenced files do not need to be instruction files themselves — plain Markdown files work
|
||||
- Imports can be nested (a file you import can itself import other files)
|
||||
|
||||
|
||||
|
||||
The awesome-copilot-hub repository includes over 120 instruction files demonstrating real-world patterns.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user