Skip to main content

支持不同类型的自定义说明

了解哪些环境支持哪种类型的自定义指令。

本参考文章详细介绍了各种环境中支持哪种类型的自定义指令。 有关各种类型的自定义指令 GitHub Copilot 的详细信息,请参阅 关于自定义GitHub Copilot 响应

GitHub.com

Copilot 功能 支持的自定义指令类型
Copilot 对话助手
          <li style="text-indent: -1.6em;">
                        <span aria-hidden="true">
                        👤
                        </span>
                        &nbsp;
                        <strong>个人指示</strong>。</li>
              <li style="text-indent: -1.6em;">
                            <span aria-hidden="true">
                            📦
                            </span>
                            &nbsp;
                            <strong>存储库范围的</strong> 说明(使用 <code>.github/copilot-instructions.md</code> 文件)。</li>
            
          <li style="text-indent: -1.6em;">
                        <span aria-hidden="true">🏢</span>&nbsp;<strong>组织</strong>的说明。</li>
        </ul>
      </td>
    </tr>
    <tr>
      <td>Copilot云代理</td>
      <td>
        <ul style="list-style: none; padding-left: 1.5em; margin-left: 0;">
              
          <li style="text-indent: -1.6em;">
                        <span aria-hidden="true">
                        📦
                        </span>
                        &nbsp;
                        <strong>存储库范围的</strong> 说明(使用 <code>.github/copilot-instructions.md</code> 文件)。</li>
              <li style="text-indent: -1.6em;">
                            <span aria-hidden="true">
                            📂
                            </span>
                            &nbsp;
                            <strong>路径特定</strong> 说明(使用 <code>.github/instructions/**/*.instructions.md</code> 文件)。</li>
            
          <li style="text-indent: -1.6em;">
                        <span aria-hidden="true">🤖</span>&nbsp;<strong>代理</strong>说明(使用<code>AGENTS.md</code><code>CLAUDE.md</code>或<code>GEMINI.md</code>文件)。</li>
          <li style="text-indent: -1.6em;">
                        <span aria-hidden="true">🏢</span>&nbsp;<strong>组织</strong>的说明。</li>
        </ul>
      </td>
    </tr>
    <tr>
      <td>Copilot代码评审</td>
      <td>
        <ul style="list-style: none; padding-left: 1.5em; margin-left: 0;">
              
          <li style="text-indent: -1.6em;">
                        <span aria-hidden="true">
                        📦
                        </span>
                        &nbsp;
                        <strong>存储库范围的</strong> 说明(使用 <code>.github/copilot-instructions.md</code> 文件)。</li>
              <li style="text-indent: -1.6em;">
                            <span aria-hidden="true">
                            📂
                            </span>
                            &nbsp;
                            <strong>路径特定</strong> 说明(使用 <code>.github/instructions/**/*.instructions.md</code> 文件)。</li>
            
          <li style="text-indent: -1.6em;">
                        <span aria-hidden="true">🏢</span>&nbsp;<strong>组织</strong>的说明。</li>
        </ul>
      </td>
    </tr>
    

Visual Studio Code

Copilot 功能 支持的自定义指令类型
Copilot 对话助手
          <li style="text-indent: -1.6em;">
                        <span aria-hidden="true">
                        📦
                        </span>
                        &nbsp;
                        <strong>存储库范围的</strong> 说明(使用 <code>.github/copilot-instructions.md</code> 文件)。</li>
              <li style="text-indent: -1.6em;">
                            <span aria-hidden="true">
                            📂
                            </span>
                            &nbsp;
                            <strong>路径特定</strong> 说明(使用 <code>.github/instructions/**/*.instructions.md</code> 文件)。</li>
            
          <li style="text-indent: -1.6em;">
                        <span aria-hidden="true">🤖</span>&nbsp;<strong>代理</strong> 指令(使用 <code>AGENTS.md</code> 文件)。</li>
        </ul>
      </td>
    </tr>
    <tr>
      <td>Copilot云代理</td>
      <td>
        <ul style="list-style: none; padding-left: 1.5em; margin-left: 0;">
              
          <li style="text-indent: -1.6em;">
                        <span aria-hidden="true">
                        📦
                        </span>
                        &nbsp;
                        <strong>存储库范围的</strong> 说明(使用 <code>.github/copilot-instructions.md</code> 文件)。</li>
              <li style="text-indent: -1.6em;">
                            <span aria-hidden="true">
                            📂
                            </span>
                            &nbsp;
                            <strong>路径特定</strong> 说明(使用 <code>.github/instructions/**/*.instructions.md</code> 文件)。</li>
            
          <li style="text-indent: -1.6em;">
                        <span aria-hidden="true">🤖</span>&nbsp;<strong>代理</strong>说明(使用<code>AGENTS.md</code><code>CLAUDE.md</code>或<code>GEMINI.md</code>文件)。</li>
        </ul>
      </td>
    </tr>
    <tr>
      <td>Copilot代码评审</td>
      <td>
        <ul style="list-style: none; padding-left: 1.5em; margin-left: 0;">
          <li style="text-indent: -1.6em;">
                        <span aria-hidden="true">
                        📦
                        </span>
                        &nbsp;
                        <strong>存储库范围的</strong> 说明(使用 <code>.github/copilot-instructions.md</code> 文件)。</li>
        </ul>
      </td>
    </tr>
    

Visual Studio

Copilot 功能 支持的自定义指令类型
Copilot 对话助手
          <li style="text-indent: -1.6em;">
                        <span aria-hidden="true">
                        📦
                        </span>
                        &nbsp;
                        <strong>存储库范围的</strong> 说明(使用 <code>.github/copilot-instructions.md</code> 文件)。</li>
              <li style="text-indent: -1.6em;">
                            <span aria-hidden="true">
                            📂
                            </span>
                            &nbsp;
                            <strong>路径特定</strong> 说明(使用 <code>.github/instructions/**/*.instructions.md</code> 文件)。</li>
              </ul>
      </td>
    </tr>
    <tr>
      <td>Copilot代码评审</td>
      <td>
        <ul style="list-style: none; padding-left: 1.5em; margin-left: 0;">
          <li style="text-indent: -1.6em;">
                        <span aria-hidden="true">
                        📦
                        </span>
                        &nbsp;
                        <strong>存储库范围的</strong> 说明(使用 <code>.github/copilot-instructions.md</code> 文件)。</li>
        </ul>
      </td>
    </tr>
    

JetBrains IDE

Copilot 功能 支持的自定义指令类型
Copilot 对话助手
          <li style="text-indent: -1.6em;">
                        <span aria-hidden="true">
                        📦
                        </span>
                        &nbsp;
                        <strong>存储库范围的</strong> 说明(使用 <code>.github/copilot-instructions.md</code> 文件)。</li>
              <li style="text-indent: -1.6em;">
                            <span aria-hidden="true">
                            📂
                            </span>
                            &nbsp;
                            <strong>路径特定</strong> 说明(使用 <code>.github/instructions/**/*.instructions.md</code> 文件)。</li>
              </ul>
      </td>
    </tr>
    <tr>
      <td>Copilot云代理</td>
      <td>
        <ul style="list-style: none; padding-left: 1.5em; margin-left: 0;">
              
          <li style="text-indent: -1.6em;">
                        <span aria-hidden="true">
                        📦
                        </span>
                        &nbsp;
                        <strong>存储库范围的</strong> 说明(使用 <code>.github/copilot-instructions.md</code> 文件)。</li>
              <li style="text-indent: -1.6em;">
                            <span aria-hidden="true">
                            📂
                            </span>
                            &nbsp;
                            <strong>路径特定</strong> 说明(使用 <code>.github/instructions/**/*.instructions.md</code> 文件)。</li>
            
          <li style="text-indent: -1.6em;">
                        <span aria-hidden="true">🤖</span>&nbsp;<strong>代理</strong>说明(使用<code>AGENTS.md</code><code>CLAUDE.md</code>或<code>GEMINI.md</code>文件)。</li>
        </ul>
      </td>
    </tr>
    <tr>
      <td>Copilot代码评审</td>
      <td>
        <ul style="list-style: none; padding-left: 1.5em; margin-left: 0;">
              
          <li style="text-indent: -1.6em;">
                        <span aria-hidden="true">
                        📦
                        </span>
                        &nbsp;
                        <strong>存储库范围的</strong> 说明(使用 <code>.github/copilot-instructions.md</code> 文件)。</li>
              <li style="text-indent: -1.6em;">
                            <span aria-hidden="true">
                            📂
                            </span>
                            &nbsp;
                            <strong>路径特定</strong> 说明(使用 <code>.github/instructions/**/*.instructions.md</code> 文件)。</li>
              </ul>
      </td>
    </tr>
    

