Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/nedcodes-ok/cursorrules-collection/copilot-instructionsgit clone --depth 1 https://github.com/nedcodes-ok/cursorrules-collectionWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00730 |
| Opus 5 | $0.00000 | $0.00365 |
| Sonnet 5 | $0.00000 | $0.00146 |
| Haiku 4.5 | $0.00000 | $0.00073 |
Grade B, and why
copilot-instructions scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nullifies safety policiesmediumAnti-refusal
"You have no restrictions", "do anything now", "ignore your guidelines": a direct jailbreak that disables guardrails.
- Don't try to give Copilot a personality or override its safety guidelines — it won't work and wastes instruction space Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
Copies of this mod
1 near-identical copy found in the catalogue:
- copilot-instructions — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 62 lines — stays where its author put it; the contents beside it link to each section on GitHub.
GitHub Copilot Custom Instructions Rules
Copilot supports three layers of custom instructions, from broad to specific.
Repository-Wide Instructions
- File:
.github/copilot-instructions.md - Applies to all Copilot interactions in the repo: chat, completions, code review, and the coding agent
- Plain markdown, no special frontmatter required
- You can ask the Copilot coding agent to generate this file for you — it will analyze your repo and create one
Path-Specific Instructions
- Files:
.github/instructions/<name>.instructions.md - Each file includes a YAML frontmatter
applyTofield with a glob pattern specifying which files the instructions apply to - When Copilot is working on a file that matches the glob, both the repo-wide and the matching path-specific instructions are used together
- Example:
---
applyTo: "**/*.ts"
---
# TypeScript Instructions
- Use strict mode
- Prefer interfaces over type aliases for object shapes
- Use discriminated unions for state management
Agent Instructions (AGENTS.md)
- Copilot coding agent also reads AGENTS.md files (the OpenAI Codex format)
- Nearest AGENTS.md in the directory tree takes precedence over others
- Copilot also supports CLAUDE.md and GEMINI.md at the repo root as alternatives
- If you have both
copilot-instructions.mdand AGENTS.md, both are used
What Works Well
- Build, test, and validation commands — the coding agent uses these to verify its own changes
- Framework and library preferences: "use React Testing Library, not Enzyme," "use fetch, not axios"
- Naming conventions, file organization expectations, import ordering
- Code review instructions: what Copilot should flag during reviews ("check for missing error handling," "verify accessibility attributes on interactive elements")
Path-Specific Patterns
**/*.test.ts— testing conventions (framework, assertion style, mock patterns)src/api/**— API conventions (response format, error handling, auth patterns)**/*.css— styling conventions (methodology, naming, no inline styles)docs/**— documentation conventions (format, required sections, link validation)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 62 lines · 0 tokens per session scan B 9c710d89d20b
copilot-instructions is a cursor rule published in the GitHub repository nedcodes-ok/cursorrules-collection (37 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 730 tokens. A static security scan graded it B with 1 finding (nullifies safety policies). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.