Sign in
Explore
Prompts · RulesEveryday codingContext & memoryReviewed

context-engineering

Guidelines for structuring code and projects so that GitHub Copilot has better context and works more effectively.

Kind
Rules
Works with
GitHub Copilot
Source
Awesome Copilot @ d85f762d6e52
Path
instructions/context-engineering.instructions.md
Jobs
Context management
Topics
Context & memory

Credit

Made by
github
Original
github.com/github/awesome-copilot/blob/d85f762d6e521abf5fe167…
License
MIT

Listed by Skill Manifest; not made by us.

InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
Install factsScanned 3 Nov 2026
Adds
  • Text to merge into your CLAUDE.md or AGENTS.md (no new files)
Runs scripts
None found
Uses the network
None found
Needs secrets
None found
Source revision
d85f762d6e52
Licence
MIT
Last activity
25 Nov 2026
Source changed after the scan
Yes
  • Last push 25 Nov 2026, scanned 3 Nov 2026; read it again before you rely on this scan
Review
Reviewed

Found by a static scan of the stored text; nothing is run. “None found” is not a guarantee, so read what you install before you run it.

# Context Engineering

Principles for helping GitHub Copilot understand your codebase and provide better suggestions.

## Project Structure

- **Use descriptive file paths**: `src/auth/middleware.ts` > `src/utils/m.ts`. Copilot uses paths to infer intent.
- **Colocate related code**: Keep components, tests, types, and hooks together. One search pattern should find everything related.
- **Export public APIs from index files**: What's exported is the contract; what's not is internal. This helps Copilot understand boundaries.

## Code Patterns

- **Prefer explicit types over inference**: Type annotations are context. `function getUser(id: string): Promise<User>` tells Copilot more than `function getUser(id)`.
- **Use semantic names**: `activeAdultUsers` > `x`. Self-documenting code is AI-readable code.
- **Define constants**: `MAX_RETRY_ATTEMPTS = 3` > magic number `3`. Named values carry meaning.

## Working with Copilot

- **Keep relevant files open in tabs**: Copilot uses open tabs as context signals. Working on auth? Open auth-related files.
- **Position cursor intentionally**: Copilot prioritizes code near your cursor. Put cursor where context matters.
…