iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
The most reliable way to give GitHub Copilot repository context is to start with one concise .github/copilot-instructions.md file at the repository root, then add path-specific files only where different parts of the codebase need different rules. After that, confirm that the Copilot surface you use supports those instruction types and verify that Copilot actually loaded them.
That sequence matters because repository instructions, path-specific instructions, AGENTS.md, prompt files and custom agents are not interchangeable. Their scope, activation method and feature support differ across GitHub.com, VS Code, Visual Studio, JetBrains, Eclipse, Xcode and Copilot CLI.
What “the right context” means
Copilot can produce a technically valid answer that is still wrong for your repository. A suggestion may use a library your project does not allow, place code in the wrong layer, skip a required validation command or follow a style convention that conflicts with the rest of the codebase. Repository context reduces those avoidable mismatches by making local conventions explicit.
GitHub describes repository custom instructions as files that “give Copilot additional context on how to understand your project and how to build, test and validate its changes.” The instructions are natural-language Markdown, not executable policy. They guide Copilot; they do not replace code review, tests, branch protection or security controls.
#1 Best Overall
- Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
- With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
- Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
- Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
- Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.
Useful context is specific and actionable. It names the framework and version where that matters, identifies the supported package manager, states where business logic belongs, lists commands for formatting and tests, and calls out constraints such as “do not edit generated files.” Vague requests such as “write clean code” add little because Copilot cannot reliably map them to a decision in your repository.
No official documentation establishes a universal percentage improvement or guarantees better output from any instruction method. Treat instructions as a way to expose repository knowledge and make responses more consistent, not as a substitute for validating every change.
Choose the Copilot surface before you create files
First identify where the team is asking Copilot to work and which feature is involved. GitHub’s support reference distinguishes instruction support for GitHub.com, VS Code, Visual Studio, JetBrains, Eclipse, Xcode and Copilot CLI, and it separates features such as Copilot Chat, the cloud agent and code review.
Recommended Free Tools
Use the custom-instructions support matrix as a compatibility checklist. Check the exact combination you use rather than assuming that a file recognized by one surface is read by all others. Some entries are documented as public preview and can change, so recheck the current matrix when upgrading an IDE or adopting a new Copilot feature.
Questions to answer first
- Are requests made in an IDE chat panel, on GitHub.com, through the cloud agent, during code review or in Copilot CLI?
- Which IDE and version do contributors use?
- Do you need automatic guidance for most repository tasks, a manually invoked task template, or a distinct agent workflow?
- Will instructions apply to the whole repository, only selected paths, or a nested directory?
Answering these questions prevents a common failure: writing a perfectly valid instruction file that the chosen Copilot feature does not support.
Set the repository-wide baseline
Create .github/copilot-instructions.md
- At the repository root, create the
.githubdirectory if it does not exist. - Inside it, create a file named
copilot-instructions.md. The spelling and location matter. - Write concise Markdown instructions that apply across the repository.
- Commit the file so every contributor and supported repository-context request sees the same baseline.
GitHub’s IDE guidance explains this setup in Adding repository custom instructions for GitHub Copilot in your IDE. The documented purpose is repository-wide guidance for requests made in repository context.
Rank #2
- Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
- Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
- Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
- Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
- Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth
What belongs in the baseline
- Architecture: identify major applications, libraries, services and the direction in which dependencies should flow.
- Languages and frameworks: state the principal languages, framework conventions and runtime assumptions that affect generated code.
- Tools: name the package manager, formatter, linter, test runner, build system and local development commands.
- Validation: tell Copilot which checks must pass before a change is considered complete, and whether tests should be added or updated.
- Repository conventions: describe naming, module boundaries, error handling, logging, configuration and documentation expectations.
- Safety constraints: identify generated files, migration rules, secrets handling and directories that should not be edited directly.
Keep instructions operational
Prefer “Run npm run lint and npm test for JavaScript changes” over “follow our quality standards.” Prefer “Use the repository’s existing HTTP client; do not add a new dependency without approval” over “minimize dependencies.” A rule should tell Copilot what decision to make or what command to run.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchKeep the file maintainable. Put stable, repository-wide rules here; do not turn it into a complete style manual or paste large API references that Copilot can already discover from the code. Review it when the build, test or framework setup changes.
A practical baseline outline
# Project purpose
- Briefly describe the applications and services in this repository.
# Architecture
- Keep domain logic in the domain modules; adapters belong in the adapter layer.
- Do not edit generated files directly.
# Development commands
- Install dependencies with the repository's documented package-manager command.
- Run the formatter, linter and relevant test command before proposing a change.
# Implementation conventions
- Reuse existing utilities and error types before adding new ones.
- Update tests and documentation when behavior changes.
The example is a structure, not a universal policy. Replace every generic line with conventions that are true for your repository.
Add path-specific instructions only where guidance differs
A single global file is easy to discover but can become noisy. A TypeScript front end, a Python service and infrastructure code may have different tools, testing patterns and safety rules. In VS Code, path-specific instruction files live in .github/instructions/, end with .instructions.md, and begin with frontmatter containing an applyTo glob.
Create a scoped file in VS Code
- Create
.github/instructions/at the repository root. - Add a descriptive file such as
frontend.instructions.md. - Start the file with frontmatter that identifies the matching paths.
- Put only the rules that are relevant to those paths.
- Open a matching file in VS Code and verify that the instructions are included in the Copilot response references.
---
applyTo: "**/*.ts,**/*.tsx"
---
- Use the existing component library and state-management patterns.
- Keep API calls in the designated client modules.
- Run the TypeScript checks and the focused front-end tests for changes here.
The applyTo value is a glob pattern. Choose a pattern that matches the files the rule actually governs; an overly broad pattern recreates the noise you were trying to remove.
How scoping combines with the baseline
When a file matches a path-specific instruction file and repository-wide instructions exist, VS Code uses both. The scoped file supplements the baseline; it does not automatically replace it. That makes the global file the place for rules such as supported tooling and general architecture, while the scoped file handles language- or directory-specific decisions.
Rank #3
- 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
- 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
- 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
- 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
- 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.
When not to split files
- Do not create a path-specific file merely to shorten the global file.
- Do not duplicate the same rule in several files; duplication creates maintenance drift.
- Do not use a glob that overlaps unrelated directories unless the rule genuinely applies to all of them.
- Do not put contradictory instructions in global and scoped files. If a local exception is necessary, state it clearly in the scoped file and test how the target Copilot surface resolves it.
Understand AGENTS.md and nested agent instructions
AGENTS.md is not a universal replacement for .github/copilot-instructions.md. GitHub’s support matrix lists where agent instruction files are supported, and that support varies by product and feature.
For the documented VS Code setup, Copilot uses the nearest AGENTS.md in the directory tree when it is working in a location covered by that workflow. Support for an AGENTS.md outside the workspace root is off by default in that setup. A nested file can therefore be useful for a self-contained service or package, but only after you confirm that your actual feature supports it.
Keep agent files aligned with the repository baseline. If two files prescribe different formatters, test commands or architectural boundaries, Copilot may receive conflicting guidance. For Copilot CLI specifically, the documentation says discovered instruction files are combined and does not define a general precedence order. Avoid relying on an assumed “closest file always wins” rule in CLI workflows.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Know which customization mechanism to use
GitHub’s customization documentation separates three ideas that are often mixed together: custom instructions, prompt files and custom agents.
| Mechanism | Scope | Activation | Best use | Maintenance concern |
|---|---|---|---|---|
| Repository or path-specific custom instructions | All applicable requests, either repository-wide or matching paths | Automatic when the supported feature loads them | Conventions, architecture, tools and validation rules that should be present repeatedly | Keep rules concise and consistent across global and scoped files |
| Prompt files | One focused task or request pattern | Manually selected or invoked | Repeatable review checklists, test-generation prompts or release-note tasks | Users must remember to invoke the file; it is not a global baseline |
| Custom agents | A distinct process with a defined role | Selected as an agent workflow | Specialized capabilities, handoffs or multi-step responsibilities | Requires a clear role and supported feature; avoid using it for ordinary style rules |
Use automatic instructions for facts Copilot should know almost every time. Use a prompt file when the user intentionally asks for a repeatable operation. Use a custom agent when the workflow itself is different, such as a specialized role with particular capabilities or a handoff.
The response-customization overview and customization cheat sheet describe these distinctions. None of them establishes a universal ranking that guarantees one mechanism produces better code than another.
Rank #4
- 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
- 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
- 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
- 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
- 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
Verify that Copilot loaded the context
VS Code verification
- Open the Chat view in VS Code and ask a repository-specific question that should use a known convention.
- Inspect the response’s References list.
- Confirm that
.github/copilot-instructions.mdappears when the request is repository-wide. - For a file covered by a path-specific rule, confirm that the relevant instruction file is included.
- If the file is absent, check its path, spelling, frontmatter and glob, then verify that the feature is enabled.
GitHub documents the VS Code custom-instructions feature as enabled by default, but a default setting is not proof that a particular response used your file. The References list is the practical check.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Copilot CLI verification
In Copilot CLI, run /instructions to view discovered instruction files and to enable or disable individual files. Use this command before troubleshooting a response that appears to ignore repository guidance. The CLI documentation describes discovery and combination of applicable files, but does not publish a general precedence order. Keep combined files free of conflicting directions rather than trying to predict an undocumented ranking.
Verification questions
- Was the request made in a repository context, rather than a detached chat with no workspace?
- Does the current Copilot feature support the file type you chose?
- Does the path-specific glob match the target file exactly?
- Is the instruction file committed and visible in the workspace or checkout used by Copilot?
- Are another instruction file or custom agent giving a contradictory rule?
Design instructions Copilot can apply
Describe decisions, not slogans
“Use the repository’s existing date utility and preserve UTC semantics” is actionable. “Handle dates correctly” is not. Name the preferred abstraction, location or command when that information is important.
State the validation loop
Tell Copilot what to run after an edit and what to do when a check fails. Include the narrowest useful test command for a subdirectory when one exists, plus the full validation command required before merging. Do not list commands that are obsolete or unavailable to contributors.
Explain boundaries and exceptions
Rules such as “never edit generated files” need an exception path: identify the source template or generation command. A layering rule should name the allowed boundary and the approved adapter. Explicit exceptions are more useful than absolute wording that leaves Copilot unable to complete a necessary task.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Keep sensitive material out
Do not place secrets, tokens, private keys or production credentials in instruction files. Repository instructions are shared project content and may be shown as context to Copilot. Refer to environment-variable names or documented secret-management procedures instead.
Best Value
- 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
- 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
- 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
- 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
- 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.
Use examples sparingly
A small representative example can clarify naming or test structure. Prefer references to existing files over large copied snippets, because copied examples become stale and consume context without adding a durable rule.
Common failure modes and fixes
Copilot ignores the global file
Check that the file is exactly .github/copilot-instructions.md at the repository root, that the request is running in repository context and that the target feature supports repository instructions. In VS Code, inspect References; in CLI, run /instructions.
A scoped rule never appears
Confirm that the file is in .github/instructions/, ends in .instructions.md, has valid frontmatter and uses an applyTo glob matching the target path. Test with a file that clearly matches, then inspect the loaded references.
Rules conflict across files
Remove duplicated guidance, move universal rules to the global file and keep exceptions in the narrowest supported file. Do not assume that a particular file wins in Copilot CLI, where the documentation does not define a general precedence order.
An AGENTS.md works in one place but not another
Compare the feature and client against GitHub’s support matrix. Agent instruction support is surface-specific. In the documented VS Code workflow, check whether the file is inside the workspace root and whether a nearer file applies.
The file is loaded but responses remain poor
Make the rule more concrete, remove stale or contradictory lines and ask a narrower question. Instructions expose context; they cannot compensate for missing source code, an ambiguous request or skipped validation. Review the generated diff and run the repository’s checks.
A maintainable rollout for a team
- Inventory conventions. Record the framework, package manager, test and validation commands, architecture boundaries and generated-file policy.
- Write the smallest useful baseline. Put stable rules in
.github/copilot-instructions.md. - Identify genuine differences. Add a path-specific file only when a directory or language needs distinct guidance.
- Check support. Compare every planned file type with the support matrix for the IDE, GitHub feature or CLI your team uses.
- Validate discovery. Use VS Code References or CLI
/instructionsto confirm loading. - Separate task templates. Move review checklists and other manually requested procedures into prompt files.
- Reserve agents for distinct workflows. Use custom agents only when a specialized role or handoff justifies the extra configuration.
- Review with code changes. Update instructions alongside framework, test, package-manager or architectural changes, and remove rules that no longer reflect the repository.
This rollout keeps automatic context focused while preserving a place for specialized, intentionally invoked work.
Quick Recap
Reference links
- Support for different types of custom instructions
- Adding repository custom instructions for GitHub Copilot in your IDE
- Adding custom instructions for GitHub Copilot CLI
- About customizing GitHub Copilot responses
- Copilot customization cheat sheet
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

