github / github/copilot-cli

Support bundled reference resources for plugin-installed custom agents in GitHub Copilot CLI

Đang mở
#3,131 0 bình luận 1 reaction 0 người được giao Xem trên GitHub
area:agents area:plugins
Ngôn ngữ chính
Shell
Star
11.2k
Fork
1.9k
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
6

Mô tả

### Describe the feature or problem you'd like to solve

GitHub Copilot CLI plugins can include both custom agents and skills, but their resource-loading behavior appears inconsistent. Skills are documented as directory-based bundles. The official **Adding agent skills for GitHub Copilot CLI** documentation says that agent skills are “folders of instructions, scripts, and resources,” and that when a skill is invoked, Copilot “automatically discovers all of the files in the skill's directory and makes them available alongside the skill's instructions.”
Docs:
- https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/add-skills
- https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-plugin-reference
- https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/plugins-creating
Custom agents, however, are documented primarily as `.agent.md` profile files with YAML frontmatter and prompt content. Plugin docs show agents under an `agents/` directory, but do not describe a comparable resource-discovery model for files such as `agents/references/*.md`.
Docs:
- https://docs.github.com/en/copilot/how-tos/use-copilot-agents/cloud-agent/create-custom-agents
- https://docs.github.com/en/copilot/reference/custom-agents-configuration
- https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/plugins-creating
In practice, this means a plugin-installed skill can reliably reference bundled files with paths such as:
```text
references\template.md
scripts\helper.ps1
```
because those files live under the skill directory:
```text
skills/my-skill/
├── SKILL.md
├── references/template.md
└── scripts/helper.ps1
```
But a plugin-installed agent cannot reliably reference files under: `agents/references/template.md` using: `references\template.md` relative path from its `.agent.md` prompt. This creates friction for plugin authors who want to keep agent prompts concise and maintain reusable supporting materials, templates, checklists, examples, or routing guidance outside the main `.agent.md` file.

### Proposed solution

Add support for bundled resources for plugin-installed custom agents, matching the skill resource model as closely as possible.

For example, allow plugin agents to resolve relative paths from the containing agent directory:

```text
my-plugin/
├── plugin.json
└── agents/
├── my-agent.agent.md
└── references/
└── checklist.md
```

Then `my-agent.agent.md` could safely reference:

```text
references/checklist.md
```

Alternatively, document and support an explicit agent resource directory convention, such as:

```text
agents/my-agent/
├── AGENT.md
├── references/checklist.md
└── scripts/helper.ps1
```

If implementing bundled agent resources is not currently planned, please update the plugin and custom agent documentation to explicitly state that:

1. Plugin-installed agents are single-file runtime artifacts.
2. `agents/references/*` is not automatically discovered or made available.
3. Authors should inline required agent instructions or move reusable resources into skills.
4. Skills are the recommended mechanism for bundled scripts, templates, examples, and reference files.

### Example prompts or workflows

_No response_

### Additional context

_No response_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách đọc tài liệu về plugin và custom-agent được liên kết trong issue, sau đó kiểm tra plugin.json và cấu trúc của agents/ để xác định cách phân giải tài nguyên hiện tại. Công việc được xem là hoàn tất khi các tham chiếu đi kèm được phân giải tương đối với agent và hành vi này được xác minh, hoặc khi giới hạn và workflow skills được khuyến nghị được ghi lại một cách rõ ràng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
github
Lĩnh vực
cli, tooling
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.