Skip to main content

为 GitHub Copilot 添加个人自定义说明

自定义 GitHub Copilot 聊天 回复以匹配个人偏好设置。

注意

Personal custom instructions are only supported for GitHub Copilot Chat in GitHub.

You can customize GitHub Copilot Chat responses in several ways. For an overview, see About customizing GitHub Copilot responses.

About personal custom instructions for Copilot Chat

Add custom instructions to receive personalized chat responses. Your instructions apply to all your conversations on the GitHub website. Custom instructions let you specify preferences such as your preferred language or response style.

Examples of instructions you can add:

  • Always respond in Spanish.
  • Use a helpful, collegial tone. Keep explanations brief, but provide enough context to understand the code.
  • Always provide examples in TypeScript.

注意

  • Multiple types of custom instructions can apply to a request sent to Copilot. Personal instructions take the highest priority. Repository instructions come next, and then organization instructions are prioritized last. However, all sets of relevant instructions are provided to Copilot.
  • Whenever possible, try to avoid providing conflicting sets of instructions. If you are concerned about response quality, you can temporarily disable repository instructions. See Adding repository custom instructions for GitHub Copilot.

Adding personal custom instructions

To add personal custom instructions in Copilot Chat on GitHub:

  1. Open Copilot Chat.

  2. In the bottom left corner, click your profile picture. Then click Personal instructions.

  3. Add natural language instructions to the text box.

    Use any format. For example, a single block of text, each instruction on a new line, or instructions separated by blank lines.

  4. Optionally, use a template for common instructions. Click and select a template.

    When you select a template, placeholder text appears. Replace placeholders like {format} with your preferences.

  5. Click Save.

Your instructions are now active. They will remain active until you change or remove them.

Did you successfully add personal custom instructions?

Yes No

Further reading