Learn Everything

Paths/Copilot Engineer/Copilot Essentials / Repository Setup

Guided Taskbeginnerubuntu:24.04Ask AI

Write the Repository Instructions

Copilot reads one instruction file for the whole repository. Write it with the commands, the conventions and the things the assistant must never do.

Validator

⏱ 0:00

IDLE — checks run live as you type commands; submit when done

01Requirements

live checks
  • Directory ~/project/.github exists○
  • File ~/project/.github/copilot-instructions.md exists○
  • The file states the build and the test commands○
  • The file states the conventions and the rules○

02Walkthrough

4 steps
  1. 01

    Create the github directory

    The instructions file lives in the hidden .github directory at the repository root.

    mkdir -p ~/project/.github
  2. 02

    Write the commands

    The two commands the assistant will suggest. Get them wrong and it will suggest the wrong things all day.

    echo '# Copilot instructions\n\n## Commands\n\n- build: pnpm build\n- test: pnpm test' > ~/project/.github/copilot-instructions.md
  3. 03

    Add the conventions and the rules

    Say how the code should look and what the assistant must never produce. Short, concrete sentences work best.

    echo '\n## Conventions\n\n- TypeScript strict mode\n- named exports only\n- every function gets a test\n\n## Never\n\n- never invent a dependency that is not already in the package manifest' >> ~/project/.github/copilot-instructions.md
  4. 04

    Verify and submit

    cat the file, then submit for validation.

    cat ~/project/.github/copilot-instructions.md

03Stuck?

0 of 3 revealed

Take a hint without losing the lab — each one points at the thing to look at, not at the answer.

04AI Tutor

guides, never solves

Tell me what you're stuck on — I'll nudge, not solve. Which requirement are you looking at?

04Notebook

saved locally in this browser

learner@lab — ubuntu:24.04

↑/↓ recalls commands · Ctrl+Enter submits · type help for the command list