diff --git a/assets/images/help/copilot/copilot-cli-welcome.png b/assets/images/help/copilot/copilot-cli-welcome.png index 6cd91c326e01..e73ee3adce38 100644 Binary files a/assets/images/help/copilot/copilot-cli-welcome.png and b/assets/images/help/copilot/copilot-cli-welcome.png differ diff --git a/content/code-security/how-tos/scan-code-for-vulnerabilities/scan-from-the-command-line/index.md b/content/code-security/how-tos/scan-code-for-vulnerabilities/scan-from-the-command-line/index.md index 917b13c5ed9e..1eef7bf8c5d5 100644 --- a/content/code-security/how-tos/scan-code-for-vulnerabilities/scan-from-the-command-line/index.md +++ b/content/code-security/how-tos/scan-code-for-vulnerabilities/scan-from-the-command-line/index.md @@ -14,9 +14,11 @@ children: - /setting-up-the-codeql-cli - /advanced-setup-of-the-codeql-cli - /using-custom-queries-with-the-codeql-cli + - /testing-custom-queries - /testing-query-help-files - /specifying-command-options-in-a-codeql-configuration-file - /creating-database-bundle-for-troubleshooting + redirect_from: - /code-security/codeql-cli/using-the-codeql-cli - /code-security/codeql-cli/getting-started-with-the-codeql-cli diff --git a/content/code-security/tutorials/customize-code-scanning/testing-custom-queries.md b/content/code-security/how-tos/scan-code-for-vulnerabilities/scan-from-the-command-line/testing-custom-queries.md similarity index 96% rename from content/code-security/tutorials/customize-code-scanning/testing-custom-queries.md rename to content/code-security/how-tos/scan-code-for-vulnerabilities/scan-from-the-command-line/testing-custom-queries.md index 4459b2a6ed93..396d8ff70ba9 100644 --- a/content/code-security/tutorials/customize-code-scanning/testing-custom-queries.md +++ b/content/code-security/how-tos/scan-code-for-vulnerabilities/scan-from-the-command-line/testing-custom-queries.md @@ -1,6 +1,7 @@ --- title: Testing custom queries -intro: You can set up tests for your {% data variables.product.prodname_codeql %} queries to ensure that they continue to return the expected results with new releases of the {% data variables.product.prodname_codeql_cli %}. +intro: Verify your custom {% data variables.product.prodname_codeql %} queries and catch breaking changes before they affect your {% data variables.product.prodname_code_scanning %} results following new releases of the {% data variables.product.prodname_codeql_cli %}. +shortTitle: Test custom queries product: '{% data reusables.gated-features.codeql %}' versions: fpt: '*' @@ -14,10 +15,11 @@ redirect_from: - /code-security/codeql-cli/testing-custom-queries - /code-security/codeql-cli/using-the-codeql-cli/testing-custom-queries - /code-security/codeql-cli/using-the-advanced-functionality-of-the-codeql-cli/testing-custom-queries -contentType: tutorials + - /code-security/tutorials/customize-code-scanning/testing-custom-queries +contentType: how-tos --- -## About testing custom queries +## Testing custom queries {% data variables.product.prodname_codeql %} provides a simple test framework for automated regression testing of queries. Test your queries to ensure that they behave as expected. diff --git a/content/code-security/tutorials/customize-code-scanning/index.md b/content/code-security/tutorials/customize-code-scanning/index.md index 088e51c8a266..6722ded6be18 100644 --- a/content/code-security/tutorials/customize-code-scanning/index.md +++ b/content/code-security/tutorials/customize-code-scanning/index.md @@ -20,7 +20,7 @@ children: - /running-codeql-code-scanning-in-a-container - /customizing-analysis-with-codeql-packs - /creating-codeql-query-suites - - /testing-custom-queries - /creating-and-working-with-codeql-packs - /publishing-and-using-codeql-packs --- + diff --git a/content/copilot/concepts/agents/about-agent-skills.md b/content/copilot/concepts/agents/about-agent-skills.md index 81bf82fb1930..637e70783242 100644 --- a/content/copilot/concepts/agents/about-agent-skills.md +++ b/content/copilot/concepts/agents/about-agent-skills.md @@ -1,7 +1,7 @@ --- -title: About Agent Skills -shortTitle: Agent Skills -intro: 'Agent Skills enhance the ability of {% data variables.copilot.copilot_coding_agent %}, the {% data variables.copilot.copilot_cli %} and {% data variables.product.prodname_vscode %} Insiders to perform specialized tasks.' +title: About agent skills +shortTitle: Agent skills +intro: 'Skills allow {% data variables.product.prodname_copilot_short %} to perform specialized tasks.' product: '{% data reusables.gated-features.copilot-coding-agent %}

