github / github/copilot-cli

Agent-scoped skills in plugins to prevent context bloat

オープン
#2,207 コメント 0 件 リアクション 4 件 担当者 0 名 GitHub で見る
area:agents area:context-memory area:plugins
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

### 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)

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。