GitHub Copilot

Verified against GitHub Copilot Chat · 2026-07-20

Write a .github/copilot-instructions.md file Copilot actually follows

A repository custom-instructions file template that gives every Copilot Chat, code review, and coding-agent session your stack, conventions, and hard constraints automatically, without retyping them per chat.

GitHub Copilot Chat (VS Code)GitHub Copilot code reviewGitHub Copilot coding agent

The prompt

Ready to copy — highlighted parts are example details you can swap.

# Repository custom instructions for GitHub Copilot
# Save as .github/copilot-instructions.md — Copilot adds this to every Chat request,
# code review pass, and coding-agent session in this repository automatically.

## Project
tools.scult.inNext.js 15 App Router, TypeScript strict mode, Tailwind CSS, Biome

## Conventions to follow in every suggestion
- Prefer named exports over default exports.
- Co-locate component tests next to the component, not in a separate __tests__ tree.
- Use the existing `cn()` helper for conditional class names, never template-literal concatenation.

## Never do this
- Never use `any` without a comment justifying it.
- Never add a new npm dependency without flagging it in the PR description first.

## When reviewing or generating code, prioritize
Accessibility of any new UI component, and whether new API routes validate input with a schema before touching the database.

Keep every statement above short, specific, and self-contained. A rule that depends on
context from another section gets applied inconsistently — write each one so it stands alone.
Customize the highlighted detailsoptional — the prompt above already works

Why this works

A .github/copilot-instructions.md file is loaded automatically into context for every Copilot Chat request, every automated code review pass, and every Copilot coding agent session in that repository — unlike a rule typed into one chat, which is scoped to that single conversation and gone the moment it ends. This is also the file the coding agent reads before it starts working on an assigned issue, so a constraint written here bounds its autonomous behavior on a PR you never watched it write, not just its behavior in an interactive chat you're present for. GitHub's own guidance for this file is explicit that short, specific, self-contained statements apply more consistently than long prose, because Copilot has to re-derive the applicable rule from the instructions file plus the current task on every single request — a rule that only makes sense in combination with another sentence three lines up gets dropped more often than one that stands alone. Repos with monorepo-specific needs can layer path-scoped instructions on top of this file via .github/instructions/*.instructions.md with an applyTo frontmatter glob, but the repo-wide file is the one every surface reads by default, which is why it's worth getting the conventions and forbidden-patterns sections right first.

Verified against

GitHub Copilot Chat Copilot Chat 1.260 (VS Code) · 2026-07-20

GitHub Copilot coding agent GA release, 2026-06 · 2026-07-25

Changelog

  • 2026-07-25 Initial publish, verified against Copilot Chat 1.260 (VS Code) and the Copilot coding agent.

Need this built into your business?

If a prompt isn't enough — custom software, built and maintained for you — that's Scult's day job.

EXPLORE CUSTOM SOFTWARE
All GitHub Copilot prompts

Check your AI visibility

One URL in, a 0–100 score and the exact fixes out.

RUN THE CHECK

Browse all the tools

15 tools across six categories
13 of them never send your data anywhere

Free · No signup · No trial clock

SEE THE DIRECTORY