Skip to content

copilot plugin install from GitHub repo does not discover .github/plugin/plugin.json — skills and agents unavailable #2390

@Megasware128

Description

@Megasware128

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

  1. Install a plugin from a GitHub repo: copilot plugin install microsoft/WinAppCli
  2. Start a new Copilot CLI session
  3. Check available skills (e.g. ask the agent to list skills, or check the system prompt)
  4. Observe: winapp-cli skills and agents are not listed
  5. Inspect ~/.copilot/config.jsoncache_path points 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:

  1. Set cache_path to the .github/plugin/ subdirectory if plugin.json exists there, or
  2. Have the plugin loader check .github/plugin/plugin.json as a fallback when plugin.json is not found at the cache_path root

Related issues in this repo:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions