github / github/copilot-cli

Regression: skill tool cannot find valid skills in ~/.agents/skills

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

説明

## Description

The `skill` tool cannot find or invoke a valid skill installed under `~/.agents/skills`, even though the skill directory and `SKILL.md` are present.

This appears to be a regression or an incomplete fix related to #2230, which is closed.

## Environment

- Copilot CLI: `1.0.78`
- OS: Windows
- Skill path: `C:\Users\omzig\.agents\skills\setup-matt-pocock-skills\SKILL.md`

## Reproduction

1. Create or install a skill at `~/.agents/skills/setup-matt-pocock-skills/SKILL.md`.
2. Ensure its frontmatter includes:

```yaml
---
name: setup-matt-pocock-skills
description: Configure this repo for the engineering skills.
disable-model-invocation: true
---
```

3. Invoke the skill tool with `setup-matt-pocock-skills`.

## Actual result

The tool returns:

```text
Skill not found: setup-matt-pocock-skills
```

The skill is also absent from the tool's available-skill registry, despite the file being present and having valid frontmatter.

## Expected result

Skills in `~/.agents/skills` should either be discovered by the CLI automatically or produce a clear configuration/status indication explaining that the directory is unsupported.

## Workaround

Copying or linking the skill into a directory that the CLI does discover appears to be required.

## Additional validation: minimal test skill

To rule out a problem specific to the original skill, I created a minimal skill with valid frontmatter at:

`C:\Users\omzig\.agents\skills\test-skill\SKILL.md`

Its contents were:

```markdown
---
name: test-skill
description: A simple test skill that confirms whether skills installed in ~/.agents/skills are discovered and invoked.
---

# Test Skill

When this skill is invoked, respond with exactly:

`test-skill loaded successfully`
```

Invoking `skill(test-skill)` produced the same result:

```text
Skill not found: test-skill
```

This validates that the failure is with out-of-box discovery of `~/.agents/skills`, not with the original skill's complexity or frontmatter.

## Follow-up validation: supported path works

I moved the same minimal `test-skill` directory from:

`C:\Users\omzig\.agents\skills\test-skill`

to:

`C:\Users\omzig\.copilot\skills\test-skill`

After moving it, invoking `skill(test-skill)` succeeded and the skill returned:

```text
test-skill loaded successfully
```

This confirms that the skill content and frontmatter are valid. The failure is specifically that `~/.agents/skills` is not included in the CLI's out-of-box discovery paths, while `~/.copilot/skills` is.

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

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

調査の方向性

まず、CLI の skill discovery と利用可能な skill のレジストリをたどり、Windows 上でサポートされている ~/.copilot/skills パスと ~/.agents/skills を比較します。レポートに記載された最小限の test-skill で問題を再現し、その後、~/.agents/skills 配下の skills が検出されて呼び出されること、または CLI がそのディレクトリをサポート対象外として明確に報告することを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
shell
領域
cli
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
55/100

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

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