Where does GitHub Copilot look for repository instructions?
GitHub Copilot automatically loads .github/copilot-instructions.md for Copilot Chat, code review, and the Copilot coding agent, and also reads AGENTS.md in supported workflows.
Generate .github/copilot-instructions.md from your existing CLAUDE.md — stripping Claude-only hooks and skills while keeping build commands, architecture boundaries, and safety rules intact.
# Acme Billing API Node 22 + TypeScript REST service handling Stripe webhooks, idempotent ledger writes, and PDF invoices. ## Commands - Fast single test: `npx vitest run src/billing/webhook.test.ts` - Full test suite: `pnpm test` - Typecheck & lint: `npx tsc --noEmit && pnpm lint` - Build: `pnpm build` ## Rules - Don't bypass Zod validation on webhook routes. Instead parse payloads in `src/webhooks/schema.ts`. Because unvalidated retries previously caused duplicate charges. - Don't mix package managers. Instead use `pnpm` exclusively. Because competing lockfiles break CI caching. - When changing SQL schemas, read `docs/migrations.md` before editing Prisma files. ## Continuity - Record verified test outputs in `HANDOFF.md` before ending multi-step sessions.
20 lines · 774 / 40,000 char ceiling · emphasis 0/1K words
| File | Loaded By | What Belongs Here | Sync Strategy |
|---|---|---|---|
| AGENTS.md | Codex CLI, Cursor, Copilot, Windsurf | Canonical project facts, build/test commands, architecture & safety boundaries | Single source of truth |
| CLAUDE.md | Claude Code | @AGENTS.md import + .claude/settings.json hooks, skills, and permissions | @AGENTS.md |
| .cursor/rules/*.mdc | Cursor Agent & Inline Edit | Path-scoped conventions using globs: frontmatter (UI, SQL, tests) | Scoped via globs: |
| .github/copilot-instructions.md | GitHub Copilot | Thin pointer to AGENTS.md or synced repo instructions | Pointer / CI check |
| GEMINI.md | Gemini CLI | @AGENTS.md import + Gemini CLI-specific guidance | @AGENTS.md |
GitHub Copilot automatically loads .github/copilot-instructions.md for Copilot Chat, code review, and the Copilot coding agent, and also reads AGENTS.md in supported workflows.
Switch to Pointer Mode to make AGENTS.md your canonical rule file, then keep both CLAUDE.md and .github/copilot-instructions.md as thin pointers backed by agentlint check in CI.
Copy verified starters for TypeScript, Python, Next.js, FastAPI, Rust, Go, Vue, and Monorepos.
Read our empirical data on 132-line medians, 37 repos exceeding 40K chars, and 58% unpinned Actions.
Inspect how VS Code, Next.js, uv, and Bun structure their CLAUDE.md and AGENTS.md harnesses.