-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Agent-scoped skills in plugins to prevent context bloat #2207
Copy link
Copy link
Open
Labels
area:agentsSub-agents, fleet, autopilot, plan mode, background agents, and custom agentsSub-agents, fleet, autopilot, plan mode, background agents, and custom agentsarea:context-memoryContext window, memory, compaction, checkpoints, and instruction loadingContext window, memory, compaction, checkpoints, and instruction loadingarea:pluginsPlugin system, marketplace, hooks, skills, extensions, and custom agentsPlugin system, marketplace, hooks, skills, extensions, and custom agents
Metadata
Metadata
Assignees
Labels
area:agentsSub-agents, fleet, autopilot, plan mode, background agents, and custom agentsSub-agents, fleet, autopilot, plan mode, background agents, and custom agentsarea:context-memoryContext window, memory, compaction, checkpoints, and instruction loadingContext window, memory, compaction, checkpoints, and instruction loadingarea:pluginsPlugin system, marketplace, hooks, skills, extensions, and custom agentsPlugin system, marketplace, hooks, skills, extensions, and custom agents
Type
Fields
Give feedbackNo fields configured for Feature.
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).
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:
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:
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: