Copilot Instructions Template

A .github/copilot-instructions.md that gives GitHub Copilot your stack, conventions, and boundaries in the short, explicit form it follows best.

# Copilot instructions for [PROJECT NAME]

[One sentence: what this project is.]

## Stack

- [LANGUAGE + VERSION, FRAMEWORK + VERSION, e.g. "TypeScript 5, Next.js 16 App Router, Tailwind 4"]
- [DATABASE/ORM, e.g. "Postgres via Drizzle: schema in db/schema.ts"]
- [TEST RUNNER, e.g. "vitest; tests live next to source as *.test.ts"]

## How to verify changes

- Type check: `[COMMAND]`
- Tests: `[COMMAND]`
- A change is not complete until both pass.

## Conventions

- Use named exports, never default exports.
- [STATE PATTERN, e.g. "Server components by default; 'use client' only for interactivity."]
- [ERROR PATTERN, e.g. "API routes return typed errors via lib/errors.ts, never raw strings."]
- [DATA PATTERN, e.g. "All DB access goes through repositories in lib/repos/, no inline queries."]
- Match the style of the surrounding file over general best practices.

## Do not

- Do not add dependencies, config files, or environment variables unprompted.
- Do not edit: [GENERATED/PROTECTED PATHS, e.g. `db/migrations/`, `*.gen.ts`].
- Do not write code comments that restate what the code does.

How to use

Save to .github/copilot-instructions.md: Copilot loads it for every chat and agent request in the repo. Keep it under ~200 lines and make every instruction explicit ('use named exports') rather than aspirational ('write good code'); vague lines are ignored. For rules that only apply to some paths, add scoped files under .github/instructions/*.instructions.md with an 'applyTo: "**/*.ts"' frontmatter glob instead of growing this file.

More agent prompts

You are a software engineering agent working in the [PRODUCT/TEAM] codebase ([LANGUAGE/STACK]). Your objective is to take an assigned task from description to verified, working code. You may read and modify anything in the repository; you do not push, merge, deploy, or alter CI configuration unless the task explicitly says to.

# Operatin

Coding Agent System Prompt

Autonomous coding agent that matches repo conventions, proves work with passing tests before claiming done, and reports failures truthfully.

Agentintermediate
You are a debugging agent for the [PRODUCT] codebase. Your objective is to find the root cause of a reported bug, fix it with the smallest possible change, and prove the fix. You are not here to refactor, harden, or improve unrelated code: a debugging session that ends in a 40-file diff has failed even if the bug is gone.

# Reproduce Bef

Debugging Agent System Prompt

Root-cause-first debugging agent: no fix until the bug is reproduced, minimal diffs only, and done means the repro dies while the test suite stays green.

Agentintermediate
You are a code migration agent. Your objective is to move the [PRODUCT] codebase from [SOURCE VERSION/FRAMEWORK] to [TARGET VERSION/FRAMEWORK] while preserving behavior exactly. You are a mechanical translator with judgment, not a redesigner: the product must work the same after every step you take.

# The Prime Rule: Migration Changes On

Code Migration Agent System Prompt

Framework-upgrade agent that migrates in build-green slices, verifies every codemod, follows official guides over memory, and never mixes in behavior changes.

Agentadvanced

Search prompts

Find a prompt by title, description, tag, or category.