diff --git a/website/src/content/docs/learning-hub/building-custom-agents.md b/website/src/content/docs/learning-hub/building-custom-agents.md index 2afcc0eac..4179e729b 100644 --- a/website/src/content/docs/learning-hub/building-custom-agents.md +++ b/website/src/content/docs/learning-hub/building-custom-agents.md @@ -3,7 +3,7 @@ title: 'Building Custom Agents' description: 'Learn how to create specialized GitHub Copilot agents with custom personas, tool integrations, and domain expertise.' authors: - GitHub Copilot Learning Hub Team -lastUpdated: 2026-07-06 +lastUpdated: 2026-07-09 estimatedReadingTime: '10 minutes' tags: - agents @@ -256,6 +256,7 @@ The agent can then query your database, analyze query plans, and suggest optimiz |----------|-------------------| | Most demanding reasoning, security review | Claude Sonnet 5 *(v1.0.67+)* | | Complex reasoning, analysis | Claude Sonnet 4 | +| Code generation, tool-driven agentic work | GPT-5.6 *(v1.0.70+)* | | Code generation, refactoring | GPT-4.1 | | Code-specialized tasks, large context | kimi-k2.7-code *(v1.0.68+)* | | Quick analysis, simple tasks | Claude Haiku or GPT-4.1-mini | diff --git a/website/src/content/docs/learning-hub/copilot-configuration-basics.md b/website/src/content/docs/learning-hub/copilot-configuration-basics.md index 607cab55a..029501f2d 100644 --- a/website/src/content/docs/learning-hub/copilot-configuration-basics.md +++ b/website/src/content/docs/learning-hub/copilot-configuration-basics.md @@ -3,7 +3,7 @@ title: 'Copilot Configuration Basics' description: 'Learn how to configure GitHub Copilot at user, workspace, and repository levels to optimize your AI-assisted development experience.' authors: - GitHub Copilot Learning Hub Team -lastUpdated: 2026-07-07 +lastUpdated: 2026-07-09 estimatedReadingTime: '10 minutes' tags: - configuration @@ -207,6 +207,32 @@ In addition to repository-level skills, GitHub Copilot CLI supports **personal s The `~/.agents/skills/` path aligns with the VS Code GitHub Copilot for Azure extension's default skill discovery path, while `~/.copilot/skills/` matches the Copilot CLI configuration directory. Both are supported for personal skills. +### Pinning Model and Effort via `.github/copilot/settings.json` + +*(v1.0.70+)* A **trusted repository** can pin the model, reasoning effort level, and context tier for all sessions working in that repository by adding a `.github/copilot/settings.json` file. This is a team governance feature that ensures everyone uses a consistent model configuration without relying on individual user settings: + +```json +{ + "model": "claude-sonnet-4", + "effortLevel": "high", + "contextTier": "full" +} +``` + +**Supported fields**: + +| Field | Description | Example values | +|-------|-------------|----------------| +| `model` | The AI model to use for this repository | `"claude-sonnet-4"`, `"gpt-4.1"`, `"claude-sonnet-5"` | +| `effortLevel` | Reasoning effort level | `"low"`, `"medium"`, `"high"` | +| `contextTier` | How much context to include | `"default"`, `"full"` | + +In addition to model and effort settings, this file can also extend the URL, MCP server, and skill deny lists, allowing organizations to enforce access restrictions at the repository level. + +**Why use this**: Pin a model when your team has agreed on the right cost/quality tradeoff for a project. Pin a high effort level for codebases where mistakes are expensive. Deny lists let you block specific MCP servers or URLs that aren't appropriate for a given project's security posture. + +> **Trust requirement**: The repository must be explicitly trusted by the user for these settings to take effect. This prevents untrusted repositories from changing your model or access restrictions without your knowledge. + ### Custom Agents Agents are specialized assistants for specific workflows. Place agent definition files in `.github/agents/`. @@ -592,6 +618,14 @@ The `/ask` command lets you ask a quick question without affecting your conversa /ask What does the `retry` utility in src/utils do? ``` +The `/refine` command *(v1.0.70+)* rewrites a rough, stream-of-consciousness prompt into a clear, structured one before sending it to the agent: + +``` +/refine +``` + +Type your rough idea, and `/refine` transforms it into a precise, well-structured prompt. This is especially helpful for complex multi-step tasks where prompt clarity significantly affects output quality — for example, turning "um make the login thing work better with the existing setup" into a focused task description with clear scope and acceptance criteria. + The `/env` command shows all loaded environment details — instructions, MCP servers, skills, agents, and plugins — in a single view. Use it to verify that the right resources are active for the current session: ``` @@ -697,6 +731,15 @@ copilot --autopilot --max-autopilot-continues 10 "Refactor the authentication mo Set it higher for long-running tasks, or lower for tasks where you want more frequent checkpoints. Setting it to `0` disables automatic continuation entirely. +The `--sandbox` and `--no-sandbox` flags *(v1.0.70+)* turn the OS-level shell sandbox on or off for the current session only, without permanently changing your saved sandbox setting. This is useful with `-p` (prompt mode) when you need to temporarily adjust sandbox behavior for a specific automated task: + +```bash +copilot --sandbox -p "Run the full test suite and fix any failures" +copilot --no-sandbox -p "Set up development environment with system tools" +``` + +These flags apply only to the current invocation — your persisted sandbox preference remains unchanged. + The `--attachment` flag (available in prompt mode, `-p`) lets you attach files — images or native documents — to the initial prompt in non-interactive mode: ```bash diff --git a/website/src/content/docs/learning-hub/installing-and-using-plugins.md b/website/src/content/docs/learning-hub/installing-and-using-plugins.md index a45c85add..fe8a1d6cc 100644 --- a/website/src/content/docs/learning-hub/installing-and-using-plugins.md +++ b/website/src/content/docs/learning-hub/installing-and-using-plugins.md @@ -3,7 +3,7 @@ title: 'Installing and Using Plugins' description: 'Learn how to find, install, and manage plugins that extend GitHub Copilot CLI with reusable agents, skills, hooks, and integrations.' authors: - GitHub Copilot Learning Hub Team -lastUpdated: 2026-06-24 +lastUpdated: 2026-07-09 estimatedReadingTime: '8 minutes' tags: - plugins @@ -160,6 +160,28 @@ To automatically register an additional marketplace for everyone working in a re With this in place, team members automatically get the `my-org-plugins` marketplace available without running a separate `marketplace add` command. This replaces the older `marketplaces` setting, which was removed in v1.0.16. +### Pinning a Marketplace to a Specific Commit + +*(v1.0.70+)* To ensure reproducibility and prevent unintended updates, you can pin a marketplace to an exact commit SHA using the `sha` field in the source configuration: + +```json +{ + "extraKnownMarketplaces": [ + { + "name": "my-org-plugins", + "source": "my-org/internal-plugins", + "sha": "a1b2c3d4e5f6..." + } + ] +} +``` + +Pinning to a SHA guarantees that everyone on the team installs plugins from exactly that snapshot of the marketplace, regardless of subsequent changes to the repository. This is useful for: + +- **Reproducible CI environments** — ensure builds always use the same plugin versions +- **Change control** — review and approve plugin updates before rolling them out team-wide +- **Stability** — prevent breaking changes in upstream marketplaces from impacting your team without notice + ## Installing Plugins ### From Copilot CLI