suggest-awesome-github-copilot-instructions

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Suggest Awesome GitHub Copilot Instructions

推荐优质GitHub Copilot指令

Analyze current repository context and suggest relevant copilot-instruction files from the GitHub awesome-copilot repository that are not already available in this repository.
基于当前仓库上下文,从GitHub awesome-copilot仓库中推荐尚未在本仓库中存在的相关copilot-instruction文件。

Process

流程

  1. Fetch Available Instructions: Extract instruction list and descriptions from awesome-copilot README.instructions.md. Must use
    #fetch
    tool.
  2. Scan Local Instructions: Discover existing instruction files in
    .github/instructions/
    folder
  3. Extract Descriptions: Read front matter from local instruction files to get descriptions and
    applyTo
    patterns
  4. Fetch Remote Versions: For each local instruction, fetch the corresponding version from awesome-copilot repository using raw GitHub URLs (e.g.,
    https://raw.githubusercontent.com/github/awesome-copilot/main/instructions/<filename>
    )
  5. Compare Versions: Compare local instruction content with remote versions to identify:
    • Instructions that are up-to-date (exact match)
    • Instructions that are outdated (content differs)
    • Key differences in outdated instructions (description, applyTo patterns, content)
  6. Analyze Context: Review chat history, repository files, and current project needs
  7. Compare Existing: Check against instructions already available in this repository
  8. Match Relevance: Compare available instructions against identified patterns and requirements
  9. Present Options: Display relevant instructions with descriptions, rationale, and availability status including outdated instructions
  10. Validate: Ensure suggested instructions would add value not already covered by existing instructions
  11. Output: Provide structured table with suggestions, descriptions, and links to both awesome-copilot instructions and similar local instructions AWAIT user request to proceed with installation or updates of specific instructions. DO NOT INSTALL OR UPDATE UNLESS DIRECTED TO DO SO.
  12. Download/Update Assets: For requested instructions, automatically:
    • Download new instructions to
      .github/instructions/
      folder
    • Update outdated instructions by replacing with latest version from awesome-copilot
    • Do NOT adjust content of the files
    • Use
      #fetch
      tool to download assets, but may use
      curl
      using
      #runInTerminal
      tool to ensure all content is retrieved
    • Use
      #todos
      tool to track progress
  1. 获取可用指令:从awesome-copilot README.instructions.md中提取指令列表及描述。必须使用
    #fetch
    工具。
  2. 扫描本地指令:发现
    .github/instructions/
    文件夹中的现有指令文件
  3. 提取描述信息:读取本地指令文件的前置元数据(front matter),获取描述及
    applyTo
    匹配模式
  4. 获取远程版本:对于每个本地指令,使用GitHub原始URL(例如:
    https://raw.githubusercontent.com/github/awesome-copilot/main/instructions/<filename>
    )从awesome-copilot仓库获取对应的远程版本
  5. 版本对比:对比本地指令内容与远程版本,识别:
    • 已更新至最新版本的指令(完全匹配)
    • 过时的指令(内容存在差异)
    • 过时指令中的关键差异点(描述、applyTo模式、内容)
  6. 上下文分析:查看聊天历史、仓库文件及当前项目需求
  7. 对比现有指令:检查本仓库中已有的指令,避免重复
  8. 匹配相关性:将可用指令与识别出的模式及需求进行匹配
  9. 展示推荐选项:显示相关指令的描述、推荐理由及可用性状态(包括过时指令)
  10. 验证:确保推荐的指令能够提供现有指令未覆盖的价值
  11. 输出:提供结构化表格,包含推荐指令、描述、指向awesome-copilot指令及相似本地指令的链接 等待用户请求以继续安装或更新特定指令。除非收到明确指示,否则请勿进行安装或更新操作
  12. 下载/更新资源:对于用户请求的指令,自动执行以下操作:
    • 将新指令下载至
      .github/instructions/
      文件夹
    • 用awesome-copilot中的最新版本替换过时的指令
    • 请勿修改文件内容
    • 使用
      #fetch
      工具下载资源,也可使用
      curl
      通过
      #runInTerminal
      工具确保获取全部内容
    • 使用
      #todos
      工具跟踪进度

