github / github/copilot-cli

Support ignoring files in .github/agents/ from agent loading

未關閉
#2,187 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
area:agents
主要語言
Shell
星號
11.2k
分支
1.9k
平均合併
14 小時 16 分鐘
30 天內合併 PR
6

描述

## Feature Request

### Problem

Any `.md` file placed inside `.github/agents/` is loaded as a Copilot agent. There is no supported way to exclude a file (e.g. a `README.md` index) from being treated as an agent.

Currently:
- A file with no YAML frontmatter fails with: `custom agent markdown frontmatter is malformed: missing or malformed YAML frontmatter`
- A file with valid frontmatter is loaded as an agent (undesired for index/documentation files)
- Adding `ignored: true` to frontmatter produces a warning: `unknown field ignored: ignored`

### Proposed Solution

Add support for an `ignored` (or similar) frontmatter field that tells the CLI to skip loading a file as an agent, without producing a warning. For example:

```yaml
---
ignored: true
description: Index of available agents in this repository.
---
```

This would allow teams to keep a `README.md` or other documentation file alongside their agent definitions without it appearing in the agent browser (`/agent`).

### Use Case

Keeping a human-readable index file (`README.md`) in `.github/agents/` to document available agents, without that file itself appearing as a selectable agent.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。