Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,6 @@ tmp/

# Localized content from translation repositories
translations/

# Shared local volume (bufo)
.local
4 changes: 3 additions & 1 deletion content/copilot/concepts/agents/about-agent-skills.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ contentType: concepts

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

You can also use `gh skill` in {% data variables.product.prodname_cli %} to discover and install skills from {% data variables.product.github %} repositories. For more information, see [AUTOTITLE](/copilot/how-tos/use-copilot-agents/cloud-agent/add-skills#managing-skills-with-github-cli).

{% data variables.product.prodname_copilot_short %} supports:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ If you see a trial expiration notice but have an active paid subscription, this
Some migrations cannot be completed through self-service options.

* **Changing between {% data variables.copilot.copilot_business_short %} and {% data variables.copilot.copilot_enterprise_short %}**: If you need to migrate between these plans within your enterprise and the option isn't available in your "Billing & Licensing" settings, contact {% data variables.contact.contact_support_page %} or your account manager for assistance.
* **Non-enterprise to enterprise environment migrations**: When moving from standalone {% data variables.product.prodname_copilot_short %} plans to a {% data variables.product.prodname_enterprise %} environment, contact {% data variables.contact.contact_support_page %} or your account manager for assistance to avoid service interruption.
* **Non-enterprise to enterprise environment migrations**: When moving from standalone {% data variables.product.prodname_copilot_short %} plans to a {% data variables.product.prodname_enterprise %} environment, contact {% data variables.contact.contact_support_page %} or your account manager to coordinate a migration. Attempting to complete this transition without explicit and careful coordination with your account team and support representatives may result in duplicate billing of {% data variables.product.prodname_copilot_short %} seats for the remainder of the billing cycle. See [AUTOTITLE](/copilot/reference/copilot-billing/license-changes#removing-seats-1).

## Further reading

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ Agent skills are folders of instructions, scripts, and resources that {% data va

SKILL-NAME is defined in the SKILL.md file and is typically the same as the name of the skill directory.


## Using agent skills

{% data reusables.copilot.skills-using %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,121 @@ Agent skills are folders of instructions, scripts, and resources that {% data va

{% data reusables.copilot.creating-adding-skills %}

## Managing skills with {% data variables.product.prodname_cli %}

> [!NOTE]
> `gh skill` is in {% data variables.release-phases.public_preview %} and subject to change. To use it, update {% data variables.product.prodname_cli %} to version 2.90.0 or later.

You can use the `gh skill` command in {% data variables.product.prodname_cli %} to discover, install, update, and publish agent skills from {% data variables.product.github %} repositories.

For the full list of `gh skill` subcommands, run `gh skill --help` or see the [`gh skill`](https://cli.github.com/manual/gh_skill) section of the {% data variables.product.prodname_cli %} manual.

### Installing skills

You can search for skills, preview them, and install them from {% data variables.product.github %} repositories.

> [!WARNING]
> Skills are not verified by {% data variables.product.github %} and may contain prompt injections, hidden instructions, or malicious scripts. Always inspect the content of a skill before installation using `gh skill preview`.

1. Search for skills by topic:

```shell
gh skill search TOPIC
```

1. Preview a skill to inspect its contents before installing. This renders the skill's `SKILL.md` and file tree in your terminal without installing anything:

```shell
gh skill preview OWNER/REPOSITORY SKILL
```

1. Install a skill. You can run `gh skill install` with no arguments for a fully interactive flow, or specify a repository to browse its skills interactively:

```shell
gh skill install OWNER/REPOSITORY
```

To install a specific skill directly:

```shell
gh skill install OWNER/REPOSITORY SKILL
```

For example, to install a skill from the [`github/awesome-copilot`](https://github.com/github/awesome-copilot) repository:

```shell copy
gh skill install github/awesome-copilot documentation-writer
```

You can install a specific version using `@TAG` or `@SHA`:

```shell copy
gh skill install github/awesome-copilot documentation-writer@v1.2.0
```

To lock a skill to a specific version (or commit SHA) so it is skipped during updates, use `--pin`:

```shell copy
gh skill install github/awesome-copilot documentation-writer --pin v1.2.0
```

> [!NOTE]
> The `@VERSION` syntax and `--pin` flag are mutually exclusive. Use one or the other, not both.

To install a skill for a specific agent host, use the `--agent` flag. To control the install scope, use `--scope`:

```shell copy
gh skill install github/awesome-copilot documentation-writer --agent claude-code --scope user
```

Skills are automatically installed to the correct directory for your agent host. By default, skills are installed for {% data variables.product.prodname_copilot_short %} at project scope.

### Updating skills

When you install a skill with `gh skill`, provenance metadata is written into the skill's `SKILL.md` frontmatter, including the source repository, ref, and tree SHA. The `gh skill update` command uses this metadata to check for upstream changes.

To check for updates interactively:

```shell
gh skill update
```

To update a specific skill:

```shell
gh skill update SKILL
```

To update all installed skills without prompting:

```shell
gh skill update --all
```

Pinned skills are skipped during updates. To update a pinned skill, reinstall it with a new `--pin` value.

### Publishing skills

If you maintain a skills repository, you can validate and publish your skills using {% data variables.product.prodname_cli %}.

To validate your skills against the [Agent Skills specification](https://agentskills.io/specification) and check remote settings like tag protection, secret scanning, and code scanning, without publishing, use `--dry-run`:

```shell
gh skill publish --dry-run
```

To auto-fix metadata issues in your skill files, use `--fix`. This does not publish your skills:

```shell
gh skill publish --fix
```

To validate and publish your skills:

```shell
gh skill publish
```

## How {% data variables.product.prodname_copilot_short %} uses agent skills

{% data reusables.copilot.skills-using %}
Expand Down
3 changes: 3 additions & 0 deletions data/reusables/copilot/creating-adding-skills.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ To create a skill that runs a script:

In addition to creating your own skills, you can also add skills that other people have created.

> [!TIP]
> You can also use `gh skill` in {% data variables.product.prodname_cli %} to search for, install, update, and publish agent skills. For more information, see [AUTOTITLE](/copilot/how-tos/use-copilot-agents/cloud-agent/add-skills#managing-skills-with-github-cli).

1. Download a skill directory (that is, a directory containing a SKILL.md file and, optionally, other files and subdirectories).

For example, download a skill from the Awesome {% data variables.product.prodname_copilot %} repository: https://awesome-copilot.github.com/skills/.
Expand Down
31 changes: 24 additions & 7 deletions src/assets/scripts/list-image-sizes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,41 @@ import { fileURLToPath } from 'url'
import path from 'path'
import walk from 'walk-sync'
import sharp from 'sharp'
import { createLogger } from '@/observability/logger'
import { toError } from '@/observability/lib/to-error'

const logger = createLogger(import.meta.url)

const __dirname = path.dirname(fileURLToPath(import.meta.url))

const imagesPath = path.join(__dirname, '../assets/images')
const imagesPath = path.join(__dirname, '../../../assets/images')
const imagesExtensions = ['.jpg', '.jpeg', '.png', '.gif']

const files = walk(imagesPath, { directories: false }).filter((relativePath) => {
return imagesExtensions.includes(path.extname(relativePath.toLowerCase()))
})

logger.info('Starting image scan', { path: imagesPath, totalFiles: files.length })

const images = await Promise.all(
files.map(async (relativePath) => {
const fullPath = path.join(imagesPath, relativePath)
const image = sharp(fullPath)
const { width, height } = await image.metadata()
const size = (width || 0) * (height || 0)
return { relativePath, width, height, size }
try {
const image = sharp(fullPath)
const { width, height } = await image.metadata()
const size = (width || 0) * (height || 0)
return { relativePath, width, height, size }
} catch (error) {
logger.warn('Failed to read image metadata', toError(error), { relativePath })
return { relativePath, width: 0, height: 0, size: 0 }
}
}),
)
for (const image of images.sort((a, b) => b.size - a.size)) {

const sorted = images.sort((a, b) => b.size - a.size)
for (const image of sorted) {
const { relativePath, width, height } = image
console.log(`${width} x ${height} - ${relativePath}`)
logger.info(`${width} x ${height} - ${relativePath}`)
}

logger.info('Image scan complete', { totalImages: sorted.length })
31 changes: 31 additions & 0 deletions src/fixtures/fixtures/src/webhooks/data/fpt/check_run.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"completed": {
"descriptionHtml": "<p>Check run is <strong>completed</strong>.</p>",
"summaryHtml": "",
"bodyParameters": [
{
"name": "action",
"description": "The action performed. Value: <code>completed</code>",
"isRequired": true,
"type": "string"
},
{
"name": "check_run",
"description": "The check run object",
"isRequired": true,
"type": "object"
}
],
"availability": ["Repository", "Organization", "GitHub App"],
"action": "completed",
"category": "check_run",
"payloadExample": {
"action": "completed",
"check_run": {
"id": 4,
"status": "completed",
"conclusion": "neutral"
}
}
}
}
23 changes: 23 additions & 0 deletions src/fixtures/fixtures/src/webhooks/data/fpt/issues.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"opened": {
"descriptionHtml": "<p>Issue is <em>opened</em>.</p>",
"summaryHtml": "",
"bodyParameters": [
{
"name": "action",
"description": "The action performed",
"isRequired": true,
"type": "string"
},
{
"name": "issue",
"description": "The issue object",
"isRequired": false,
"type": "object"
}
],
"availability": ["Repository", "Organization"],
"action": "opened",
"category": "issues"
}
}
56 changes: 0 additions & 56 deletions src/fixtures/fixtures/src/webhooks/data/fpt/schema.json

This file was deleted.

7 changes: 7 additions & 0 deletions src/observability/lib/handle-exceptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ process.on('uncaughtException', async (err: Error | unknown) => {
}
})

process.on('warning', (warning: Error) => {
logger.warn(warning.message, {
warning_name: warning.name,
warning_stack: warning.stack,
})
})

process.on('unhandledRejection', async (err: Error | unknown) => {
const error = toError(err)
logger.error('unhandledRejection', { error })
Expand Down
Loading
Loading