github / github/copilot-cli

Agent-scoped skills in plugins to prevent context bloat

Aberta
#2,207 0 comentários 4 reações 0 responsáveis Ver no GitHub
area:agents area:context-memory area:plugins
Linguagem predominante
Shell
Estrelas
11.2k
Forks
1.9k
Merge médio
14h 16min
PRs com merge (30d)
6

Descrição

### Describe the feature or problem you'd like to solve

When a plugin defines skills, all of those skills are injected into every session's context — regardless of whether any of the plugin's custom agents are active.

### Proposed solution

**Option 1 — agents field in SKILL.md frontmatter**

Extend the SKILL.md frontmatter spec with an optional agents field (an array of agent names). If present, the skill is only activated when one of the listed agents is running. If omitted, the skill behaves as today (always available).

``` ---
name: deploy
description: Deploy the current project to the staging environment.
agents: [acme-devops]
---

Instructions for the skill...
```

**Option 2 — Skill-to-agent mapping in plugin.json**

Alternatively (or additionally), allow the skills field in plugin.json to support an extended object syntax:
```
{
"name": "my-company-plugin",
"skills": [
{
"path": "skills/deploy",
"agents": ["acme-devops"]
},
{
"path": "skills/standards-audit",
"agents": ["acme-maintain"]
}
]
}
```

### Example prompts or workflows

_No response_

### Additional context

There is currently no way for a plugin author to declare that a skill should only be available (i.e., injected into context) when a specific custom agent from that same plugin is in use.

This is particularly relevant for teams building **company-internal** plugins for GitHub Copilot CLI. Such a plugin might bundle:

- A code review agent with skills for internal review checklists
- A deployment agent with skills for internal CI/CD pipelines
- A documentation agent with skills for internal writing standards
- A maintenance agent with skills for internal package update policies

These are all legitimately part of one plugin — they share a common marketplace, versioning, and distribution mechanism. But they serve completely different use cases, and having all of their skills present in every session defeats the purpose of skills being "just-in-time" context (as described in the official docs: "Avoid overloading Copilot's context window with instructions that are not relevant to the current task").

Without agent-scoped skills, teams are forced to choose between:

- **One big plugin** (convenient to install, but bloated context)
- **Many small plugins** (clean context, but management overhead per user)

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.