
帮助你充分利用GitHub Copilot的说明、提示和配置。
概览
该仓库作为一个“工具包”,用于分发标准化的 Copilot 自定义指令、提示、代理和技能。它允许各个仓库“订阅”特定资源集(例如 Python 标准、Juju/Ops 框架模式),并自动保持同步。 A 是一组逻辑的 markdown 文件(指令、提示、代理和技能),在 collections.yaml 中定义。 消耗仓库无需手动将特定指令复制到50个不同的仓库,而是定义一个配置文件,列出所需的集合。 * 核心:所有仓库共有的核心资产。* common-python:标准Python编码风格。* common-文档:带有审查技能的文档标准。* charm-python:包含common-python + Juju Ops Framework的具体内容。* copilot-toolkit:用于生成和管理Copilot资产(代理、技能、提示、指令)的元工具。* pfe-charms:平台工程专用集合。
概述(AI 翻译)
在Canonical生态系统中对GitHub Copilot进行集中上下文管理。
该仓库作为一个“工具包”,用于分发标准化的 Copilot 自定义指令、提示、代理和技能。它允许各个仓库“订阅”特定资源集(例如 Python 标准、Juju/Ops 框架模式),并自动保持同步。
什么是催收?
集合是定义在[[T0]中定义的一组Markdown文件(指令、提示、代理和技能)。
消耗仓库无需手动将特定指令复制到50个不同的仓库,而是定义一个配置文件,列出所需的集合。
可用合集(示例):
- 核心:所有仓库共有的核心资产。
- common-python:标准的Python编码风格。
- 通用文档:带有审查技能的文档标准。
- charm-python:包含common-python + Juju Ops框架的具体内容。
- copilot-toolkit:用于生成和管理Copilot资产(代理、技能、提示、指令)的元工具。
- pfe-charms:平台工程专用收藏。
用途:添加到仓库
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Canonical Copilot Collections
Centralized context management for GitHub Copilot across the Canonical ecosystem.
This repository acts as a “Toolkit” to distribute standardized Copilot Custom Instructions, Prompts, Agents and Skills. It allows individual repositories to “subscribe” to specific sets of assets (e.g., Python standards, Juju/Ops Framework patterns) and keep them synchronized automatically.
What are Collections?
A Collection is a logical group of markdown files (instructions, prompts, agents, and skills) defined in collections.yaml.
Instead of copying specific instructions into 50 different repositories manually, the consuming repository defines a configuration file listing the collections it needs.
Available Collections (Examples):
- core: Core assets common to all repositories.
- common-python: Standard Python coding style.
- common-documentation: Documentation standards with review skill.
- charm-python: Includes common-python + Juju Ops Framework specifics.
- copilot-toolkit: Meta-tools for generating and managing Copilot assets (agents, skills, prompts, instructions).
- pfe-charms: Platform Engineering specific collection.
Usage: Adding to a Repository
To add Copilot collections to your repository, follow these three steps.
Note: These steps assume that if the yq tool is already installed, it was installed via snap not via apt. The install scripts rely on behavior from the snap version of yq. The apt offering of yq doesn’t have the behavior the scripts expect, and will fail. If yq is not installed, the script will automatically install it via snap.
1. Create the Configuration
Create a file named .copilot-collections.yaml in the .github folder of your repository (recommended) or in the repository root.
copilot:
# The version of the toolkit to use (matches a Release Tag in this repo)
version: "v1.0.0"
# The collections you want to install
collections:
- charm-python
- pfe-charms
Location Preference: The workflow and sync script will search for the config file in this order:
.github/.copilot-collections.yaml(recommended).copilot-collections.yaml(root, for backwards compatibility)
You can also specify a custom location - see below for details.
2. Run the Initial Sync (Local)
You can sync the instructions immediately to your local machine to verify them.
curl -sL https://raw.githubusercontent.com/canonical/copilot-collections/main/scripts/local_sync.sh | bash
To specify a custom config file location:
# Via command-line argument
curl -sL https://raw.githubusercontent.com/canonical/copilot-collections/main/scripts/local_sync.sh | bash -s -- custom/path/.copilot-collections.yaml
# Via environment variable
推荐工具
换一个关键词,或者移除筛选条件。
安装
npx skillfish add canonical/copilot-collections