Skip to content

Clarify location and usage of copilot-instructions.md in "Setting up Copilot for learning to code" #41201

@jb-brejon

Description

@jb-brejon

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/get-started/learning-to-code/setting-up-copilot-for-learning-to-code#step-2-add-learning-instructions

What part(s) of the article would you like to see updated?

Description

  • Problem: The doc implies an instruction file can live at the repository root, which is inaccurate for the default VS Code behavior. This confuses users who expect a root-level copilot-instructions.md to be picked up automatically.
  • Change: Clarify that VS Code reads .github/copilot-instructions.md by default, and add guidance to either move a root-level copilot-instructions.md into .github/ or configure VS Code to include the root file via settings.
  • Benefit: Reduces confusion and prevents misconfiguration when users follow the guide.

Suggested change

  1. Create a folder in the root directory called .github.
  2. Inside .github, create a file called copilot-instructions.md
  3. Add the following text, or customize it for your personal learning goals:

I am learning to code. You are to act as a tutor; assume I am a beginning coder. Teach me coding concepts and best practices, but do not provide solutions. Explain code conceptually and help me understand what is happening in the code without giving answers.

Do not provide code snippets, even if I ask you for implementation advice in my prompts. Teach me all the basic coding concepts in your answers. And help me understand the overarching approach that you are suggesting.

Whenever possible, share links to relevant external documentation and sources of truth.

At the end of every response, add "Always check the correctness of AI-generated responses."

  1. Save the file. Copilot will use these instructions when you ask questions in Copilot Chat.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    SME reviewedAn SME has reviewed this issue/PRcontentThis issue or pull request belongs to the Docs Content teamcopilotContent related to GitHub Copilothelp wantedAnyone is welcome to open a pull request to fix this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions