ipIterPrompt
RulesetAgent ConfigurationVerified Last verified 2026-07-24

GitHub Copilot Custom Instructions

by GitHub

GitHub Copilot reads repository-wide custom instructions from a `.github/copilot-instructions.md` file. It's plain Markdown with no required schema — you describe your stack, conventions, and constraints, and Copilot applies them across Chat, code review, and the coding agent. Path-specific `.instructions.md` files with an `applyTo` field can target particular directories.

Works with

Copilot Extensions, MCP servers, and agent skills.

When to use it

  • When Copilot repeatedly suggests code that ignores your conventions
  • Standardizing Copilot's behavior for everyone working in a repo

When not to

  • For secrets or long reference docs — keep the file concise and non-sensitive

What it does

  • Give Copilot persistent project context (stack, conventions, constraints)
  • Apply instructions across Copilot Chat, code review, and the coding agent
  • Scope guidance to paths with `.instructions.md` and an `applyTo` glob

How to install

Setup steps with copy-paste config. Sources are cited under each method.

Add repository instructions

GitHub Copilot

Requires: A GitHub repository · GitHub Copilot enabled

  1. Create the file

    Add `.github/copilot-instructions.md` at the repo root. Standard Markdown — no frontmatter required.

    config
    # Project conventions
    
    - This is a TypeScript monorepo managed with pnpm workspaces.
    - Prefer functional React components and hooks.
    - Every new module ships with Vitest unit tests.
    - Never introduce a new dependency without noting why.
  2. Commit and verify

    Commit the file; Copilot picks it up automatically. Optionally add path-scoped `*.instructions.md` files with an `applyTo` field.

How to prompt it

Copy-paste prompts written to exercise this plugin, with what to expect.

Let instructions shape a suggestion

With conventions in place, you ask Copilot Chat for a new component.

Create a UserCard component with the props we discussed. Follow the repo conventions.

What to expect: Copilot generates a functional component with hooks and a co-located Vitest test, matching the instructions file without you restating them.

  • Keep the file short and specific; vague instructions get diluted.

Tips for getting the most out of it

  • Organize instructions with headings and bullets — Copilot treats whitespace loosely, so clarity matters more than layout.
  • Use path-specific `.instructions.md` files to give different folders different rules.

Prompts to pair with it

Real prompts from the IterPrompt library you can copy or run.

4.7

Conventional Commit Writer

A SKILL.md that makes your agent write clean conventional commits, every time.

3,420 copiesOpen ↗

Conventional Commit Message Generator

Turn any AI chat into a conventional commit message generator with this community persona prompt.

4,303 copiesOpen ↗

copilot

Turn any AI chat into a copilot with this community persona prompt.

1,881 copiesOpen ↗

Copilot

A community prompt for copilot, imported from LLM-Prompt-Library (MIT).

1,915 copiesOpen ↗
4.7

Python Code Style

Python code style, linting, formatting, naming conventions, and documentation standards. Use when writing new code, reviewing style, configuring linters, writing docstrings, or est

2,533 copiesOpen ↗
See more prompts in the library

Frequently asked questions

Does the file need frontmatter?+

The repo-wide `copilot-instructions.md` needs none — it's plain Markdown. Path-specific `.instructions.md` files use an `applyTo` field to target directories.

Where is it read?+

It applies across Copilot surfaces including Chat, code review, and the coding agent. Confirm exact coverage in GitHub's docs, as support expands over time.

Pairs well with

Related guides

Alternatives to GitHub Copilot Custom Instructions

Sources & verification

The facts on this page and where they come from. Anything unverified is labeled — we'd rather say "unknown" than guess.

Install steps, pricing, and availability change often. Always confirm on the official page before relying on setup details.