Skip to content

Commit 00ccfc2

Browse files
authored
Merge pull request #42980 from github/repo-sync
Repo sync
2 parents 1298e49 + 6a7766b commit 00ccfc2

File tree

39 files changed

+1120
-153
lines changed

39 files changed

+1120
-153
lines changed
130 KB
Loading

content/code-security/how-tos/scan-code-for-vulnerabilities/scan-from-the-command-line/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ children:
1414
- /setting-up-the-codeql-cli
1515
- /advanced-setup-of-the-codeql-cli
1616
- /using-custom-queries-with-the-codeql-cli
17+
- /testing-custom-queries
1718
- /testing-query-help-files
1819
- /specifying-command-options-in-a-codeql-configuration-file
1920
- /creating-database-bundle-for-troubleshooting
21+
2022
redirect_from:
2123
- /code-security/codeql-cli/using-the-codeql-cli
2224
- /code-security/codeql-cli/getting-started-with-the-codeql-cli

content/code-security/tutorials/customize-code-scanning/testing-custom-queries.md renamed to content/code-security/how-tos/scan-code-for-vulnerabilities/scan-from-the-command-line/testing-custom-queries.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Testing custom queries
3-
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 %}.
3+
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 %}.
4+
shortTitle: Test custom queries
45
product: '{% data reusables.gated-features.codeql %}'
56
versions:
67
fpt: '*'
@@ -14,10 +15,11 @@ redirect_from:
1415
- /code-security/codeql-cli/testing-custom-queries
1516
- /code-security/codeql-cli/using-the-codeql-cli/testing-custom-queries
1617
- /code-security/codeql-cli/using-the-advanced-functionality-of-the-codeql-cli/testing-custom-queries
17-
contentType: tutorials
18+
- /code-security/tutorials/customize-code-scanning/testing-custom-queries
19+
contentType: how-tos
1820
---
1921

20-
## About testing custom queries
22+
## Testing custom queries
2123

2224
{% data variables.product.prodname_codeql %} provides a simple test framework for automated regression testing
2325
of queries. Test your queries to ensure that they behave as expected.

content/code-security/tutorials/customize-code-scanning/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ children:
2020
- /running-codeql-code-scanning-in-a-container
2121
- /customizing-analysis-with-codeql-packs
2222
- /creating-codeql-query-suites
23-
- /testing-custom-queries
2423
- /creating-and-working-with-codeql-packs
2524
- /publishing-and-using-codeql-packs
2625
---
26+
Lines changed: 11 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: About Agent Skills
3-
shortTitle: Agent Skills
4-
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.'
2+
title: About agent skills
3+
shortTitle: Agent skills
4+
intro: 'Skills allow {% data variables.product.prodname_copilot_short %} to perform specialized tasks.'
55
product: '{% data reusables.gated-features.copilot-coding-agent %}<br><br>{% data reusables.gated-features.copilot-cli %}<br><a href="https://github.com/features/copilot/plans?ref_product=copilot&ref_type=purchase&ref_style=button" target="_blank" class="btn btn-primary mt-3 mr-3 no-underline"><span>Sign up for {% data variables.product.prodname_copilot_short %}</span> {% octicon "link-external" height:16 %}</a>'
66
versions:
77
feature: copilot
@@ -11,11 +11,12 @@ category:
1111
- Learn about Copilot
1212
---
1313

14-
## About Agent Skills
14+
> [!NOTE]
15+
> 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.
1516
16-
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.
17+
## About agent skills
1718

18-
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.
19+
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.
1920

2021
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.
2122

@@ -26,63 +27,9 @@ You can create your own skills to teach {% data variables.product.prodname_copil
2627

2728
Support for organization-level and enterprise-level skills is coming soon.
2829

29-
> [!NOTE]
30-
> {% data reusables.cli.preview-note-cli-body %}
31-
32-
## Creating and adding skills
33-
34-
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.
35-
36-
For project skills, specific to a single repository, store your skill under `.github/skills` or `.claude/skills`.
37-
38-
For personal skills, shared across projects, store your skill under `~/.copilot/skills` or `~/.claude/skills`.
39-
40-
1. Create a `SKILL.md` file with your skill's instructions.
41-
42-
> [!NOTE]
43-
> Skill files must be named `SKILL.md`.
44-
45-
`SKILL.md` files are Markdown files with YAML frontmatter. In their simplest form, they include:
46-
47-
* YAML frontmatter
48-
* **name** (required): A unique identifier for the skill. This must be lowercase, using hyphens for spaces.
49-
* **description** (required): A description of what the skill does, and when {% data variables.product.prodname_copilot_short %} should use it.
50-
* **license** (optional): A description of the license that applies to this skill.
51-
* A Markdown body, with the instructions, examples and guidelines for {% data variables.product.prodname_copilot_short %} to follow.
52-
53-
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.
54-
55-
### Example `SKILL.md` file
56-
57-
For a project skill, this file would be located in the `/path/to/repository/.github/skills/github-actions-failure-debugging` directory.
58-
59-
For a personal skill, this file would be located in the `~/.copilot/skills/github-actions-failure-debugging` directory.
60-
61-
```markdown copy
62-
---
63-
name: github-actions-failure-debugging
64-
description: Guide for debugging failing GitHub Actions workflows. Use this when asked to debug failing GitHub Actions workflows.
65-
---
66-
67-
To debug failing GitHub Actions workflows in a pull request, follow this process, using tools provided from the GitHub MCP Server:
68-
69-
1. Use the `list_workflow_runs` tool to look up recent workflow runs for the pull request and their status
70-
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
71-
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
72-
4. Try to reproduce the failure yourself in your own environment.
73-
5. Fix the failing build. If you were able to reproduce the failure yourself, make sure it is fixed before committing your changes.
74-
```
75-
76-
## How {% data variables.product.prodname_copilot_short %} uses skills
77-
78-
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.
79-
80-
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.
81-
82-
## Skills versus custom instructions
83-
84-
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.
30+
## Next steps
8531

86-
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.
32+
To create an agent skill, see:
8733

88-
To learn more about repository custom instructions, see [AUTOTITLE](/copilot/how-tos/configure-custom-instructions/add-repository-instructions).
34+
* [AUTOTITLE](/copilot/how-tos/use-copilot-agents/coding-agent/create-skills)
35+
* [AUTOTITLE](/copilot/how-tos/copilot-cli/customize-copilot/create-skills)

content/copilot/concepts/agents/coding-agent/about-custom-agents.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
---
22
title: About custom agents
33
shortTitle: Custom agents
4-
intro: '{% data variables.copilot.custom_agents_caps_short %} enhance {% data variables.copilot.copilot_coding_agent %} with assistance tailored to your needs.'
5-
product: '{% data reusables.gated-features.copilot-coding-agent %}<br><a href="https://github.com/features/copilot/plans?ref_product=copilot&ref_type=purchase&ref_style=button" target="_blank" class="btn btn-primary mt-3 mr-3 no-underline"><span>Sign up for {% data variables.product.prodname_copilot_short %}</span> {% octicon "link-external" height:16 %}</a>'
4+
intro: '{% data variables.copilot.custom_agents_caps_short %} enhance {% data variables.product.prodname_copilot_short %} with assistance tailored to your needs.'
65
versions:
76
feature: copilot
87
topics:
@@ -13,7 +12,7 @@ category:
1312

1413
## About {% data variables.copilot.custom_agents_short %}
1514

16-
{% 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.
15+
{% 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.
1716

1817
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 %}.
1918

@@ -64,16 +63,19 @@ For more information, see [AUTOTITLE](/copilot/how-tos/administer-copilot/manage
6463

6564
{% data reusables.copilot.custom-agents-ide-preview %}
6665

67-
Once you create {% data variables.copilot.custom_agents_short %}, you can use them wherever {% data variables.copilot.copilot_coding_agent %} is available:
66+
Once you create {% data variables.copilot.custom_agents_short %}, they become available to:
6867

69-
* {% data variables.product.prodname_dotcom_the_website %}: The agents tab and panel, issue assignment, and pull requests
70-
* {% data variables.copilot.copilot_cli %}
71-
* IDEs: {% data variables.product.prodname_vscode %}, JetBrains IDEs, Eclipse, and Xcode
68+
* **{% data variables.copilot.copilot_coding_agent %} on {% data variables.product.prodname_dotcom_the_website %}**: The agents tab and panel, issue assignment, and pull requests
69+
* **{% data variables.copilot.copilot_coding_agent %} in IDEs**: {% data variables.product.prodname_vscode %}, JetBrains IDEs, Eclipse, and Xcode
70+
* **{% data variables.copilot.copilot_cli %}**
7271

73-
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.
72+
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.
7473

7574
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).
7675

7776
## Next steps
7877

79-
To create your own {% data variables.copilot.custom_agents_short %}, see [AUTOTITLE](/copilot/how-tos/use-copilot-agents/coding-agent/create-custom-agents).
78+
To create your own {% data variables.copilot.custom_agents_short %}, see:
79+
80+
* [AUTOTITLE](/copilot/how-tos/use-copilot-agents/coding-agent/create-custom-agents)
81+
* [AUTOTITLE](/copilot/how-tos/copilot-cli/customize-copilot/create-custom-agents-for-cli)

content/copilot/concepts/agents/coding-agent/about-hooks.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ versions:
88
topics:
99
- Copilot
1010
contentType: concepts
11-
category:
11+
category:
1212
- Configure Copilot
1313
---
1414

1515
## About hooks
1616

17-
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.
17+
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.
1818

1919
Hooks receive detailed information about agent actions via JSON input, enabling context-aware automation. For example, you can use hooks to:
2020

21-
* Programmatically approve or deny tool executions.
21+
* Programmatically approve or deny tool executions.
2222
* Utilize built-in security features like secret scanning to prevent credential leaks.
2323
* Implement custom validation rules and audit logging for compliance.
2424

@@ -27,17 +27,19 @@ Hooks receive detailed information about agent actions via JSON input, enabling
2727
Hooks are available for use with:
2828

2929
* {% data variables.copilot.copilot_coding_agent %} on {% data variables.product.github %}
30-
* {% data variables.copilot.copilot_cli %} in the terminal
30+
* {% data variables.copilot.copilot_cli %} in the terminal
3131

3232
## Types of hooks
3333

3434
The following types of hooks are available:
3535

3636
* **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.
3737
* **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.
38-
* **userPromptSubmitted**: Executed when the user submits a prompt to the agent. Can be used to log user requests for auditing and usage analysis.
38+
* **userPromptSubmitted**: Executed when the user submits a prompt to the agent. Can be used to log user requests for auditing and usage analysis.
3939
* **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.
4040
* **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.
41+
* **agentStop**: Executed when the main agent has finished responding to your prompt.
42+
* **subagentStop**: Executed when a subagent completes, before returning results to the parent agent.
4143
* **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.
4244

4345
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
154156
* **Always validate and sanitize the input processed by hooks**. Untrusted input could lead to unexpected behavior.
155157
* **Use proper shell escaping when constructing commands**. This prevents command injection vulnerabilities.
156158
* **Never log sensitive data, such as tokens or passwords**.
157-
* **Ensure hook scripts and logs have the appropriate permissions**.
159+
* **Ensure hook scripts and logs have the appropriate permissions**.
158160
* **Be cautious with hooks that make external network calls**. These can introduce latency, failures, or expose data to third parties.
159161
* **Set appropriate timeouts to prevent resource exhaustion**. Long-running hooks can block agent execution and degrade performance.
160162

161163
## Next steps
162164

163165
To start creating hooks, see [AUTOTITLE](/copilot/how-tos/use-copilot-agents/coding-agent/use-hooks).
164-

0 commit comments

Comments
 (0)