-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Describe the bug
When installing a plugin directly from a GitHub repository using copilot plugin install <owner>/<repo>, the CLI downloads the full repository but sets cache_path in ~/.copilot/config.json to the repository root. The plugin loader then looks for plugin.json at the root of cache_path, but for repo-based plugins the plugin definition lives in .github/plugin/plugin.json.
As a result, skills and agents defined by the plugin are never loaded and do not appear in the available skills list.
Root Cause Analysis:
Comparing a working marketplace plugin (dotnet) with the direct install:
| Marketplace plugin (dotnet) | Direct repo install (winapp-cli) | |
|---|---|---|
cache_path |
installed-plugins/awesome-copilot/dotnet |
installed-plugins/_direct/microsoft--WinAppCli |
plugin.json location |
<cache_path>/plugin.json ✅ |
<cache_path>/.github/plugin/plugin.json ❌ |
| Skills loaded | Yes | No |
The marketplace plugin has a flattened structure with plugin.json at root. The direct repo install preserves the full repo structure where plugin.json lives in .github/plugin/.
Affected version
1.0.12
Steps to reproduce the behavior
- Install a plugin from a GitHub repo:
copilot plugin install microsoft/WinAppCli - Start a new Copilot CLI session
- Check available skills (e.g. ask the agent to list skills, or check the system prompt)
- Observe: winapp-cli skills and agents are not listed
- Inspect
~/.copilot/config.json—cache_pathpoints to repo root, not.github/plugin/
Expected behavior
The plugin loader should discover plugin.json inside .github/plugin/ for plugins installed from GitHub repositories. Skills and agents defined in the plugin should be available after installation.
Additional context
- OS: Windows 11
- Terminal: Windows Terminal
- Shell: PowerShell
Workaround: Manually edit ~/.copilot/config.json and append /.github/plugin to the cache_path:
"cache_path": "...\\microsoft--WinAppCli\\.github\\plugin"After restarting the CLI, skills and agents are correctly discovered.
Suggested fix: When installing a plugin from a GitHub repo, the CLI should either:
- Set
cache_pathto the.github/plugin/subdirectory ifplugin.jsonexists there, or - Have the plugin loader check
.github/plugin/plugin.jsonas a fallback whenplugin.jsonis not found at thecache_pathroot
Related issues in this repo:
- Installing plugins from a specific branch or tag #1296 — Mentions
owner/repo:path/to/plugininstall syntax which could serve as a workaround - Support git symlinks in plugin install on Windows #2286 — Another plugin install issue on Windows (symlinks)
- Plugin skills installed by sessionStart hooks are not available in the current session #1855 — Plugin skills not available after sessionStart hook install (different root cause, same symptom)
Cross-repo notice
This issue has also been filed as microsoft/winappCli#365 since it affects the recommended install instructions in that repo's README. It is unclear whether the fix should be in the Copilot CLI (plugin loader not checking .github/plugin/), in the plugin repo (restructuring or adding a root-level plugin.json), or in both. Filing on both repos so the respective maintainers can determine the best course of action.