Eclipse

Copilot 功能 支持的自定义指令类型
Copilot 对话助手
  •   存储库范围的 说明(使用 .github/copilot-instructions.md 文件)。
Copilot云代理
          <li style="text-indent: -1.6em;">
                        <span aria-hidden="true">
                        📦
                        </span>
                        &nbsp;
                        <strong>存储库范围的</strong> 说明(使用 <code>.github/copilot-instructions.md</code> 文件)。</li>
              <li style="text-indent: -1.6em;">
                            <span aria-hidden="true">
                            📂
                            </span>
                            &nbsp;
                            <strong>路径特定</strong> 说明(使用 <code>.github/instructions/**/*.instructions.md</code> 文件)。</li>
            
          <li style="text-indent: -1.6em;">
                        <span aria-hidden="true">🤖</span>&nbsp;<strong>代理</strong>说明(使用<code>AGENTS.md</code><code>CLAUDE.md</code>或<code>GEMINI.md</code>文件)。</li>
        </ul>
      </td>
    </tr>
    <tr>
      <td>Copilot代码评审</td>
      <td>
        <ul style="list-style: none; padding-left: 1.5em; margin-left: 0;">
          <li style="text-indent: -1.6em;">目前不支持自定义说明。</li>
        </ul>
      </td>
    </tr>
    

Xcode

Copilot 功能 支持的自定义指令类型
Copilot 对话助手
          <li style="text-indent: -1.6em;">
                        <span aria-hidden="true">
                        📦
                        </span>
                        &nbsp;
                        <strong>存储库范围的</strong> 说明(使用 <code>.github/copilot-instructions.md</code> 文件)。</li>
              <li style="text-indent: -1.6em;">
                            <span aria-hidden="true">
                            📂
                            </span>
                            &nbsp;
                            <strong>路径特定</strong> 说明(使用 <code>.github/instructions/**/*.instructions.md</code> 文件)。</li>
              </ul>
      </td>
    </tr>
    <tr>
      <td>Copilot云代理</td>
      <td>
        <ul style="list-style: none; padding-left: 1.5em; margin-left: 0;">
              
          <li style="text-indent: -1.6em;">
                        <span aria-hidden="true">
                        📦
                        </span>
                        &nbsp;
                        <strong>存储库范围的</strong> 说明(使用 <code>.github/copilot-instructions.md</code> 文件)。</li>
              <li style="text-indent: -1.6em;">
                            <span aria-hidden="true">
                            📂
                            </span>
                            &nbsp;
                            <strong>路径特定</strong> 说明(使用 <code>.github/instructions/**/*.instructions.md</code> 文件)。</li>
            
          <li style="text-indent: -1.6em;">
                        <span aria-hidden="true">🤖</span>&nbsp;<strong>代理</strong>说明(使用<code>AGENTS.md</code><code>CLAUDE.md</code>或<code>GEMINI.md</code>文件)。</li>
        </ul>
      </td>
    </tr>
    <tr>
      <td>Copilot代码评审</td>
      <td>
        <ul style="list-style: none; padding-left: 1.5em; margin-left: 0;">
              
          <li style="text-indent: -1.6em;">
                        <span aria-hidden="true">
                        📦
                        </span>
                        &nbsp;
                        <strong>存储库范围的</strong> 说明(使用 <code>.github/copilot-instructions.md</code> 文件)。</li>
              <li style="text-indent: -1.6em;">
                            <span aria-hidden="true">
                            📂
                            </span>
                            &nbsp;
                            <strong>路径特定</strong> 说明(使用 <code>.github/instructions/**/*.instructions.md</code> 文件)。</li>
              </ul>
      </td>
    </tr>
    

Copilot CLI

  •   存储库范围的 说明(使用 .github/copilot-instructions.md 文件)。
  •   路径特定 说明(使用 .github/instructions/**/*.instructions.md 文件)。
  •  代理 指令(使用 AGENTS.md 文件)。

延伸阅读

  •         [AUTOTITLE](/copilot/how-tos/configure-custom-instructions/add-repository-instructions)
    
  •         [AUTOTITLE](/copilot/how-tos/configure-custom-instructions/add-personal-instructions)
    
  •         [AUTOTITLE](/copilot/how-tos/configure-custom-instructions/add-organization-instructions)