Context Analysis Criteria

上下文分析标准

🔍 Repository Patterns:
  • Programming languages used (.cs, .js, .py, .ts, etc.)
  • Framework indicators (ASP.NET, React, Azure, Next.js, etc.)
  • Project types (web apps, APIs, libraries, tools)
  • Development workflow requirements (testing, CI/CD, deployment)
🗨️ Chat History Context:
  • Recent discussions and pain points
  • Technology-specific questions
  • Coding standards discussions
  • Development workflow requirements
🔍 仓库模式
  • 使用的编程语言(.cs、.js、.py、.ts等)
  • 框架标识(ASP.NET、React、Azure、Next.js等)
  • 项目类型(Web应用、API、库、工具)
  • 开发流程需求(测试、CI/CD、部署)
🗨️ 聊天历史上下文
  • 近期讨论的内容及痛点
  • 特定技术相关的问题
  • 编码规范讨论
  • 开发流程需求

Output Format

输出格式

Display analysis results in structured table comparing awesome-copilot instructions with existing repository instructions:
Awesome-Copilot InstructionDescriptionAlready InstalledSimilar Local InstructionSuggestion Rationale
blazor.instructions.mdBlazor development guidelines✅ Yesblazor.instructions.mdAlready covered by existing Blazor instructions
reactjs.instructions.mdReactJS development standards❌ NoNoneWould enhance React development with established patterns
java.instructions.mdJava development best practices⚠️ Outdatedjava.instructions.mdapplyTo pattern differs: remote uses
'**/*.java'
vs local
'*.java'
- Update recommended
以结构化表格展示分析结果,对比awesome-copilot指令与本仓库现有指令:
Awesome-Copilot指令描述是否已安装相似本地指令推荐理由
blazor.instructions.mdBlazor开发指南✅ 已安装且最新blazor.instructions.md现有Blazor指令已覆盖该内容
reactjs.instructions.mdReactJS开发规范❌ 未安装可通过成熟模式增强React开发
java.instructions.mdJava开发最佳实践⚠️ 已安装但过时java.instructions.mdapplyTo模式存在差异:远程使用
'**/*.java'
,本地使用
'*.java'
- 建议更新

Local Instructions Discovery Process

本地指令发现流程

  1. List all
    *.instructions.md
    files in the
    instructions/
    directory
  2. For each discovered file, read front matter to extract
    description
    and
    applyTo
    patterns
  3. Build comprehensive inventory of existing instructions with their applicable file patterns
  4. Use this inventory to avoid suggesting duplicates
  1. 列出
    instructions/
    目录下所有
    *.instructions.md
    文件
  2. 对于每个发现的文件,读取YAML前置元数据以提取描述及
    applyTo
    匹配模式
  3. 构建现有指令的完整清单,包含其适用的文件匹配模式
  4. 利用该清单避免推荐重复指令

Version Comparison Process

版本对比流程

  1. For each local instruction file, construct the raw GitHub URL to fetch the remote version:
    • Pattern:
      https://raw.githubusercontent.com/github/awesome-copilot/main/instructions/<filename>
  2. Fetch the remote version using the
    #fetch
    tool
  3. Compare entire file content (including front matter and body)
  4. Identify specific differences:
    • Front matter changes (description, applyTo patterns)
    • Content updates (guidelines, examples, best practices)
  5. Document key differences for outdated instructions
  6. Calculate similarity to determine if update is needed
  1. 对于每个本地指令文件,构造获取远程版本的GitHub原始URL:
    • 格式:
      https://raw.githubusercontent.com/github/awesome-copilot/main/instructions/<filename>
  2. 使用
    #fetch
    工具获取远程版本
  3. 对比整个文件内容(包括前置元数据和正文)
  4. 识别具体差异:
    • 前置元数据变更(描述、applyTo模式)
    • 内容更新(指南、示例、最佳实践)
  5. 记录过时指令的关键差异点
  6. 计算相似度以确定是否需要更新