{% data reusables.gated-features.copilot-cli %}
Sign up for {% data variables.product.prodname_copilot_short %} {% octicon "link-external" height:16 %}' versions: feature: copilot @@ -11,11 +11,12 @@ category: - Learn about Copilot --- -## About Agent Skills +> [!NOTE] +> Agent Skills work with {% data variables.copilot.copilot_coding_agent %}, the {% data variables.copilot.copilot_cli %} and agent mode in {% data variables.product.prodname_vscode %} Insiders. Support in the stable version of {% data variables.product.prodname_vscode_shortname %} is coming soon. -Agent Skills are folders of instructions, scripts, and resources that {% data variables.product.prodname_copilot_short %} can load when relevant to improve its performance in specialized tasks. Agent Skills is an [open standard](https://github.com/agentskills/agentskills), used by a range of different agents. +## About agent skills -Agent Skills work with {% data variables.copilot.copilot_coding_agent %}, the {% data variables.copilot.copilot_cli %} and agent mode in {% data variables.product.prodname_vscode %} Insiders. Support in the stable version of {% data variables.product.prodname_vscode_shortname %} is coming soon. +Agent skills are folders of instructions, scripts, and resources that {% data variables.product.prodname_copilot_short %} can load when relevant to improve its performance in specialized tasks. The Agent Skills specification is an [open standard](https://github.com/agentskills/agentskills), used by a range of different AI systems. You can create your own skills to teach {% data variables.product.prodname_copilot_short %} to perform tasks in a specific, repeatable way—or use skills shared online, for example in the [`anthropics/skills`](https://github.com/anthropics/skills) repository or {% data variables.product.company_short %}'s community created [`github/awesome-copilot`](https://github.com/github/awesome-copilot) collection. @@ -26,63 +27,9 @@ You can create your own skills to teach {% data variables.product.prodname_copil Support for organization-level and enterprise-level skills is coming soon. -> [!NOTE] -> {% data reusables.cli.preview-note-cli-body %} - -## Creating and adding skills - -1. Create a subdirectory for your new skill. Each skill should have its own directory (for example, `.github/skills/webapp-testing`). Skill directory names should be lowercase, use hyphens for spaces, and typically match the `name` in the `SKILL.md` frontmatter. - - For project skills, specific to a single repository, store your skill under `.github/skills` or `.claude/skills`. - - For personal skills, shared across projects, store your skill under `~/.copilot/skills` or `~/.claude/skills`. - -1. Create a `SKILL.md` file with your skill's instructions. - - > [!NOTE] - > Skill files must be named `SKILL.md`. - - `SKILL.md` files are Markdown files with YAML frontmatter. In their simplest form, they include: - - * YAML frontmatter - * **name** (required): A unique identifier for the skill. This must be lowercase, using hyphens for spaces. - * **description** (required): A description of what the skill does, and when {% data variables.product.prodname_copilot_short %} should use it. - * **license** (optional): A description of the license that applies to this skill. - * A Markdown body, with the instructions, examples and guidelines for {% data variables.product.prodname_copilot_short %} to follow. - -1. Optionally, add scripts, examples or other resources to your skill's directory. For example, if you were writing a skill for converting images between different formats, you might include a script for converting SVG images to PNG. - -### Example `SKILL.md` file - -For a project skill, this file would be located in the `/path/to/repository/.github/skills/github-actions-failure-debugging` directory. - -For a personal skill, this file would be located in the `~/.copilot/skills/github-actions-failure-debugging` directory. - -```markdown copy ---- -name: github-actions-failure-debugging -description: Guide for debugging failing GitHub Actions workflows. Use this when asked to debug failing GitHub Actions workflows. ---- - -To debug failing GitHub Actions workflows in a pull request, follow this process, using tools provided from the GitHub MCP Server: - -1. Use the `list_workflow_runs` tool to look up recent workflow runs for the pull request and their status -2. Use the `summarize_job_log_failures` tool to get an AI summary of the logs for failed jobs, to understand what went wrong without filling your context windows with thousands of lines of logs -3. If you still need more information, use the `get_job_logs` or `get_workflow_run_logs` tool to get the full, detailed failure logs -4. Try to reproduce the failure yourself in your own environment. -5. Fix the failing build. If you were able to reproduce the failure yourself, make sure it is fixed before committing your changes. -``` - -## How {% data variables.product.prodname_copilot_short %} uses skills - -When performing tasks, {% data variables.product.prodname_copilot_short %} will decide when to use your skills based on your prompt and the skill's description. - -When {% data variables.product.prodname_copilot_short %} chooses to use a skill, the `SKILL.md` file will be injected in the agent's context, giving the agent access to your instructions. It can then follow those instructions, and use any scripts or examples you may have included in the skill's directory. - -## Skills versus custom instructions - -You can use both skills and custom instructions to teach {% data variables.product.prodname_copilot_short %} how to work in your repository and how to perform specific tasks. +## Next steps -We recommend using custom instructions for simple instructions relevant to almost every task (for example information about your repository's coding standards), and skills for more detailed instructions that {% data variables.product.prodname_copilot_short %} should access when relevant. +To create an agent skill, see: -To learn more about repository custom instructions, see [AUTOTITLE](/copilot/how-tos/configure-custom-instructions/add-repository-instructions). +* [AUTOTITLE](/copilot/how-tos/use-copilot-agents/coding-agent/create-skills) +* [AUTOTITLE](/copilot/how-tos/copilot-cli/customize-copilot/create-skills) diff --git a/content/copilot/concepts/agents/coding-agent/about-custom-agents.md b/content/copilot/concepts/agents/coding-agent/about-custom-agents.md index 74a30030372d..a8bb12eaf7b9 100644 --- a/content/copilot/concepts/agents/coding-agent/about-custom-agents.md +++ b/content/copilot/concepts/agents/coding-agent/about-custom-agents.md @@ -1,8 +1,7 @@ --- title: About custom agents shortTitle: Custom agents -intro: '{% data variables.copilot.custom_agents_caps_short %} enhance {% data variables.copilot.copilot_coding_agent %} with assistance tailored to your needs.' -product: '{% data reusables.gated-features.copilot-coding-agent %}
Sign up for {% data variables.product.prodname_copilot_short %} {% octicon "link-external" height:16 %}' +intro: '{% data variables.copilot.custom_agents_caps_short %} enhance {% data variables.product.prodname_copilot_short %} with assistance tailored to your needs.' versions: feature: copilot topics: @@ -13,7 +12,7 @@ category: ## About {% data variables.copilot.custom_agents_short %} -{% data variables.copilot.custom_agents_caps_short %} are specialized versions of {% data variables.copilot.copilot_coding_agent %} that you can tailor to your unique workflows, coding conventions, and use cases. They act like tailored teammates that follow your standards, use the right tools, and implement team-specific practices. You define these agents once instead of repeatedly providing the same instructions and context. +{% data variables.copilot.custom_agents_caps_short %} are specialized versions of the {% data variables.product.prodname_copilot_short %} agent that you can tailor to your unique workflows, coding conventions, and use cases. They act like tailored teammates that follow your standards, use the right tools, and implement team-specific practices. You define these agents once instead of repeatedly providing the same instructions and context. You define {% data variables.copilot.custom_agents_short %} using Markdown files called {% data variables.copilot.agent_profiles %}. These files specify prompts, tools, and MCP servers. This allows you to encode your conventions, frameworks, and desired outcomes directly into {% data variables.product.prodname_copilot_short %}. @@ -64,16 +63,19 @@ For more information, see [AUTOTITLE](/copilot/how-tos/administer-copilot/manage {% data reusables.copilot.custom-agents-ide-preview %} -Once you create {% data variables.copilot.custom_agents_short %}, you can use them wherever {% data variables.copilot.copilot_coding_agent %} is available: +Once you create {% data variables.copilot.custom_agents_short %}, they become available to: -* {% data variables.product.prodname_dotcom_the_website %}: The agents tab and panel, issue assignment, and pull requests -* {% data variables.copilot.copilot_cli %} -* IDEs: {% data variables.product.prodname_vscode %}, JetBrains IDEs, Eclipse, and Xcode +* **{% data variables.copilot.copilot_coding_agent %} on {% data variables.product.prodname_dotcom_the_website %}**: The agents tab and panel, issue assignment, and pull requests +* **{% data variables.copilot.copilot_coding_agent %} in IDEs**: {% data variables.product.prodname_vscode %}, JetBrains IDEs, Eclipse, and Xcode +* **{% data variables.copilot.copilot_cli %}** -You can use {% data variables.copilot.agent_profiles %} directly in {% data variables.product.prodname_vscode %}, JetBrains IDEs, Eclipse, and Xcode. Some properties may function differently or be ignored between environments. +You can use {% data variables.copilot.agent_profiles %} directly in {% data variables.product.prodname_vscode %}, JetBrains IDEs, Eclipse, and Xcode. Some properties may function differently or be ignored between environments. For more information on using {% data variables.copilot.custom_agents_short %} in {% data variables.product.prodname_vscode %}, see [{% data variables.copilot.custom_agents_caps_short %} in {% data variables.product.prodname_vscode_shortname %}](https://code.visualstudio.com/docs/copilot/customization/custom-agents). ## Next steps -To create your own {% data variables.copilot.custom_agents_short %}, see [AUTOTITLE](/copilot/how-tos/use-copilot-agents/coding-agent/create-custom-agents). +To create your own {% data variables.copilot.custom_agents_short %}, see: + +* [AUTOTITLE](/copilot/how-tos/use-copilot-agents/coding-agent/create-custom-agents) +* [AUTOTITLE](/copilot/how-tos/copilot-cli/customize-copilot/create-custom-agents-for-cli) diff --git a/content/copilot/concepts/agents/coding-agent/about-hooks.md b/content/copilot/concepts/agents/coding-agent/about-hooks.md index b0004f92764f..45d32faa43fc 100644 --- a/content/copilot/concepts/agents/coding-agent/about-hooks.md +++ b/content/copilot/concepts/agents/coding-agent/about-hooks.md @@ -8,17 +8,17 @@ versions: topics: - Copilot contentType: concepts -category: +category: - Configure Copilot --- ## About hooks -Hooks enable you to execute custom shell commands at strategic points in an agent's workflow, such as when an agent session starts or ends, or before and after a prompt is entered or a tool is called. +Hooks enable you to execute custom shell commands at strategic points in an agent's workflow, such as when an agent session starts or ends, or before and after a prompt is entered or a tool is called. Hooks receive detailed information about agent actions via JSON input, enabling context-aware automation. For example, you can use hooks to: -* Programmatically approve or deny tool executions. +* Programmatically approve or deny tool executions. * Utilize built-in security features like secret scanning to prevent credential leaks. * Implement custom validation rules and audit logging for compliance. @@ -27,7 +27,7 @@ Hooks receive detailed information about agent actions via JSON input, enabling Hooks are available for use with: * {% data variables.copilot.copilot_coding_agent %} on {% data variables.product.github %} -* {% data variables.copilot.copilot_cli %} in the terminal +* {% data variables.copilot.copilot_cli %} in the terminal ## Types of hooks @@ -35,9 +35,11 @@ The following types of hooks are available: * **sessionStart**: Executed when a new agent session begins or when resuming an existing session. Can be used to initialize environments, log session starts for auditing, validate project state, and set up temporary resources. * **sessionEnd**: Executed when the agent session completes or is terminated. Can be used to cleanup temporary resources, generate and archive session reports and logs, or send notifications about session completion. -* **userPromptSubmitted**: Executed when the user submits a prompt to the agent. Can be used to log user requests for auditing and usage analysis. +* **userPromptSubmitted**: Executed when the user submits a prompt to the agent. Can be used to log user requests for auditing and usage analysis. * **preToolUse**: Executed before the agent uses any tool (such as `bash`, `edit`, `view`). This is the most powerful hook as it can **approve or deny tool executions**. Use this hook to block dangerous commands, enforce security policies and coding standards, require approval for sensitive operations, or log tool usage for compliance. * **postToolUse**: Executed after a tool completes execution (whether successful or failed). Can be used to log execution results, track usage statistics, generate audit trails, monitor performance metrics, and send failure alerts. +* **agentStop**: Executed when the main agent has finished responding to your prompt. +* **subagentStop**: Executed when a subagent completes, before returning results to the parent agent. * **errorOccurred**: Executed when an error occurs during agent execution. Can be used to log errors for debugging, send notifications, track error patterns, and generate reports. To see a complete reference of hook types with example use cases, best practices, and advanced patterns, see [AUTOTITLE](/copilot/reference/hooks-configuration). @@ -154,11 +156,10 @@ To ensure security is maintained when using hooks, keep the following considerat * **Always validate and sanitize the input processed by hooks**. Untrusted input could lead to unexpected behavior. * **Use proper shell escaping when constructing commands**. This prevents command injection vulnerabilities. * **Never log sensitive data, such as tokens or passwords**. -* **Ensure hook scripts and logs have the appropriate permissions**. +* **Ensure hook scripts and logs have the appropriate permissions**. * **Be cautious with hooks that make external network calls**. These can introduce latency, failures, or expose data to third parties. * **Set appropriate timeouts to prevent resource exhaustion**. Long-running hooks can block agent execution and degrade performance. ## Next steps To start creating hooks, see [AUTOTITLE](/copilot/how-tos/use-copilot-agents/coding-agent/use-hooks). - diff --git a/content/copilot/concepts/agents/about-copilot-cli.md b/content/copilot/concepts/agents/copilot-cli/about-copilot-cli.md similarity index 87% rename from content/copilot/concepts/agents/about-copilot-cli.md rename to content/copilot/concepts/agents/copilot-cli/about-copilot-cli.md index f79a6471a123..a1a413b85c37 100644 --- a/content/copilot/concepts/agents/about-copilot-cli.md +++ b/content/copilot/concepts/agents/copilot-cli/about-copilot-cli.md @@ -1,6 +1,6 @@ --- title: About GitHub Copilot CLI -shortTitle: Copilot CLI +shortTitle: About Copilot CLI allowTitleToDifferFromFilename: true intro: 'Find out about using {% data variables.product.prodname_copilot_short %} from the command line.' product: '{% data reusables.gated-features.copilot-cli %}' @@ -11,6 +11,8 @@ topics: contentType: concepts category: - Learn about Copilot +redirect_from: + - /copilot/concepts/agents/about-copilot-cli --- ## Introduction @@ -31,16 +33,23 @@ For installation instructions, see [AUTOTITLE](/copilot/how-tos/set-up/install-c ## Modes of use -{% data variables.copilot.copilot_cli %} can be used in three modes: -* **Interactive mode**: Start an interactive session by using the `copilot` command. This is the default mode for working with the CLI. +{% data variables.copilot.copilot_cli %} has two user interfaces: interactive and programmatic. - In this mode, you can prompt {% data variables.product.prodname_copilot_short %} to answer a question, or perform a task. You can react to {% data variables.product.prodname_copilot_short %}'s responses in the same session. +### Interactive interface - ![Screenshot of the Welcome message in the interactive mode of {% data variables.product.prodname_copilot_short %}.](/assets/images/help/copilot/copilot-cli-welcome.png) +To start an interactive session, enter `copilot`. Within an interactive session, you can have a conversation with {% data variables.product.prodname_copilot_short %}. You can prompt {% data variables.product.prodname_copilot_short %} to perform one or more tasks, and you can give it feedback and steer the direction of the work. -* **Plan mode**: Press Shift+Tab to cycle in and out of plan mode. In plan mode, {% data variables.product.prodname_copilot_short %} analyzes your request, asks clarifying questions to understand scope and requirements, and builds a structured implementation plan before writing any code. This helps you catch misunderstandings before any code is written, and stay in control of complex, multi-step tasks. + ![Screenshot of the Welcome message in the interactive interface of {% data variables.product.prodname_copilot_short %}.](/assets/images/help/copilot/copilot-cli-welcome.png) -* **Programmatic mode**: You can also pass the CLI a single prompt directly on the command line. You do this by using the `-p` or `--prompt` command-line option. To allow {% data variables.product.prodname_copilot_short %} to modify and execute files you should also use one of the approval options (see [Allowing tools to be used without manual approval](#allowing-tools-to-be-used-without-manual-approval) later in this article). For example: + The interactive interface has two modes. In addition to the default ask/execute mode there is also a **plan mode** in which {% data variables.product.prodname_copilot_short %} will build a structured implementation plan for a task you want to complete. + + Press Shift+Tab to cycle between modes. In plan mode, {% data variables.product.prodname_copilot_short %} analyzes your request, asks clarifying questions to understand scope and requirements, and builds a plan before writing any code. This helps you catch misunderstandings before any code is written, and stay in control of complex, multi-step tasks. + +### Programmatic interface + +You can also pass the CLI a single prompt directly on the command line. The CLI completes the task and then exits. + +To use the CLI programmatically, include the `-p` or `--prompt` command-line option in your command. To allow {% data variables.product.prodname_copilot_short %} to modify and execute files you should also use one of the approval options described later in this article—see [Allowing tools to be used without manual approval](#allowing-tools-to-be-used-without-manual-approval) ). For example: ```bash copy copilot -p "Show me this week's commits and summarize them" --allow-tool 'shell(git)' @@ -163,7 +172,7 @@ You can interact with {% data variables.product.prodname_copilot_short %} while You can customize {% data variables.copilot.copilot_cli %} in a number of ways: -* **Custom instructions**: Custom instructions allow you to give {% data variables.product.prodname_copilot_short %} additional context on your project and how to build, test and validate its changes. All custom instruction files now combine instead of using priority-based fallbacks. For more information, see [AUTOTITLE](/copilot/how-tos/use-copilot-agents/use-copilot-cli#use-custom-instructions). +* **Custom instructions**: Custom instructions allow you to give {% data variables.product.prodname_copilot_short %} additional context on your project and how to build, test and validate its changes. All custom instruction files now combine instead of using priority-based fallbacks. For more information, see [AUTOTITLE](/copilot/how-tos/copilot-cli/customize-copilot/add-custom-instructions). * **Model Context Protocol (MCP) servers**: MCP servers allow you to give {% data variables.product.prodname_copilot_short %} access to different data sources and tools. For more information, see [AUTOTITLE](/copilot/how-tos/use-copilot-agents/use-copilot-cli#add-an-mcp-server). * **{% data variables.copilot.custom_agents_caps_short %}**: {% data variables.copilot.custom_agents_caps_short %} allow you to create different specialized versions of {% data variables.product.prodname_copilot_short %} for different tasks. For example, you could customize {% data variables.product.prodname_copilot_short %} to be an expert frontend engineer following your team's guidelines. {% data variables.copilot.copilot_cli %} includes specialized {% data variables.copilot.custom_agents_short %} that it automatically delegates common tasks to. For more information, see [AUTOTITLE](/copilot/how-tos/use-copilot-agents/use-copilot-cli#use-custom-agents). * **Hooks**: Hooks allow you to execute custom shell commands at key points during agent execution, enabling you to add validation, logging, security scanning, or workflow automation. See [AUTOTITLE](/copilot/concepts/agents/coding-agent/about-hooks). @@ -213,13 +222,13 @@ Typically, you can choose from three options: #### Allowing tools to be used without manual approval -There are three command-line options that you can use for either interactive or programmatic mode to determine tools that {% data variables.product.prodname_copilot_short %} can use without asking for your approval: +There are three command-line options that you can use, in either interactive or programmatic sessions, to determine tools that {% data variables.product.prodname_copilot_short %} can use without asking for your approval: * **`--allow-all-tools`** Allows {% data variables.product.prodname_copilot_short %} to use any tool without asking for your approval. - For example, you can use this option with programmatic mode to allow the CLI to run any command. For example: + For example, you can use this option with a programmatic invocation of the CLI to allow {% data variables.product.prodname_copilot_short %} to run any command. For example: ```shell copilot -p "Revert the last commit" --allow-all-tools @@ -263,7 +272,7 @@ The `--deny-tool` and `--allow-tool` options require one of the following argume For example, `copilot --deny-tool 'My-MCP-Server(tool_name)'` prevents {% data variables.product.prodname_copilot_short %} from using the tool called `tool_name` from the MCP server called `My-MCP-Server`. - You can find an MCP server's name by entering `/mcp` in the interactive mode of {% data variables.copilot.copilot_cli_short %} and selecting the server from the list that's displayed. + You can find an MCP server's name by entering `/mcp` in the CLI's interactive interface, then selecting the server from the list that's displayed. #### Combining approval options @@ -295,7 +304,7 @@ The default model used by {% data variables.copilot.copilot_cli %} is {% data va You can change the model used by {% data variables.copilot.copilot_cli %} by using the `/model` slash command or the `--model` command-line option. Enter this command, then select a model from the list. -Each time you submit a prompt to {% data variables.product.prodname_copilot_short %} in {% data variables.copilot.copilot_cli_short %}'s interactive mode, and each time you use {% data variables.copilot.copilot_cli_short %} in programmatic mode, your monthly quota of {% data variables.product.prodname_copilot_short %} premium requests is reduced by one, multiplied by the multiplier shown in parentheses in the model list. For example, `Claude Sonnet 4.5 (1x)` indicates that with this model each time you submit a prompt your quota of premium requests is reduced by one. For information about premium requests, see [AUTOTITLE](/copilot/concepts/billing/copilot-requests). +Each time you submit a prompt to {% data variables.product.prodname_copilot_short %} in {% data variables.copilot.copilot_cli_short %}'s interactive interface, and each time you use {% data variables.copilot.copilot_cli_short %} programmatically, your monthly quota of {% data variables.product.prodname_copilot_short %} premium requests is reduced by one, multiplied by the multiplier shown in parentheses in the model list. For example, `Claude Sonnet 4.5 (1x)` indicates that with this model each time you submit a prompt your quota of premium requests is reduced by one. For information about premium requests, see [AUTOTITLE](/copilot/concepts/billing/copilot-requests). ## Use {% data variables.copilot.copilot_cli_short %} via ACP diff --git a/content/copilot/concepts/agents/copilot-cli/comparing-cli-features.md b/content/copilot/concepts/agents/copilot-cli/comparing-cli-features.md new file mode 100644 index 000000000000..45962eea5f6a --- /dev/null +++ b/content/copilot/concepts/agents/copilot-cli/comparing-cli-features.md @@ -0,0 +1,411 @@ +--- +title: Comparing GitHub Copilot CLI customization features +shortTitle: Comparing CLI features +intro: 'Find out about the various ways you can customize {% data variables.product.prodname_copilot_short %}: what they do, and when to use them.' +product: '{% data reusables.gated-features.copilot-cli %}' +versions: + feature: copilot +topics: + - Copilot +contentType: concepts +category: + - Learn about Copilot +--- + +## Introduction + +{% data variables.copilot.copilot_cli_short %} is a terminal-based AI agent that can answer questions, plan work, and complete tasks on your behalf. It’s designed to be highly extensible, and there are various ways in which you can customize its behavior and extend its capabilities. + +This article explains the difference between: + +* **Custom instructions** + + These tell {% data variables.product.prodname_copilot_short %} **how to behave** in general. For example, to ensure any code that {% data variables.product.prodname_copilot_short %} writes conforms to your coding standards. [Find out more](#custom-instructions). + +* **Skills** + + These tell {% data variables.product.prodname_copilot_short %} **how to handle a specific kind of task**. For example, to use a particular tool when working on a specific type of task. [Find out more](#skills). + +* **Tools** + + These **provide abilities**. For example, for finding and modifying files, or for interacting with parts of {% data variables.product.github %}. [Find out more](#tools). + +* **MCP servers** + + These **add collections of tools** that allow {% data variables.product.prodname_copilot_short %} to interact with external services. [Find out more](#mcp-servers). + +* **Hooks** + + These let you **run your own logic at specific lifecycle moments**. For example, you can run a specific script every time a CLI session starts or ends. [Find out more](#hooks). + +* **Subagents** + + These are **delegated agent processes**, tied to the main agent and used to perform specific tasks separately from the main agent process. They have their own context window, which can be populated without affecting the main agent's context. [Find out more](#subagents). + +* **Custom agents** + + These are **definitions of specialized abilities**, designed to perform specific tasks. The main CLI agent can delegate a task to a subagent, using a custom agent profile, to apply specialist knowledge and a particular approach to the task. For example, a custom agent might perform the role of a React reviewer, a docs writer, a security auditor, or a test generator. [Find out more](#custom-agents). + +* **Plugins** + + These are **packages** that can deliver preconfigured customizations such as skills, hooks, custom agents, and MCP servers. [Find out more](#plugins). + +## Custom instructions + +### What are custom instructions? + +**Custom instructions** are persistent guidance that the {% data variables.copilot.copilot_cli_short %} loads from instruction files at the start of a session. + +{% data variables.product.prodname_copilot_short %} will find and load instruction files from a number of default locations in the repository, such as `AGENTS.md` and `.github/copilot-instructions.md`, or from your home directory at `$HOME/.copilot/copilot-instructions.md`. + +You can use the `--no-custom-instructions` flag to avoid loading these instructions. + +### What problem do custom instructions solve? + +Custom instructions help you: +* Keep {% data variables.product.prodname_copilot_short %} aligned with your coding conventions and preferences. +* Apply team or organization standards consistently. +* Avoid having to include repetitive reminders to {% data variables.product.prodname_copilot_short %} in every prompt. + +### When should you use custom instructions? + +Use custom instructions for: + +* Style and quality rules + + Example: "Prefer small PRs, write tests, and avoid changing public APIs without discussion." + +* Repository conventions + + Example: "Use `pnpm`, keep changelog entries in `CHANGELOG.md`, run `pnpm test` before committing." + +* Communication preferences + + Example: “Explain tradeoffs briefly, then provide the recommended choice.” + +### When shouldn't you use custom instructions? + +Avoid or keep them minimal when: + +* You only want the behavior in one workflow (use a **skill** instead). +* Your instructions are so large/specific they distract {% data variables.product.prodname_copilot_short %} from the immediate task (prefer a **skill** or a **custom agent**). + +### Find out more about custom instructions + +See [AUTOTITLE](/copilot/how-tos/copilot-cli/add-custom-instructions). + +## Skills + +### What is a skill? + +A **skill** is, minimally, a Markdown file containing instructions that {% data variables.product.prodname_copilot_short %} can use to perform tasks in a specific context. The name and skill description allow {% data variables.product.prodname_copilot_short %} to determine whether it should use the skill for a given task. If it decides to use the skill, it will load the instructions and follow them to complete the task. + +Skills can optionally reference other files, stored within the skill directory. These can include scripts that {% data variables.product.prodname_copilot_short %} can run when the skill is used. + +### What problem does a skill solve? + +Skills help you: +* Standardize how {% data variables.product.prodname_copilot_short %} performs tasks in a specific context (for example, when performing a code review). +* Provide "just-in-time" instructions without permanently changing {% data variables.product.prodname_copilot_short %}'s behavior. +* Avoid overloading {% data variables.product.prodname_copilot_short %}'s context window with instructions that are not relevant to the current task. + +### How do you access skills? + +You can manually invoke a skill by using a slash command. For example, `/Markdown-Checker check README.md`. Use `/skills list` to list the available skills. + +{% data variables.copilot.copilot_cli_short %} automatically invokes skills when it detects one that is relevant to the current task. + +### When should you use a skill? + +Use a skill when you want: + +* A repeatable set of instructions or functionality to be available for a type of task. + + Example: a documentation skill that checks that user-facing documentation is updated when frontend code is changed. + +* A consistent output format. + + Example: a "release note draft" skill that ensures {% data variables.product.prodname_copilot_short %} uses a template to create a release note. + +* A workflow you sometimes need, but not always. + + Example: a “deep refactor” skill you only enable during migrations. + +### When shouldn't you use a skill? + +Avoid skills when: + +* The guidance should **apply to everything** you do (use **custom instructions** instead). +* You need new capabilities (you may need an **MCP server** to add tools, or a **custom agent** for specialization). + +### Find out more about agent skills + +See [AUTOTITLE](/copilot/concepts/agents/about-agent-skills). + +## Tools + +### What is a tool? + +A **tool** is an ability that {% data variables.product.prodname_copilot_short %} uses to get something done—like searching files, viewing file contents, editing, running a task, or invoking a skill. Some tools are built in, and others can be added through MCP servers. + +### What problem do tools solve? + +Tools let the CLI: + +* Gather accurate context (using read/search tools). +* Make changes safely (using edit tools). +* Execute commands and validate outcomes (potentially using subagents). + +### When should you use tools? + +You typically don't call tools directly—{% data variables.product.prodname_copilot_short %} decides to use tools as needed. You can allow or deny use of tools, either for a specific task, for the current session, or for all of your {% data variables.copilot.copilot_cli_short %} sessions. + +You’ll see {% data variables.product.prodname_copilot_short %} using tools when you: + +* Ask {% data variables.product.prodname_copilot_short %} to search the repository for something, update a file, or run tests. +* Invoke a skill—which triggers the `skill` tool. +* Ask {% data variables.product.prodname_copilot_short %} to perform a task that requires it to use a tool supplied by an MCP server. +* Task {% data variables.product.prodname_copilot_short %} to complete a complex task and it decides to delegate to a subagent—which triggers the `task` tool. + +### Find out more about allowing or denying tools + +See [AUTOTITLE](/copilot/concepts/agents/about-copilot-cli#allowed-tools). + +## MCP servers + +### What is an MCP server? + +An **MCP server** is a service that allows AI applications, such as {% data variables.copilot.copilot_cli_short %}, to connect to external data sources and tools. + +Adding an MCP server to {% data variables.copilot.copilot_cli_short %} provides additional capabilities, by allowing you to use tools supplied by that MCP server. For example, you could add an MCP server that provides tools for interacting with an online calendar application, or a support ticketing system. + +### What problem do MCP servers solve? + +MCP servers help when the built-in tools aren’t enough. They can: + +* Connect {% data variables.copilot.copilot_cli_short %} to external systems. +* Add purpose-built tools (for example, for working with APIs, databases, or image generation). +* Standardize safe access patterns for non-repository resources. + +### When should you use an MCP server? + +Use an MCP server when you need: + +* Integration with external data or systems. + + Example: `How many support tickets have been opened this month for Product X?` + +* Domain-specific actions that you want the CLI to perform on your behalf. + + Example: `Message the bug-watch channel: Only 2 support tickets raised this month for Product X.` + +### When shouldn't you use an MCP server? + +Avoid adding MCP servers when: + +* Built-in tools already cover your needs. + +### Find out more about MCP servers + +See [AUTOTITLE](/copilot/concepts/context/mcp). + +## Hooks + +### What is a hook? + +**Hooks** allow you to specify that, at a given point in a session lifecycle, {% data variables.copilot.copilot_cli_short %} will execute a shell command you have defined. + +| Hook | When it runs | +| ---- | ------------ | +| `preToolUse` / `postToolUse` | Before/after a tool runs. | +| `userPromptSubmitted` | When a user submits a prompt. | +| `sessionStart` / `sessionEnd` | At the start/end of a session. | +| `errorOccurred` | When an error occurs. | +| `agentStop` | When the main agent stops without an error. | +| `subagentStop` | When a subagent completes. | + +### What problem do hooks solve? + +Hooks help when you want **programmable control or observability** around {% data variables.copilot.copilot_cli_short %} behavior, such as: + +* **Enforcing guardrails**—block or warn before certain tools run. +* **Adding logging/telemetry** +* **Customizing retry/abort behavior on recoverable errors** +* **Adding "policy" checks**—for example, to prevent edits to protected paths. +* **Intercepting the moment a subagent finishes**—before results return to the parent agent. + +Hooks are useful when you need more control than skills or custom instructions can provide. While skills and instructions guide {% data variables.product.prodname_copilot_short %}'s behavior through prompts, hooks ensure that operations you have defined will be performed at specific moments—for example, to block a tool from running, or to log activity when a session ends. + +### When should you usehooks? + +Use hooks when you want: + +* **Tool guardrails** + + * Example: before `bash` runs, require that the specific command matches an allowlist. + * Example: before `edit` runs, block changes under `infra/` unless a ticket ID is present. + +* **Session lifecycle automation** + + * Example: when the agent stops, archive the transcript of the session to a storage location. + +* **Error handling policy** + + * Example: on rate limit errors, automatically choose "retry" with a capped retry count. + +* **Subagent workflow control** + + * Example: when a subagent finishes, validate its output before passing results back to the main agent. + +### When shouldn't you use hooks? + +Avoid hooks when: + +* You just need consistent prompting or workflow instructions (use **skills**). +* You want persistent preferences and standards (use **custom instructions**). +* You need new external capabilities (use **MCP servers** and tools). +* Maintaining configuration that can affect every session may be problematic for you. + +### Find out more about hooks + +See [AUTOTITLE](/copilot/how-tos/copilot-cli/use-hooks). + +## Subagents + +### What is a subagent? + +A **subagent** is the execution of a separate AI agent that the main agent of a {% data variables.copilot.copilot_cli_short %} session spins up to do a specific piece of work. + +{% data variables.copilot.copilot_cli_short %} uses a subagent when the main agent decides that delegating a chunk of work to a separate agent is the best way to complete the user’s request. + +### What problem do subagents solve? + +Subagents help {% data variables.product.prodname_copilot_short %}: + +* Keep the context window of the main agent in a CLI session focused, by offloading a chunk of work to a separate agent. +* Parallelize work, where necessary, by running certain tasks in the background. +* Run a custom agent separately from the main agent, performing specialist work with a different approach to the work carried out by the main agent. + +### When are subagents used? + +{% data variables.product.prodname_copilot_short %} is likely to use a subagent for: + +* Codebase exploration + + For example, listing all endpoints in an API. + +* Command execution for complex tasks + + For example, running a test suite, or building a large project and analyzing the results. + +* Reviewing changes + + For example, reviewing staged changes and identifying potential security issues. + +* Complex multi-step work + + For example, implementing a feature with several changes. + +* For using custom agents + + If you’ve defined a custom agent and it’s eligible for inference (`infer` is not set to `false`), {% data variables.product.prodname_copilot_short %} may choose to delegate work to that custom agent by spinning up a subagent with the custom agent's configuration. + +## Custom agents + +### What is a custom agent? + +**Custom agents** are a way that you can provide {% data variables.product.prodname_copilot_short %} with specialist knowledge about a particular subject, and define a particular approach that you want {% data variables.product.prodname_copilot_short %} to use when working in that area. You can think of a custom agent as a "persona" that {% data variables.product.prodname_copilot_short %} can adopt when working on certain tasks. + +You define a custom agent in a Markdown file with YAML frontmatter. The file contains: + +* A description of the agent's role and expertise +* A list of allowed tools (or all tools) +* Optional MCP server connections +* An optional `infer` setting—when enabled, {% data variables.product.prodname_copilot_short %} will automatically delegate to this agent when it detects a task that matches the agent's specialty. + +### What problem do custom agents solve? + +Custom agents help when you need: + +* Specialist knowledge to be applied consistently in a particular context. +* Different tool permissions for different work, as defined in the custom agent configuration. +* To allow the main agent's context window to stay focused on the main task, with the custom agent's own context window being used for the specialist work it performs. + +### When should you use a custom agent? + +Use a custom agent when you want: + +* A specialized reviewer or helper + + Example: Create a "react-reviewer" custom agent that focuses on work involving React patterns. + +* Safer permissions + + Example: A custom agent that can only `view/grep/glob` (read-only) for auditing. + +* Optional auto-delegation + + Example: Set `infer: true` in the custom agent configuration so that {% data variables.product.prodname_copilot_short %} can automatically use this custom agent when appropriate. + +### When shouldn't you use a custom agent? + +Avoid custom agents when: + +* You only need guidance text (a **skill** can be a lighter-weight solution). +* You don't need specialization and the default agent performs tasks well. + +### Find out more about custom agents + +See [AUTOTITLE](/copilot/reference/custom-agents-configuration). + +## Plugins + +### What is a plugin? + +A **plugin** is an installable package that can deliver a bundle of functionality to {% data variables.product.prodname_copilot_short %}. A plugin can include any combination of the other customization features. For example, skills, custom agents, hooks, and MCP server configurations. + +{% data variables.product.prodname_copilot_short %} includes plugin management commands (install, update, list, uninstall) and supports installing from a marketplace or directly from a GitHub repository. + +### What problem do plugins solve? + +Plugins help you: + +* Easily add a bundle of functionality to {% data variables.product.prodname_copilot_short %} without having to manually configure each piece. +* Package and distribute a custom configuration—potentially a combination of skills, custom agents, hooks, and MCP servers—to your team, or to the public. +* Alter available functionality without having to manually copy files into directories. + +### When should you use a plugin? + +Use a plugin when: + +* You want a team-wide bundle + + Example: A company-wide engineering plugin that includes: + + * Skills for incident response. + * A custom agent for code review. + * An MCP server for internal services. + +* You want easy installation and updates + + Example: Install a plugin initially, then update it regularly using `/plugin update PLUGIN-NAME`. + +### When shouldn't you use a plugin? + +Avoid plugins when: + +* You're experimenting locally and don't need distribution (use local skills, custom instructions, or custom agents). +* You only need a small one-off workflow. A single skill file may be simpler. + +## Putting it together: choosing the right option + +| Requirement | Best option | +|---|---| +| I want {% data variables.product.prodname_copilot_short %} to always follow our repository conventions. | **Custom instructions** | +| I want a repeatable workflow I can invoke on demand. | **Skills** | +| I want {% data variables.product.prodname_copilot_short %} to answer questions and carry out work in my repository. | {% data variables.product.prodname_copilot_short %} requests permission to use the appropriate **tools** | +| I want guardrails, policy, or automation around tool use and session events. | **Hooks** | +| I need {% data variables.product.prodname_copilot_short %} to be able to use tools provided by an external service. | **MCP servers** | +| When working on particular tasks, I want {% data variables.product.prodname_copilot_short %} to operate as a specialist with a constrained toolset. | **Custom agent** | +| I want {% data variables.product.prodname_copilot_short %} to carry out a complex task on my behalf. | {% data variables.product.prodname_copilot_short %} automatically uses **subagents** when appropriate. | +| I want to add a package of functionality to {% data variables.copilot.copilot_cli_short %} without configuring it manually myself. | **Plugin** | diff --git a/content/copilot/concepts/agents/copilot-cli/index.md b/content/copilot/concepts/agents/copilot-cli/index.md new file mode 100644 index 000000000000..48afe707f33c --- /dev/null +++ b/content/copilot/concepts/agents/copilot-cli/index.md @@ -0,0 +1,14 @@ +--- +title: Concepts for GitHub Copilot CLI +shortTitle: '{% data variables.copilot.copilot_cli_short %}' +allowTitleToDifferFromFilename: true +intro: Learn how you can use {% data variables.product.prodname_copilot %} in your terminal. +versions: + feature: copilot +topics: + - Copilot +children: + - /about-copilot-cli + - /comparing-cli-features +contentType: concepts +--- diff --git a/content/copilot/concepts/agents/index.md b/content/copilot/concepts/agents/index.md index 098d22a8124e..888c0f367533 100644 --- a/content/copilot/concepts/agents/index.md +++ b/content/copilot/concepts/agents/index.md @@ -9,8 +9,8 @@ topics: - Copilot children: - /coding-agent + - /copilot-cli - /code-review - - /about-copilot-cli - /copilot-memory - /about-third-party-agents - /openai-codex diff --git a/content/copilot/how-tos/copilot-cli/add-custom-instructions.md b/content/copilot/how-tos/copilot-cli/customize-copilot/add-custom-instructions.md similarity index 94% rename from content/copilot/how-tos/copilot-cli/add-custom-instructions.md rename to content/copilot/how-tos/copilot-cli/customize-copilot/add-custom-instructions.md index 5fa5baebfaaa..451e9aa484ef 100644 --- a/content/copilot/how-tos/copilot-cli/add-custom-instructions.md +++ b/content/copilot/how-tos/copilot-cli/customize-copilot/add-custom-instructions.md @@ -1,13 +1,14 @@ --- -title: Adding custom instructions for Copilot CLI +title: Adding custom instructions for {% data variables.copilot.copilot_cli %} shortTitle: Add custom instructions -intro: 'Create custom instructions files that give {% data variables.product.prodname_copilot_short %} additional context on how to understand your project and how to build, test and validate its changes.' +intro: 'Give {% data variables.product.prodname_copilot_short %} additional context on how to understand your project and how to build, test and validate its changes.' versions: feature: copilot topics: - Copilot redirect_from: - /copilot/how-tos/copilot-cli/add-repository-instructions + - /copilot/how-tos/copilot-cli/add-custom-instructions contentType: how-tos --- diff --git a/content/copilot/how-tos/copilot-cli/customize-copilot/create-custom-agents-for-cli.md b/content/copilot/how-tos/copilot-cli/customize-copilot/create-custom-agents-for-cli.md new file mode 100644 index 000000000000..b48b5c612636 --- /dev/null +++ b/content/copilot/how-tos/copilot-cli/customize-copilot/create-custom-agents-for-cli.md @@ -0,0 +1,140 @@ +--- +title: Creating and using custom agents for {% data variables.copilot.copilot_cli %} +shortTitle: Create custom agents +allowTitleToDifferFromFilename: true +intro: 'Create specialized agents with tailored expertise for specific development tasks.' +versions: + feature: copilot +topics: + - Copilot +category: + - Configure Copilot + - Author and optimize with Copilot +contentType: how-tos +--- + +## Introduction + +{% data variables.copilot.custom_agents_caps_short %} allow you to tailor {% data variables.product.prodname_copilot_short %}'s expertise for specific tasks. + +When you prompt {% data variables.product.prodname_copilot_short %} to carry out a task it may choose to use one of your {% data variables.copilot.custom_agents_short %}, if {% data variables.product.prodname_copilot_short %} determines that the agent's expertise is a good fit for the task. + +Work performed by a {% data variables.copilot.copilot_custom_agent_short %} is carried out using a subagent, which is a temporary agent spun up to complete the task. The subagent has its own context window, which can be populated by information that is not relevant to the main agent. In this way, especially for larger tasks, parts of the work can be offloaded to {% data variables.copilot.custom_agents_short %}, without cluttering the main agent's context window. The main agent can then focus on higher-level planning and coordination. + +For more information, see [AUTOTITLE](/copilot/concepts/agents/coding-agent/about-custom-agents). + +## Creating a {% data variables.copilot.copilot_custom_agent_short %} + +Each {% data variables.copilot.copilot_custom_agent_short %} is defined by a Markdown file with an `.agent.md` extension. You can create these files yourself, or you can add them from within the CLI, as described in the following steps. + +1. In interactive mode, enter `/agent`. +1. Select **Create new agent** from the list of options. +1. Choose between the options to create the {% data variables.copilot.copilot_custom_agent_short %} in the repository or in your home directory: + + * **Project** (`.github/agents/`) + * **User** (`~/.config/copilot/agents/`) + + > [!NOTE] + > If you have {% data variables.copilot.custom_agents_short %} with the same name in both locations, the one in your home directory will be used, rather than the one in the repository. + +1. Choose whether to get {% data variables.product.prodname_copilot_short %} to create the {% data variables.copilot.copilot_custom_agent_short %} file, or create it yourself. + + **Option 1: Use {% data variables.product.prodname_copilot_short %}** + + Enter details of the agent you want to create. Describe the agent's expertise and when the agent should be used. {% data variables.product.prodname_copilot_short %} will take the description you enter and use it to write an agent profile for you. + + For example, you could enter: + + ```text + I am a security expert. I check code files thoroughly for potential security issues. Use me whenever a security review/check/audit is requested for one or more code files, or when the word "seccheck" is used in a prompt in reference to code files. + + I will identify potential problems, such as code that: + + - Exposes secrets or credentials + - Allows cross-site scripting + - Allows SQL injection + - Contains vulnerable dependencies + - Allows authentication to be bypassed + + If any problems are identified, create a single GitHub issue in this repository on GitHub.com with details of problems, giving full details of each issue, including, but not limited to, risk level and recommended fix. + ``` + + After {% data variables.product.prodname_copilot_short %} finishes generating the initial agent profile it displays the following options: + + * Continue + * Review content + * Try again + * Quit + + If you choose to review the content, the agent file is opened in your default editor. You can review and make changes, if required, before continuing the agent creation process in the CLI. + + To complete the creation process, choose **Continue**. + + **Option 2: Create the agent profile manually** + + When you choose to create the agent file yourself, you'll be guided through a series of prompts to fill in the necessary information to create the agent profile. + + 1. Enter a name for the agent. The name you enter is the name that's displayed when you list the available agents. A version of this will be used as the name of the agent file—for example, if you enter "Security expert", the agent file will be named `security-expert.agent.md`. + + > [!TIP] + > For ease of use when using a {% data variables.copilot.copilot_custom_agent_short %} programmatically, it's recommended that you choose a name consisting only of lowercase letters and hyphens. + + 1. Enter a description that states what expertise this agent has and when it should be used. + 1. Enter instructions for how the agent should behave, including any specific guidelines, actions it should take or constraints it should follow. + +1. Choose which tools your {% data variables.copilot.copilot_custom_agent_short %} should have access to. + + By default, {% data variables.copilot.custom_agents_short %} have access to all tools. If you restrict an agent's access, a `tools` specification is added to the agent file. + +1. Restart the CLI to load your new {% data variables.copilot.copilot_custom_agent_short %}. + +## Using a {% data variables.copilot.copilot_custom_agent_short %} + +{% data variables.copilot.custom_agents_caps_short %} can be used in the following ways: + +* **Slash command** + + Enter `/agent` in interactive mode and choose from the list of available {% data variables.copilot.custom_agents_short %}. Then enter a prompt that will be passed to the selected agent. + + > [!NOTE] + > The CLI's default agents are not included in this list. For more information about the default agents, see [AUTOTITLE](/copilot/how-tos/copilot-cli/use-copilot-cli#use-custom-agents). + +* **Explicit instruction** + + Tell {% data variables.product.prodname_copilot_short %} to use a specific agent. For example: + + ```copilot + Use the security-auditor agent on all files in the /src/app directory + ``` + +* **By inference** + + Use a prompt that will trigger the use of a particular agent based on the description in the agent file. For example: + + ```copilot + Check all TypeScript files in or under the src directory for potential security problems + ``` + + or (where "seccheck" is defined as a trigger word in the agent profile): + + ```copilot + seccheck /src/app/validator.go + ``` + + {% data variables.product.prodname_copilot_short %} will automatically infer the agent you want to use. + +* **Programmatically** + + Specify the {% data variables.copilot.copilot_custom_agent_short %} you want to use with the command-line option. For example: + + ```shell + copilot --agent security-auditor --prompt "Check /src/app/validator.go" + ``` + + Where `security-auditor` is the file name of the {% data variables.copilot.copilot_custom_agent_short %} profile, without the `.agent.md` extension. Typically, but not necessarily, this is the same as the `name` value in the agent profile. + +## Further reading + +* [AUTOTITLE](/copilot/concepts/agents/copilot-cli/comparing-cli-features) +* [AUTOTITLE](/copilot/reference/custom-agents-configuration) +* [AUTOTITLE](/copilot/tutorials/customization-library/custom-agents)—a curated collection of examples diff --git a/content/copilot/how-tos/copilot-cli/customize-copilot/create-skills.md b/content/copilot/how-tos/copilot-cli/customize-copilot/create-skills.md new file mode 100644 index 000000000000..90e66442bb04 --- /dev/null +++ b/content/copilot/how-tos/copilot-cli/customize-copilot/create-skills.md @@ -0,0 +1,50 @@ +--- +title: Creating agent skills for {% data variables.copilot.copilot_cli %} +shortTitle: Create agent skills +allowTitleToDifferFromFilename: true +intro: 'Modify {% data variables.product.prodname_copilot_short %}''s behavior and abilities when it works on particular tasks.' +versions: + feature: copilot +topics: + - Copilot +contentType: how-tos +category: + - Configure Copilot + - Author and optimize with Copilot +--- + +Agent skills are folders of instructions, scripts, and resources that {% data variables.product.prodname_copilot_short %} can load when relevant to improve its performance in specialized tasks. For more information, see [AUTOTITLE](/copilot/concepts/agents/about-agent-skills). + +{% data reusables.copilot.creating-adding-skills %} + +## Using agent skills + +{% data reusables.copilot.skills-using %} + +To tell {% data variables.product.prodname_copilot_short %} to use a specific skill, include the skill name in your prompt, preceded by a forward slash. For example, if you have a skill named "frontend-design" you could use a prompt such as: + +```copilot +Use the /frontend-design skill to create a responsive navigation bar in React. +``` + +### Skills commands in the CLI + +* **List the currently available skills:** use the command `/skills list` or the prompt: + + ```copilot + What skills do you have? + ``` + +* **Enable or disable specific skills:** use the command `/skills` and then use the up and down keys on your keyboard, and the space bar, to toggle skills on or off. + +* **Find out more about a skill** (including its location): use the command `/skills info`. + +* **Add a skills location:** to add an alternative location in which to store skills, use the command `/skills add`. + +* **Reload skills:** if you have added a skill during a CLI session, you can add it using the command `/skills reload` to avoid having to restart the CLI to use it. + +* **Remove skills:** to remove a skill that you have added directly—not via a plugin—use the command `/skills remove SKILL-DIRECTORY`. To remove skills added as part of a plugin you must manage the plugin itself. Use the `info` subcommand to find out which plugin a skill came from. + +{% data reusables.copilot.skills-compared %} + +To learn more about how skills differ from other customization features, see [AUTOTITLE](/copilot/concepts/agents/copilot-cli/comparing-cli-features). diff --git a/content/copilot/how-tos/copilot-cli/customize-copilot/index.md b/content/copilot/how-tos/copilot-cli/customize-copilot/index.md new file mode 100644 index 000000000000..ea8e5d926883 --- /dev/null +++ b/content/copilot/how-tos/copilot-cli/customize-copilot/index.md @@ -0,0 +1,14 @@ +--- +title: Customize GitHub Copilot CLI +shortTitle: Customize Copilot CLI +intro: 'Learn how to customize {% data variables.copilot.copilot_cli_short %} to maximize its usefulness when working on a specific project.' +versions: + feature: copilot +contentType: how-tos +children: + - /quickstart-for-customizing + - /add-custom-instructions + - /use-hooks + - /create-skills + - /create-custom-agents-for-cli +--- diff --git a/content/copilot/how-tos/copilot-cli/customize-copilot/quickstart-for-customizing.md b/content/copilot/how-tos/copilot-cli/customize-copilot/quickstart-for-customizing.md new file mode 100644 index 000000000000..46e9cffea3fe --- /dev/null +++ b/content/copilot/how-tos/copilot-cli/customize-copilot/quickstart-for-customizing.md @@ -0,0 +1,63 @@ +--- +title: Overview of customizing {% data variables.copilot.copilot_cli %} +shortTitle: Overview +allowTitleToDifferFromFilename: true +intro: "{% data variables.copilot.copilot_cli_short %} works best when customized for your specific project and workflow." +versions: + feature: copilot +topics: + - Copilot +contentType: how-tos +category: + - Configure Copilot +--- + +You can download and install {% data variables.copilot.copilot_cli_short %}, and start using it straight away, without any additional configuration. However, you'll find that you can improve {% data variables.product.prodname_copilot_short %}'s responses if you spend a little time providing it with guidelines and context, and giving it access to tools that are relevant to your project. This article introduces the various ways in which you can customize {% data variables.copilot.copilot_cli_short %}. + +## Custom instructions + +You can provide {% data variables.product.prodname_copilot_short %} with instructions for how it should respond. Whenever you ask {% data variables.product.prodname_copilot_short %} a question, or task it to perform some work, a copy of these instructions is added to your prompt. This allows you, for example, to provide details of your project's coding standards, without having to manually tell {% data variables.product.prodname_copilot_short %} about them each time you start a conversation. + +For more information, see [AUTOTITLE](/copilot/how-tos/copilot-cli/customize-copilot/add-custom-instructions). + +## Hooks + +Hooks let you run your own shell commands at key points during a {% data variables.copilot.copilot_cli_short %} session. By defining hooks, you can automate specific operations to be triggered when certain events occur: such as the start or end of a session, whenever someone submits a prompt, after the agent completes a task, or when an error occurs. + +For example, you could set up a hook to automatically run tests after {% data variables.product.prodname_copilot_short %} makes changes to code files. + +For more information, see [AUTOTITLE](/copilot/how-tos/copilot-cli/customize-copilot/use-hooks). + +## Skills + +Skills are folders of instructions, scripts, and resources that {% data variables.product.prodname_copilot_short %} can load to improve its performance on specialized tasks. By adding skills to your project, you can give {% data variables.product.prodname_copilot_short %} extra knowledge or tools for particular workflows, technologies, or domains. + +For more information, see [AUTOTITLE](/copilot/how-tos/copilot-cli/customize-copilot/create-skills). + +## Custom agents + +Custom agents let you define specific expertise and behavior for the CLI when it works on a particular type of task. Custom agents are run as subagents—separately to the main agent that responds to a prompt—with their own context window. This allows {% data variables.product.prodname_copilot_short %} to offload work to custom agents without cluttering the main agent's context window, and to use the expertise of a custom agent when it's a good fit for the task at hand. + +You can define the toolset available to a custom agent, so that the tools the agent can use are appropriate to its role. For example, a custom agent that works as a reviewer would typically not be permitted to make changes to code files. + +For more information, see [AUTOTITLE](/copilot/how-tos/copilot-cli/customize-copilot/create-custom-agents-for-cli). + +## MCP servers + +The Model Context Protocol (MCP) allows you to add external tools and data sources to {% data variables.copilot.copilot_cli_short %}. By adding MCP servers to {% data variables.copilot.copilot_cli_short %} you can add functionality such as the ability to: + +* Query databases +* Access issue tracking systems +* Integrate with CI/CD pipelines +* Generate design diagrams +* Search specialist documentation sources +* Book tickets online +* Integrate with a calendar application + +For more information, see [AUTOTITLE](/copilot/concepts/context/mcp). + +## Plugins + +{% data variables.copilot.copilot_cli_short %} plugins are distributable packages that provide a simple way to extend the functionality of the CLI. + +They bundle multiple customization components together into a single installable unit. You can install plugins directly from a repository, from a plugin marketplace, or from a local path. diff --git a/content/copilot/how-tos/copilot-cli/use-hooks.md b/content/copilot/how-tos/copilot-cli/customize-copilot/use-hooks.md similarity index 83% rename from content/copilot/how-tos/copilot-cli/use-hooks.md rename to content/copilot/how-tos/copilot-cli/customize-copilot/use-hooks.md index b4dd5ba03022..68af445988af 100644 --- a/content/copilot/how-tos/copilot-cli/use-hooks.md +++ b/content/copilot/how-tos/copilot-cli/customize-copilot/use-hooks.md @@ -1,5 +1,5 @@ --- -title: Using hooks with GitHub Copilot CLI +title: Using hooks with {% data variables.copilot.copilot_cli %} shortTitle: Use hooks intro: "Extend {% data variables.product.prodname_copilot %} agent behavior with custom shell commands at key points during agent execution." versions: @@ -7,8 +7,10 @@ versions: topics: - Copilot contentType: how-tos -category: +category: - Configure Copilot +redirect_from: + - /copilot/how-tos/copilot-cli/use-hooks --- {% data reusables.copilot.coding-agent.hooks-intro %} @@ -26,4 +28,4 @@ category: * [AUTOTITLE](/copilot/reference/hooks-configuration) * [AUTOTITLE](/copilot/concepts/agents/coding-agent/about-coding-agent) * [AUTOTITLE](/copilot/concepts/agents/about-copilot-cli) -* [AUTOTITLE](/copilot/how-tos/use-copilot-agents/coding-agent/customize-the-agent-environment) \ No newline at end of file +* [AUTOTITLE](/copilot/how-tos/use-copilot-agents/coding-agent/customize-the-agent-environment) diff --git a/content/copilot/how-tos/copilot-cli/index.md b/content/copilot/how-tos/copilot-cli/index.md index 89e7c058df33..375ada885e8a 100644 --- a/content/copilot/how-tos/copilot-cli/index.md +++ b/content/copilot/how-tos/copilot-cli/index.md @@ -7,9 +7,8 @@ versions: children: - /cli-getting-started - /cli-best-practices + - /customize-copilot - /install-copilot-cli - - /add-custom-instructions - - /use-hooks - /use-copilot-cli contentType: how-tos --- diff --git a/content/copilot/how-tos/copilot-cli/use-copilot-cli.md b/content/copilot/how-tos/copilot-cli/use-copilot-cli.md index 54936ace13ca..1fe2e252d868 100644 --- a/content/copilot/how-tos/copilot-cli/use-copilot-cli.md +++ b/content/copilot/how-tos/copilot-cli/use-copilot-cli.md @@ -197,18 +197,42 @@ For more information, see [AUTOTITLE](/copilot/how-tos/copilot-cli/add-custom-in ### Use {% data variables.copilot.custom_agents_short %} -{% data variables.copilot.custom_agents_caps_short %} are specialized versions of {% data variables.copilot.copilot_coding_agent %} that you can tailor to your unique workflows, coding conventions, and use cases. {% data variables.copilot.custom_agents_caps_short %} are defined using Markdown files, called {% data variables.copilot.agent_profiles %}, that specify prompts, tools, and MCP servers. - -{% data variables.copilot.copilot_cli %} includes a default group of {% data variables.copilot.custom_agents_short %} for common tasks: - -| Agent | Description | -| --- | --- | -| Explore | Performs quick codebase analysis, allowing you to ask questions about your code without adding to your main context. | -| Task | Executes commands such as tests and builds, providing brief summaries on success and full output on failure. | -| Plan | Analyzes dependencies and structure to create implementation plans, helping you to understand how to approach a complex feature or refactoring task before making changes. | -| Code-review | Reviews changes with a focus on surfacing only genuine issues, minimizing noise. | - -When creating your own {% data variables.copilot.custom_agents_short %}, {% data variables.copilot.copilot_cli_short %} supports loading {% data variables.copilot.custom_agents_short %} from the following locations: +A {% data variables.copilot.copilot_custom_agent_short %} is a specialized versions of {% data variables.product.prodname_copilot_short %}. {% data variables.copilot.custom_agents_caps_short %} help {% data variables.product.prodname_copilot_short %} handle unique workflows, particular coding conventions, and specialist use cases. + +{% data variables.copilot.copilot_cli_short %} includes a default group of {% data variables.copilot.custom_agents_short %} for common tasks: + + + + + + + + + + + + + + + + + + + + + + + + + + +
AgentDescription
ExplorePerforms quick codebase analysis, allowing you to ask questions about your code without adding to your main context.
TaskExecutes commands such as tests and builds, providing brief summaries on success and full output on failure.
General-purposeHandles complex, multi-step tasks that require the full toolset and high-quality reasoning, running in a separate context to keep your main conversation clearly focused.
Code-reviewReviews changes with a focus on surfacing only genuine issues, minimizing noise.
+ +The AI model being used by the CLI can choose to delegate a task to a subsidiary subagent process, that operates using a {% data variables.copilot.copilot_custom_agent_short %} with specific expertise, if it judges that this would result in the work being completed more effectively. The model may equally choose to handle the work directly in the main agent. + +You can define your own {% data variables.copilot.custom_agents_short %} using Markdown files, called {% data variables.copilot.agent_profiles %}, that specify what expertise the agent should have, what tools it can use, and any specific instructions for how it should respond. + +You can define {% data variables.copilot.custom_agents_short %} at the user, repository, or organization/enterprise level: | Type | Location | Scope | | --- | --- | --- | @@ -220,7 +244,7 @@ In the case of naming conflicts, a system-level agent overrides a repository-lev {% data variables.copilot.custom_agents_caps_short %} can be used in three ways: -* Using the slash command in interactive mode to select from the list of available {% data variables.copilot.custom_agents_short %}: +* Using the slash command in the CLI's interactive interface to select from the list of available {% data variables.copilot.custom_agents_short %}: ```shell /agent @@ -246,7 +270,7 @@ For more information, see [AUTOTITLE](/copilot/how-tos/use-copilot-agents/coding You can create skills to enhance the ability of {% data variables.product.prodname_copilot_short %} to perform specialized tasks with instructions, scripts, and resources. -For more information, see [AUTOTITLE](/copilot/concepts/agents/about-agent-skills). +For more information, see [AUTOTITLE](/copilot/how-tos/copilot-cli/customize-copilot/create-skills). ### Add an MCP server diff --git a/content/copilot/how-tos/use-copilot-agents/coding-agent/create-a-pr.md b/content/copilot/how-tos/use-copilot-agents/coding-agent/create-a-pr.md index 7773049cb331..3314b21df75f 100644 --- a/content/copilot/how-tos/use-copilot-agents/coding-agent/create-a-pr.md +++ b/content/copilot/how-tos/use-copilot-agents/coding-agent/create-a-pr.md @@ -78,7 +78,7 @@ You can assign an issue to {% data variables.product.prodname_copilot_short %}: Additional options are displayed. - ![Screenshot of "Assign to Copilot" dialog showing options for target repository, starting branch, custom agent, and additional instructions.](/assets/images/help/copilot/coding-agent/assign-to-copilot-dialog.png) + ![Screenshot of "Assign to Copilot" dialog showing options for target repository, starting branch, {% data variables.copilot.copilot_custom_agent_short %}, and additional instructions.](/assets/images/help/copilot/coding-agent/assign-to-copilot-dialog.png) 1. In the **Optional prompt** field you can add specific guidance for {% data variables.product.prodname_copilot_short %}. Add any context, constraints, or specific requirements that will help {% data variables.product.prodname_copilot_short %} to understand and complete the task. @@ -127,7 +127,7 @@ You can assign issues to {% data variables.product.prodname_copilot_short %} usi | `targetRepositoryId` | `target_repo` | The repository where {% data variables.product.prodname_copilot_short %} will work | | `baseRef` | `base_branch` | The branch that {% data variables.product.prodname_copilot_short %} will branch from | | `customInstructions` | `custom_instructions` | Additional instructions for {% data variables.product.prodname_copilot_short %} | -| `customAgent` | `custom_agent` | A custom agent to use for the task | +| `customAgent` | `custom_agent` | A {% data variables.copilot.copilot_custom_agent_short %} to use for the task | | `model` | `model` | The model for {% data variables.product.prodname_copilot_short %} to use | #### Using the GraphQL API diff --git a/content/copilot/how-tos/use-copilot-agents/coding-agent/create-custom-agents.md b/content/copilot/how-tos/use-copilot-agents/coding-agent/create-custom-agents.md index cab507467e25..776da50cc2f6 100644 --- a/content/copilot/how-tos/use-copilot-agents/coding-agent/create-custom-agents.md +++ b/content/copilot/how-tos/use-copilot-agents/coding-agent/create-custom-agents.md @@ -1,5 +1,5 @@ --- -title: Creating custom agents +title: Creating custom agents for {% data variables.copilot.copilot_coding_agent %} shortTitle: Create custom agents intro: 'You can create specialized agents with tailored expertise for specific development tasks.' product: '{% data reusables.gated-features.copilot-coding-agent %}
Sign up for {% data variables.product.prodname_copilot_short %} {% octicon "link-external" height:16 %}' @@ -12,7 +12,7 @@ category: - Author and optimize with Copilot --- -{% data variables.copilot.custom_agents_caps_short %} allow you to create specialized agents with tailored expertise for specific tasks. For a conceptual overview of {% data variables.copilot.custom_agents_short %}, see [AUTOTITLE](/copilot/concepts/agents/coding-agent/about-custom-agents). +{% data variables.copilot.custom_agents_caps_short %} allow you to tailor {% data variables.product.prodname_copilot_short %}'s expertise for specific tasks. For a conceptual overview of {% data variables.copilot.custom_agents_short %}, see [AUTOTITLE](/copilot/concepts/agents/coding-agent/about-custom-agents). {% data reusables.copilot.custom-agents-ide-preview %} @@ -28,14 +28,14 @@ category: 1. Optionally, select the branch you want to create the {% data variables.copilot.agent_profile %} in. The default is the main branch. 1. Click {% octicon "copilot" aria-label="Select a custom agent" %}, then click **{% octicon "plus" aria-label="Plus button" %} Create an agent**. This will open a template agent profile called `my-agent.agent.md` in the `.github/agents` directory of your target repository. 1. If you are creating an organization or enterprise-level {% data variables.copilot.copilot_custom_agent_short %}, delete the `.github/` portion of the file path to move your template to the root `agents` directory. -1. Edit the filename (the text before `.agent.md`), selecting a unique, descriptive name that identifies the agent's purpose. Note that the filename may only contain the following characters: `.`, `-`, `_`, `a-z`, `A-Z`, `0-9`. +1. Edit the filename (the text before `.agent.md`), selecting a unique, descriptive name that identifies the agent's purpose. Note that the filename may only contain the following characters: `.`, `-`, `_`, `a-z`, `A-Z`, `0-9`. 1. Configure the {% data variables.copilot.agent_profile %}, including the name, description, tools, and prompts. For more information on what the {% data variables.copilot.agent_profile %} can include, see [Configuring an {% data variables.copilot.agent_profile %}](#configuring-an-agent-profile). 1. Commit the file to the repository and merge it into the default branch. Go back to the agents tab and refresh the page if needed. Your {% data variables.copilot.copilot_custom_agent_short %} will now appear in the dropdown when you click {% octicon "copilot" aria-hidden="true" aria-label="copilot" %} in the prompt box. ## Creating a {% data variables.copilot.copilot_custom_agent_short %} profile in {% data variables.product.prodname_vscode %} 1. Open {% data variables.copilot.copilot_chat %} in {% data variables.product.prodname_vscode %}. -1. From the agents dropdown at the bottom of the chat view, click **Configure Custom Agents...**, then click **{% octicon "plus" aria-label="Plus button" %} Create new custom agent**. +1. From the agents dropdown at the bottom of the chat view, click **Configure Custom Agents...**, then click **{% octicon "plus" aria-label="Plus button" %} Create new {% data variables.copilot.copilot_custom_agent_short %}**. 1. Choose the location where the {% data variables.copilot.agent_profile %} should be created: * **Workspace**: Create the {% data variables.copilot.copilot_custom_agent_short %} profile in the `.github/agents` folder of your workspace to only use it within that workspace. * **User profile**: Create the {% data variables.copilot.copilot_custom_agent_short %} profile in the current user profile folder to use it across all your workspaces. @@ -74,7 +74,7 @@ To update an {% data variables.copilot.agent_profile %}, select **Configure Agen 1. From the agents dropdown at the bottom of the chat view, click **{% octicon "plus" aria-label="Plus button" %} Create an agent**. 1. Enter a file name for the {% data variables.copilot.copilot_custom_agent_short %}. This is the default name that appears in the agents dropdown. 1. Configure the {% data variables.copilot.agent_profile %} in the newly created `.agent.md` file in the `.github/agents` directory, including the description, tools, and prompts. For more information on what the {% data variables.copilot.agent_profile %} can include, see [Configuring an {% data variables.copilot.agent_profile %}](#configuring-an-agent-profile). - * You can use the **Customize Agent** button within the file editor to open a dialog, where you can select the AI model for the agent to use, select available tools (including built-in and MCP server tools), and configure the `handoffs` property for transitioning between custom agents. Click **Apply** to add selected options to the {% data variables.copilot.agent_profile %}. + * You can use the **Customize Agent** button within the file editor to open a dialog, where you can select the AI model for the agent to use, select available tools (including built-in and MCP server tools), and configure the `handoffs` property for transitioning between {% data variables.copilot.custom_agents_short %}. Click **Apply** to add selected options to the {% data variables.copilot.agent_profile %}. To update an {% data variables.copilot.agent_profile %}, from the agents dropdown, click the pencil icon next to the agent you want to modify. diff --git a/content/copilot/how-tos/use-copilot-agents/coding-agent/create-skills.md b/content/copilot/how-tos/use-copilot-agents/coding-agent/create-skills.md new file mode 100644 index 000000000000..8c2e469c1ac3 --- /dev/null +++ b/content/copilot/how-tos/use-copilot-agents/coding-agent/create-skills.md @@ -0,0 +1,26 @@ +--- +title: Creating agent skills for {% data variables.product.prodname_copilot %} +shortTitle: Create agent skills +allowTitleToDifferFromFilename: true +intro: 'You can modify {% data variables.product.prodname_copilot_short %}''s behavior and abilities when it works on particular tasks.' +versions: + feature: copilot +topics: + - Copilot +contentType: how-tos +category: + - Configure Copilot + - Author and optimize with Copilot +--- + +> [!NOTE] +> Agent skills work with {% data variables.copilot.copilot_coding_agent %}, the {% data variables.copilot.copilot_cli %} and agent mode in {% data variables.product.prodname_vscode %} Insiders. Support in the stable version of {% data variables.product.prodname_vscode_shortname %} is coming soon. + +Agent skills are folders of instructions, scripts, and resources that {% data variables.product.prodname_copilot_short %} can load when relevant to improve its performance in specialized tasks. For more information, see [AUTOTITLE](/copilot/concepts/agents/about-agent-skills). + +{% data reusables.copilot.creating-adding-skills %} + +## How {% data variables.product.prodname_copilot_short %} uses agent skills + +{% data reusables.copilot.skills-using %} +{% data reusables.copilot.skills-compared %} diff --git a/content/copilot/how-tos/use-copilot-agents/coding-agent/index.md b/content/copilot/how-tos/use-copilot-agents/coding-agent/index.md index d45f880afd9c..70b3fda77ded 100644 --- a/content/copilot/how-tos/use-copilot-agents/coding-agent/index.md +++ b/content/copilot/how-tos/use-copilot-agents/coding-agent/index.md @@ -14,6 +14,7 @@ children: - /review-copilot-prs - /create-custom-agents - /test-custom-agents + - /create-skills - /extend-coding-agent-with-mcp - /integrate-coding-agent-with-slack - /integrate-coding-agent-with-teams diff --git a/content/copilot/reference/ai-models/model-comparison.md b/content/copilot/reference/ai-models/model-comparison.md index 74fe98fb8d16..ec7632193c4b 100644 --- a/content/copilot/reference/ai-models/model-comparison.md +++ b/content/copilot/reference/ai-models/model-comparison.md @@ -25,8 +25,6 @@ contentType: reference ### Recommended models by task -{% data reusables.copilot.grok-promo-period %} - Use this table to find a suitable model quickly, see more detail in the sections below. diff --git a/content/copilot/reference/ai-models/model-hosting.md b/content/copilot/reference/ai-models/model-hosting.md index 84c40c3c5a73..4a5637659070 100644 --- a/content/copilot/reference/ai-models/model-hosting.md +++ b/content/copilot/reference/ai-models/model-hosting.md @@ -86,8 +86,6 @@ When using {% data variables.copilot.copilot_gemini %} models, input prompts and ## xAI models -{% data reusables.copilot.grok-promo-period %} - These models are hosted on xAI. xAI operates {% data variables.copilot.copilot_grok_code %} in {% data variables.product.prodname_copilot %} under a zero data retention API policy. This means xAI commits that user content (both inputs sent to the model and outputs generated by the model): Will **not** be: diff --git a/content/copilot/reference/ai-models/supported-models.md b/content/copilot/reference/ai-models/supported-models.md index fa355402a4f2..8fca4b9b7e6b 100644 --- a/content/copilot/reference/ai-models/supported-models.md +++ b/content/copilot/reference/ai-models/supported-models.md @@ -37,8 +37,6 @@ For all of the default AI models, input prompts and output completions run throu This table lists the AI models available in {% data variables.product.prodname_copilot_short %}, along with their release status and availability in different modes. -{% data reusables.copilot.grok-promo-period %} - {% rowheaders %} | Model name | Provider | Release status | Agent mode | Ask mode | Edit mode | diff --git a/content/copilot/reference/cli-command-reference.md b/content/copilot/reference/cli-command-reference.md index 0b27abf83d5c..8d4e02431a0d 100644 --- a/content/copilot/reference/cli-command-reference.md +++ b/content/copilot/reference/cli-command-reference.md @@ -15,14 +15,14 @@ contentType: reference | Command | Purpose | |------------------------|----------------------------------------------------| -| `copilot` | Launch interactive mode. | +| `copilot` | Launch the interactive user interface. | | `copilot help [topic]` | Display help information. Help topics include: `config`, `commands`, `environment`, `logging`, and `permissions`. | | `copilot init` | Initialize {% data variables.product.prodname_copilot_short %} custom instructions for this repository. | | `copilot update` | Download and install the latest version. | | `copilot version` | Display version information and check for updates. | | `copilot plugin` | Manage plugins and plugin marketplaces. | -## Global shortcuts in interactive mode +## Global shortcuts in the interactive interface | Shortcut | Purpose | |-------------------------------------|---------------------------------------| @@ -34,14 +34,14 @@ contentType: reference | Ctrl+D | Shutdown. | | Ctrl+L | Clear the screen. | -## Timeline shortcuts in interactive mode +## Timeline shortcuts in the interactive interface | Shortcut | Purpose | |-------------------------------------|---------------------------------------| | ctrl+o | While there is nothing in the prompt input, this expands recent items in {% data variables.product.prodname_copilot_short %}'s response timeline to show more details. | | ctrl+e | While there is nothing in the prompt input, this expands all items in {% data variables.product.prodname_copilot_short %}'s response timeline. | -## Navigation shortcuts in interactive mode +## Navigation shortcuts in the interactive interface | Shortcut | Purpose | |-------------------------------------|----------------------------------------------| @@ -55,7 +55,7 @@ contentType: reference | / | Navigate the command history. | -## Slash commands in interactive mode +## Slash commands in the interactive interface | Command | Purpose | |-----------------------------------------------------|---------| @@ -94,7 +94,7 @@ contentType: reference | `/usage` | Display session usage metrics and statistics. | | `/user [show\|list\|switch]` | Manage the current {% data variables.product.github %} user. | -For a complete list of available slash commands enter `/help` in interactive mode. +For a complete list of available slash commands enter `/help` in the CLI's interactive interface. ## Command-line options @@ -105,10 +105,10 @@ For a complete list of available slash commands enter `/help` in interactive mod | `--add-github-mcp-tool TOOL` | Add a tool to enable for the {% data variables.product.github %} MCP server, instead of the default CLI subset (can be used multiple times). Use `*` for all tools. | | `--add-github-mcp-toolset TOOLSET` | Add a toolset to enable for the {% data variables.product.github %} MCP server, instead of the default CLI subset (can be used multiple times). Use `all` for all toolsets. | | `--additional-mcp-config JSON` | Additional MCP servers configuration as a JSON string or a file path (prefix with `@`) (can be used multiple times). Augments the configuration from `~/.copilot/mcp-config.json` for this session. | -| `--agent AGENT` | Specify a custom agent to use. | +| `--agent AGENT` | Specify a {% data variables.copilot.copilot_custom_agent_short %} to use. | | `--allow-all` | Enable all permissions (equivalent to `--allow-all-tools --allow-all-paths --allow-all-urls`). | | `--allow-all-paths` | Disable file path verification and allow access to any path. | -| `--allow-all-tools` | Allow all tools to run automatically without confirmation. Required for non-interactive mode (env: `COPILOT_ALLOW_ALL`). | +| `--allow-all-tools` | Allow all tools to run automatically without confirmation. Required when using the CLI programmatically (env: `COPILOT_ALLOW_ALL`). | | `--allow-all-urls` | Allow access to all URLs without confirmation. | | `--allow-tool [TOOLS...]` | Tools the CLI has permission to use. Will not prompt for permission. | | `--allow-url [URLS...]` | Allow access to specific URLs or domains. | @@ -126,7 +126,7 @@ For a complete list of available slash commands enter `/help` in interactive mod | `--excluded-tools [TOOLS...]` | These tools will not be available to the model. | | `--experimental` | Enable experimental features (use `--no-experimental` to disable). | | `-h`, `--help` | Display help. | -| `-i PROMPT`, `--interactive PROMPT` | Start interactive mode and automatically execute this prompt. | +| `-i PROMPT`, `--interactive PROMPT` | Start an interactive session and automatically execute this prompt. | | `--log-dir DIRECTORY` | Set the log file directory (default: `~/.copilot/logs/`). | | `--log-level LEVEL` | Set the log level (choices: `none`, `error`, `warning`, `info`, `debug`, `all`, `default`). | | `--model MODEL` | Set the AI model you want to use. | @@ -134,13 +134,13 @@ For a complete list of available slash commands enter `/help` in interactive mod | `--no-auto-update` | Disable downloading CLI updates automatically. | | `--no-color` | Disable all color output. | | `--no-custom-instructions` | Disable loading of custom instructions from `AGENTS.md` and related files. | -| `-p PROMPT`, `--prompt PROMPT` | Execute a prompt in non-interactive mode (exits after completion). | +| `-p PROMPT`, `--prompt PROMPT` | Execute a prompt programmatically (exits after completion). | | `--plain-diff` | Disable rich diff rendering (syntax highlighting via the diff tool specified by your git config). | | `--resume [SESSION-ID]` | Resume from a previous session (optionally specify a session ID). | | `-s`, `--silent` | Output only the agent response (without usage statistics), useful for scripting with `-p`. | | `--screen-reader` | Enable screen reader optimizations. | -| `--share [PATH]` | Share a session to a Markdown file after completion in non-interactive mode (default path: `./copilot-session-.md`). | -| `--share-gist` | Share a session to a secret {% data variables.product.github %} gist after completion in non-interactive mode. | +| `--share [PATH]` | Share a session to a Markdown file after completion of a programmatic session (default path: `./copilot-session-.md`). | +| `--share-gist` | Share a session to a secret {% data variables.product.github %} gist after completion of a programmatic session. | | `--stream MODE` | Enable or disable streaming mode (mode choices: `on` or `off`). | | `-v`, `--version` | Show version information. | | `--yolo` | Enable all permissions (equivalent to `--allow-all-tools --allow-all-paths --allow-all-urls`). | diff --git a/content/copilot/tutorials/customization-library/custom-agents/bug-fix-teammate.md b/content/copilot/tutorials/customization-library/custom-agents/bug-fix-teammate.md index 1d2975b39c9b..aca7f905e79b 100644 --- a/content/copilot/tutorials/customization-library/custom-agents/bug-fix-teammate.md +++ b/content/copilot/tutorials/customization-library/custom-agents/bug-fix-teammate.md @@ -64,8 +64,8 @@ Your goal is to make the codebase more stable and reliable by implementing worki ## How to use this {% data variables.copilot.copilot_custom_agent_short %} 1. Go to the agents tab at [https://github.com/copilot/agents](https://github.com/copilot/agents?ref_product=copilot&ref_type=engagement&ref_style=text). -1. Using the dropdown menus in the text box, select the repository and branch you want the custom agent to work in. -1. Click {% octicon "copilot" aria-hidden="true" aria-label="copilot" %}, then click **{% octicon "plus" aria-label="Plus button" %} Create a custom agent**. +1. Using the dropdown menus in the text box, select the repository and branch you want the {% data variables.copilot.copilot_custom_agent_short %} to work in. +1. Click {% octicon "copilot" aria-hidden="true" aria-label="copilot" %}, then click **{% octicon "plus" aria-label="Plus button" %} Create a {% data variables.copilot.copilot_custom_agent_short %}**. 1. An {% data variables.copilot.agent_profile %} template called `my-agent.agent.md` will open in the `.github/agents` directory, in the repository you chose. Name the file `bug-fix-teammate.agent.md` and paste in the example {% data variables.copilot.agent_profile %}. 1. Commit and merge this file into your repository's default branch. Go back to the agents tab (you may need to refresh the page), and in the text box, select your "bug-fix-teammate" agent from the dropdown. 1. In the text box, enter a task for the agent (such as the example below) and click **{% octicon "paper-airplane" aria-label="Start task" %}** or press Enter. diff --git a/content/copilot/tutorials/customization-library/custom-agents/cleanup-specialist.md b/content/copilot/tutorials/customization-library/custom-agents/cleanup-specialist.md index 6ae1faef262d..eaf41571ecc1 100644 --- a/content/copilot/tutorials/customization-library/custom-agents/cleanup-specialist.md +++ b/content/copilot/tutorials/customization-library/custom-agents/cleanup-specialist.md @@ -74,8 +74,8 @@ Focus on cleaning up existing code rather than adding new features. Work on both ## How to use this {% data variables.copilot.copilot_custom_agent_short %} 1. Go to the agents tab at [https://github.com/copilot/agents](https://github.com/copilot/agents?ref_product=copilot&ref_type=engagement&ref_style=text). -1. Using the dropdown menus in the text box, select the repository and branch you want the custom agent to work in. -1. Click {% octicon "copilot" aria-hidden="true" aria-label="copilot" %}, then click **{% octicon "plus" aria-label="Plus button" %} Create a custom agent**. +1. Using the dropdown menus in the text box, select the repository and branch you want the {% data variables.copilot.copilot_custom_agent_short %} to work in. +1. Click {% octicon "copilot" aria-hidden="true" aria-label="copilot" %}, then click **{% octicon "plus" aria-label="Plus button" %} Create a {% data variables.copilot.copilot_custom_agent_short %}**. 1. An {% data variables.copilot.agent_profile %} template called `my-agent.agent.md` will open in the `.github/agents` directory, in the repository you chose. Name the file `cleanup-specialist.agent.md` and paste in the example {% data variables.copilot.agent_profile %}. 1. Commit and merge this file into your repository's default branch. Go back to the agents tab (you may need to refresh the page), and in the text box, select your "cleanup-specialist" agent from the dropdown. 1. In the text box, enter a task for the agent (such as the example below) and click **{% octicon "paper-airplane" aria-label="Start task" %}** or press Enter. diff --git a/content/copilot/tutorials/customization-library/custom-agents/implementation-planner.md b/content/copilot/tutorials/customization-library/custom-agents/implementation-planner.md index e147a347e50e..3f9b69562cb0 100644 --- a/content/copilot/tutorials/customization-library/custom-agents/implementation-planner.md +++ b/content/copilot/tutorials/customization-library/custom-agents/implementation-planner.md @@ -78,8 +78,8 @@ Adjust the detail level based on your needs - solo projects might need less form ## How to use this {% data variables.copilot.copilot_custom_agent_short %} 1. Go to the agents tab at [https://github.com/copilot/agents](https://github.com/copilot/agents?ref_product=copilot&ref_type=engagement&ref_style=text). -1. Using the dropdown menus in the text box, select the repository and branch you want the custom agent to work in. -1. Click {% octicon "copilot" aria-hidden="true" aria-label="copilot" %}, then click **{% octicon "plus" aria-label="Plus button" %} Create a custom agent**. +1. Using the dropdown menus in the text box, select the repository and branch you want the {% data variables.copilot.copilot_custom_agent_short %} to work in. +1. Click {% octicon "copilot" aria-hidden="true" aria-label="copilot" %}, then click **{% octicon "plus" aria-label="Plus button" %} Create a {% data variables.copilot.copilot_custom_agent_short %}**. 1. An {% data variables.copilot.agent_profile %} template called `my-agent.agent.md` will open in the `.github/agents` directory, in the repository you chose. Name the file `implementation-planner.agent.md` and paste in the example {% data variables.copilot.agent_profile %}. 1. Commit and merge this file into your repository's default branch. Go back to the agents tab (you may need to refresh the page), and in the text box, select your "implementation-planner" agent from the dropdown. 1. In the text box, enter a task for the agent (such as the example below) and click **{% octicon "paper-airplane" aria-label="Start task" %}** or press Enter. diff --git a/content/copilot/tutorials/customization-library/custom-agents/your-first-custom-agent.md b/content/copilot/tutorials/customization-library/custom-agents/your-first-custom-agent.md index ad901c5e8648..9979dd4d1c88 100644 --- a/content/copilot/tutorials/customization-library/custom-agents/your-first-custom-agent.md +++ b/content/copilot/tutorials/customization-library/custom-agents/your-first-custom-agent.md @@ -74,7 +74,7 @@ Test this agent by giving it a task to complete: 1. Go to the agents tab at [https://github.com/copilot/agents](https://github.com/copilot/agents?ref_product=copilot&ref_type=engagement&ref_style=text). 1. Using the dropdown menus in the text box, select the repository and branch you're comfortable testing with (ideally one with a minimal or outdated README). -1. Click {% octicon "copilot" aria-hidden="true" aria-label="copilot" %}, then click **{% octicon "plus" aria-label="Plus button" %} Create a custom agent**. +1. Click {% octicon "copilot" aria-hidden="true" aria-label="copilot" %}, then click **{% octicon "plus" aria-label="Plus button" %} Create a {% data variables.copilot.copilot_custom_agent_short %}**. 1. An {% data variables.copilot.agent_profile %} template called `my-agent.agent.md` will open in the `.github/agents` directory, in the repository you chose. Name the file `readme-specialist.agent.md` and paste in the example {% data variables.copilot.agent_profile %}. 1. Commit and merge this file into your repository's default branch. Go back to the agents tab (you may need to refresh the page), and in the text box, select your "readme-specialist" agent from the dropdown. 1. In the text box, enter a task for the agent (such as the example below) and click **{% octicon "paper-airplane" aria-label="Start task" %}** or press Enter. diff --git a/data/reusables/copilot/coding-agent/hooks-intro.md b/data/reusables/copilot/coding-agent/hooks-intro.md index b29864ac987a..e848233e02f8 100644 --- a/data/reusables/copilot/coding-agent/hooks-intro.md +++ b/data/reusables/copilot/coding-agent/hooks-intro.md @@ -1 +1 @@ -Hooks allow you to extend and customize the behavior of {% data variables.product.prodname_copilot %} agents by executing custom shell commands at key points during agent execution. For a conceptual overview of hooks, see [AUTOTITLE](/copilot/concepts/agents/coding-agent/about-hooks). +Hooks allow you to extend and customize the behavior of {% data variables.product.prodname_copilot %} agents by executing custom shell commands at key points during agent execution. For a conceptual overview of hooks—including details of the available hook triggers—see [AUTOTITLE](/copilot/concepts/agents/coding-agent/about-hooks). diff --git a/data/reusables/copilot/creating-adding-skills.md b/data/reusables/copilot/creating-adding-skills.md new file mode 100644 index 000000000000..65a57707d7ad --- /dev/null +++ b/data/reusables/copilot/creating-adding-skills.md @@ -0,0 +1,53 @@ +## Creating and adding a skill + +To create an agent skill you write a `SKILL.md` file and, optionally, other resources, such as supplementary Markdown files, or scripts, which you reference in the `SKILL.md` instructions. + +To add a skill, you save the `SKILL.md` file, and any subsidiary resources, to a location where {% data variables.product.prodname_copilot_short %} knows to look for skills. This can be within a repository, or within your home directory. + +1. Create a `skills` directory to store your skill and any others you may want to create in the future. + + For **project skills**, specific to a single repository, store your skill under `.github/skills` or `.claude/skills`. + + For **personal skills**, shared across projects, store your skill under `~/.copilot/skills` or `~/.claude/skills`. + +1. Create a subdirectory for your new skill. Each skill should have its own directory (for example, `.github/skills/webapp-testing`). + + Skill subdirectory names should be lowercase and use hyphens for spaces. + +1. In your skill subdirectory, create a `SKILL.md` file containing your skill's instructions. + + > [!IMPORTANT] + > Skill files must be named `SKILL.md`. + + `SKILL.md` files are Markdown files with YAML frontmatter. In their simplest form, they include: + + * YAML frontmatter + * **name** (required): A unique identifier for the skill. This must be lowercase, using hyphens for spaces. Typically, this matches the name of the skill's directory. + * **description** (required): A description of what the skill does, and when {% data variables.product.prodname_copilot_short %} should use it. + * **license** (optional): A description of the license that applies to this skill. + * A Markdown body, with the instructions, examples and guidelines for {% data variables.product.prodname_copilot_short %} to follow. + +1. Optionally, add scripts, examples or other resources to your skill's directory. + + For example, if you were writing a skill for converting images between different formats, you might include a script for converting SVG images to PNG. The skill instructions should tell {% data variables.product.prodname_copilot_short %} when, and how, to use these resources. + +### Example `SKILL.md` file + +For a **project skill**, this file would be located in a `.github/skills/github-actions-failure-debugging` directory of your repository. + +For a **personal skill**, this file would be located in a `~/.copilot/skills/github-actions-failure-debugging` directory. + +```markdown copy +--- +name: github-actions-failure-debugging +description: Guide for debugging failing {% data variables.product.prodname_actions %} workflows. Use this when asked to debug failing {% data variables.product.prodname_actions %} workflows. +--- + +To debug failing {% data variables.product.prodname_actions %} workflows in a pull request, follow this process, using tools provided from the {% data variables.product.github %} MCP Server: + +1. Use the `list_workflow_runs` tool to look up recent workflow runs for the pull request and their status +2. Use the `summarize_job_log_failures` tool to get an AI summary of the logs for failed jobs, to understand what went wrong without filling your context windows with thousands of lines of logs +3. If you still need more information, use the `get_job_logs` or `get_workflow_run_logs` tool to get the full, detailed failure logs +4. Try to reproduce the failure yourself in your own environment. +5. Fix the failing build. If you were able to reproduce the failure yourself, make sure it is fixed before committing your changes. +``` diff --git a/data/reusables/copilot/skills-compared.md b/data/reusables/copilot/skills-compared.md new file mode 100644 index 000000000000..1b40cd8d1099 --- /dev/null +++ b/data/reusables/copilot/skills-compared.md @@ -0,0 +1,7 @@ +## Skills versus custom instructions + +You can use both skills and custom instructions to teach {% data variables.product.prodname_copilot_short %} how to work in your repository and how to perform specific tasks. + +We recommend using **custom instructions** for simple instructions relevant to almost every task (for example information about your repository's coding standards), and **skills** for more detailed instructions that {% data variables.product.prodname_copilot_short %} should only access when relevant. + +To learn more about repository custom instructions, see [AUTOTITLE](/copilot/how-tos/configure-custom-instructions/add-repository-instructions). diff --git a/data/reusables/copilot/skills-using.md b/data/reusables/copilot/skills-using.md new file mode 100644 index 000000000000..1d1030e0e584 --- /dev/null +++ b/data/reusables/copilot/skills-using.md @@ -0,0 +1,3 @@ +When performing tasks, {% data variables.product.prodname_copilot_short %} will decide when to use your skills based on your prompt and the skill's description. + +When {% data variables.product.prodname_copilot_short %} chooses to use a skill, the `SKILL.md` file will be injected in the agent's context, giving the agent access to your instructions. It can then follow those instructions and use any scripts or examples you may have included in the skill's directory. diff --git a/data/reusables/enterprise-onboarding/identify-role-requirements.md b/data/reusables/enterprise-onboarding/identify-role-requirements.md index 9ba991d0150f..0b72e3042f33 100644 --- a/data/reusables/enterprise-onboarding/identify-role-requirements.md +++ b/data/reusables/enterprise-onboarding/identify-role-requirements.md @@ -62,6 +62,6 @@ For more information about what apps can do, see [AUTOTITLE](/apps/creating-gith ## 6. Assign tasks to agents -Another way to delegate frequent, time-consuming tasks is to assign work to {% data variables.copilot.copilot_coding_agent %}. You can define custom agents for specific roles in your enterprise. Custom agents are created using Markdown files called "agent profiles," which define the instructions and tools the agent needs to perform a task. For example, you could create a custom agent for writing README files or generating unit tests. +Another way to delegate frequent, time-consuming tasks is to assign work to {% data variables.copilot.copilot_coding_agent %}. You can define custom agents for specific roles in your enterprise. Custom agents are created using Markdown files called "agent profiles," which define the instructions and tools the agent needs to perform a task. For example, you could create a {% data variables.copilot.copilot_custom_agent_short %} for writing README files or generating unit tests. For more information, see [AUTOTITLE](/copilot/how-tos/administer-copilot/manage-for-enterprise/manage-agents/prepare-for-custom-agents). diff --git a/src/audit-logs/data/fpt/organization.json b/src/audit-logs/data/fpt/organization.json index a2624a1c21ba..b589ca74bcdf 100644 --- a/src/audit-logs/data/fpt/organization.json +++ b/src/audit-logs/data/fpt/organization.json @@ -8928,6 +8928,72 @@ "operation_type" ] }, + { + "action": "org.delete_custom_image", + "description": "A custom image was deleted for an organization.", + "docs_reference_links": "/actions/how-tos/manage-runners/larger-runners/use-custom-images", + "fields": [ + "@timestamp", + "_document_id", + "action", + "actor", + "actor_id", + "business", + "business_id", + "hashed_token", + "org", + "org_id", + "programmatic_access_type", + "repo", + "repo_id", + "repository", + "repository_id", + "request_access_security_header", + "request_id", + "token_id", + "token_scopes", + "user", + "user_id", + "user_agent", + "created_at", + "operation_type", + "actor_is_bot" + ], + "docs_reference_titles": "/actions/how-tos/manage-runners/larger-runners/use-custom-images" + }, + { + "action": "org.delete_custom_image_version", + "description": "A custom image version was deleted for an organization.", + "docs_reference_links": "/actions/how-tos/manage-runners/larger-runners/use-custom-images", + "fields": [ + "@timestamp", + "_document_id", + "action", + "actor", + "actor_id", + "business", + "business_id", + "hashed_token", + "org", + "org_id", + "programmatic_access_type", + "repo", + "repo_id", + "repository", + "repository_id", + "request_access_security_header", + "request_id", + "token_id", + "token_scopes", + "user", + "user_id", + "user_agent", + "created_at", + "operation_type", + "actor_is_bot" + ], + "docs_reference_titles": "/actions/how-tos/manage-runners/larger-runners/use-custom-images" + }, { "action": "org.disable_member_team_creation_permission", "description": "Team creation was limited to owners.", @@ -12461,6 +12527,41 @@ ], "docs_reference_titles": "Store information in variables" }, + { + "action": "org.update_custom_images_policy", + "description": "The enterprise updated GitHub Actions custom image policy settings for an organization.", + "docs_reference_links": "/actions/how-tos/manage-runners/larger-runners/use-custom-images", + "fields": [ + "@timestamp", + "_document_id", + "action", + "actor", + "actor_id", + "business", + "business_id", + "hashed_token", + "org", + "org_id", + "programmatic_access_type", + "repo", + "repo_id", + "repository", + "repository_id", + "request_access_security_header", + "request_id", + "token_id", + "token_scopes", + "user", + "user_id", + "user_agent", + "old_policy", + "new_policy", + "created_at", + "operation_type", + "actor_is_bot" + ], + "docs_reference_titles": "/actions/how-tos/manage-runners/larger-runners/use-custom-images" + }, { "action": "org.update_default_repository_permission", "description": "The default repository permission level for organization members was changed.", diff --git a/src/audit-logs/data/ghec/organization.json b/src/audit-logs/data/ghec/organization.json index a2624a1c21ba..b589ca74bcdf 100644 --- a/src/audit-logs/data/ghec/organization.json +++ b/src/audit-logs/data/ghec/organization.json @@ -8928,6 +8928,72 @@ "operation_type" ] }, + { + "action": "org.delete_custom_image", + "description": "A custom image was deleted for an organization.", + "docs_reference_links": "/actions/how-tos/manage-runners/larger-runners/use-custom-images", + "fields": [ + "@timestamp", + "_document_id", + "action", + "actor", + "actor_id", + "business", + "business_id", + "hashed_token", + "org", + "org_id", + "programmatic_access_type", + "repo", + "repo_id", + "repository", + "repository_id", + "request_access_security_header", + "request_id", + "token_id", + "token_scopes", + "user", + "user_id", + "user_agent", + "created_at", + "operation_type", + "actor_is_bot" + ], + "docs_reference_titles": "/actions/how-tos/manage-runners/larger-runners/use-custom-images" + }, + { + "action": "org.delete_custom_image_version", + "description": "A custom image version was deleted for an organization.", + "docs_reference_links": "/actions/how-tos/manage-runners/larger-runners/use-custom-images", + "fields": [ + "@timestamp", + "_document_id", + "action", + "actor", + "actor_id", + "business", + "business_id", + "hashed_token", + "org", + "org_id", + "programmatic_access_type", + "repo", + "repo_id", + "repository", + "repository_id", + "request_access_security_header", + "request_id", + "token_id", + "token_scopes", + "user", + "user_id", + "user_agent", + "created_at", + "operation_type", + "actor_is_bot" + ], + "docs_reference_titles": "/actions/how-tos/manage-runners/larger-runners/use-custom-images" + }, { "action": "org.disable_member_team_creation_permission", "description": "Team creation was limited to owners.", @@ -12461,6 +12527,41 @@ ], "docs_reference_titles": "Store information in variables" }, + { + "action": "org.update_custom_images_policy", + "description": "The enterprise updated GitHub Actions custom image policy settings for an organization.", + "docs_reference_links": "/actions/how-tos/manage-runners/larger-runners/use-custom-images", + "fields": [ + "@timestamp", + "_document_id", + "action", + "actor", + "actor_id", + "business", + "business_id", + "hashed_token", + "org", + "org_id", + "programmatic_access_type", + "repo", + "repo_id", + "repository", + "repository_id", + "request_access_security_header", + "request_id", + "token_id", + "token_scopes", + "user", + "user_id", + "user_agent", + "old_policy", + "new_policy", + "created_at", + "operation_type", + "actor_is_bot" + ], + "docs_reference_titles": "/actions/how-tos/manage-runners/larger-runners/use-custom-images" + }, { "action": "org.update_default_repository_permission", "description": "The default repository permission level for organization members was changed.", diff --git a/src/audit-logs/lib/config.json b/src/audit-logs/lib/config.json index 1d889e99bd88..f444b3b14b27 100644 --- a/src/audit-logs/lib/config.json +++ b/src/audit-logs/lib/config.json @@ -9,5 +9,5 @@ "git": "Note: Git events have special access requirements and retention policies that differ from other audit log events. For GitHub Enterprise Cloud, access Git events via the REST API only with 7-day retention. For GitHub Enterprise Server, Git events must be enabled in audit log configuration and are not included in search results.", "sso_redirect": "Note: Automatically redirecting users to sign in is currently in beta for Enterprise Managed Users and subject to change." }, - "sha": "6fbd793fd982298d46c7481b7d66f7f3623fb5f0" + "sha": "6ed0bc555c656abf9f2edbf21ec746a6b1d0b3f0" } \ No newline at end of file