File Structure Requirements

文件结构要求

Based on GitHub documentation, copilot-instructions files should be:
  • Repository-wide instructions:
    .github/copilot-instructions.md
    (applies to entire repository)
  • Path-specific instructions:
    .github/instructions/NAME.instructions.md
    (applies to specific file patterns via
    applyTo
    frontmatter)
  • Community instructions:
    instructions/NAME.instructions.md
    (for sharing and distribution)
根据GitHub文档,copilot-instructions文件应遵循以下结构:
  • 仓库全局指令
    .github/copilot-instructions.md
    (适用于整个仓库)
  • 路径特定指令
    .github/instructions/NAME.instructions.md
    (通过
    applyTo
    前置元数据适用于特定文件匹配模式)
  • 社区共享指令
    instructions/NAME.instructions.md
    (用于分享和分发)

Front Matter Structure

前置元数据结构

Instructions files in awesome-copilot use this front matter format:
markdown
---
description: 'Brief description of what this instruction provides'
applyTo: '**/*.js,**/*.ts' # Optional: glob patterns for file matching
---
awesome-copilot中的指令文件使用以下前置元数据格式:
markdown
---
description: 'Brief description of what this instruction provides'
applyTo: '**/*.js,**/*.ts' # Optional: glob patterns for file matching
---

Requirements

要求

  • Use
    githubRepo
    tool to get content from awesome-copilot repository instructions folder
  • Scan local file system for existing instructions in
    .github/instructions/
    directory
  • Read YAML front matter from local instruction files to extract descriptions and
    applyTo
    patterns
  • Compare local instructions with remote versions to detect outdated instructions
  • Compare against existing instructions in this repository to avoid duplicates
  • Focus on gaps in current instruction library coverage
  • Validate that suggested instructions align with repository's purpose and standards
  • Provide clear rationale for each suggestion
  • Include links to both awesome-copilot instructions and similar local instructions
  • Clearly identify outdated instructions with specific differences noted
  • Consider technology stack compatibility and project-specific needs
  • Don't provide any additional information or context beyond the table and the analysis
  • 使用
    githubRepo
    工具从awesome-copilot仓库的指令文件夹获取内容
  • 扫描本地文件系统,查找
    .github/instructions/
    目录中的现有指令
  • 读取本地指令文件的YAML前置元数据,提取描述及
    applyTo
    匹配模式
  • 对比本地指令与远程版本,检测过时指令
  • 与本仓库现有指令对比,避免重复推荐
  • 聚焦当前指令库覆盖的空白领域
  • 验证推荐的指令是否与仓库的用途及标准相符
  • 为每个推荐提供清晰的理由
  • 包含指向awesome-copilot指令及相似本地指令的链接
  • 明确标记过时指令并注明具体差异点
  • 考虑技术栈兼容性及项目特定需求
  • 除表格和分析内容外,请勿提供任何额外信息或上下文

Icons Reference

图标参考

  • ✅ Already installed and up-to-date
  • ⚠️ Installed but outdated (update available)
  • ❌ Not installed in repo
  • ✅ 已安装且为最新版本
  • ⚠️ 已安装但过时(有可用更新)
  • ❌ 未在仓库中安装

Update Handling

更新处理

When outdated instructions are identified:
  1. Include them in the output table with ⚠️ status
  2. Document specific differences in the "Suggestion Rationale" column
  3. Provide recommendation to update with key changes noted
  4. When user requests update, replace entire local file with remote version
  5. Preserve file location in
    .github/instructions/
    directory
当识别出过时指令时:
  1. 在输出表格中用⚠️标记其状态
  2. 在“推荐理由”列中记录具体差异
  3. 提供更新建议并注明关键变更点
  4. 当用户请求更新时,用远程版本替换整个本地文件
  5. 保留文件在
    .github/instructions/
    目录中的位置