Skip to main content

ChatGPT/Copilot Prompt to Configure Copilot Workspace Agents

Set up GitHub Copilot workspace agents with custom instructions matching your team's codebase patterns, architecture, and standards.

Vul de plaatshouders in

Edit the values, then copy your finished prompt.

Jouw Prompt
prompt.txt

                                

What this prompt does

This prompt configures a GitHub Copilot workspace agent so suggestion quality improves across an entire team. You set the [project_type], and the AI creates a .github/copilot-instructions.md file defining your [conventions], describing your [architecture_description] so generated code lands in the right layer, listing [preferred_libs] to always suggest and [blocked_libs] to never suggest, adding language-specific rules for each of your [languages], setting a [test_pattern] with a [mock_approach] for external dependencies, encoding [db_rules], and enforcing your [error_pattern]. It also documents how teammates should update the instructions as conventions change.

The structure works because encoding architecture and conventions once removes a great deal of repetitive correction from code review. When Copilot knows your [architecture_description] — say, clean architecture with domain, application, and infrastructure layers — it generates code in the correct layer instead of wherever happens to be convenient. The [preferred_libs] and [blocked_libs] lists steer it away from packages you have deliberately retired and toward your approved choices, so suggestions stop reintroducing dependencies you removed. The per-language rules keep a mixed-language repo coherent, and the [test_pattern] with a specific [mock_approach] makes generated tests consistent rather than each developer's Copilot inventing its own style. Documenting the update process inside the file is what keeps the whole thing current.

When to use it

  • A team uses Copilot and you want consistent, on-convention suggestions across everyone
  • You want generated code to land in the correct architectural layer automatically, without manual moving
  • You keep correcting library choices and want [preferred_libs] and [blocked_libs] enforced in suggestions
  • Your project spans multiple [languages], each needing its own formatting and naming rules
  • You want generated tests to follow a [test_pattern] with a consistent [mock_approach]
  • You need database and error-handling conventions encoded once so they stop drifting across the team

Example output

You get a .github/copilot-instructions.md file: project [conventions], an architecture section keyed to [architecture_description], preferred and blocked library lists, per-language rules for your [languages], testing instructions using [test_pattern] and [mock_approach], database rules from [db_rules], error-handling rules from [error_pattern], and guidance on how the team updates the file as conventions evolve.

Pro tips

  • Describe [architecture_description] concretely with named layers so Copilot places generated code correctly
  • Keep [blocked_libs] explicit (for example, moment.js or axios) so the agent stops suggesting retired packages
  • Write per-language rules for each of your [languages]; a mixed-language repo needs separate guidance per language
  • Make [mock_approach] specific (interface mocks via dependency injection, no monkey-patching) so generated tests stay consistent
  • Document the update process inside the file itself so the conventions stay current as the team and stack evolve
  • Version-control copilot-instructions.md and review changes to it like any other shared team standard

Frequently Asked Questions

What is the .github/copilot-instructions.md file?
It is a configuration file that tells GitHub Copilot about your project's conventions, architecture, preferred libraries, and patterns. Once in place, Copilot uses it to generate suggestions that match your standards across the whole team, reducing repetitive correction in code review.
How does it get code into the right architectural layer?
By describing your `[architecture_description]` — for example, clean architecture with domain, application, and infrastructure layers — Copilot understands where new code belongs. The more concretely you name the layers, the more reliably it places generated code correctly instead of wherever is convenient.
Can it stop Copilot from suggesting libraries we have dropped?
Yes, through the `[blocked_libs]` list paired with `[preferred_libs]`. Listing retired packages explicitly steers Copilot away from them and toward your approved choices. It is guidance rather than hard enforcement, so it reduces unwanted suggestions without guaranteeing they never appear.
How do we keep the instructions current?
Document the update process inside the file and version-control it like any shared standard. When your `[conventions]`, `[preferred_libs]`, or `[architecture_description]` change, update the file through your normal review flow so Copilot's behavior tracks your real, current standards.
Engr Mejba Ahmed

Need this built for real?

Engr Mejba Ahmed

AI Developer · Software Engineer

I'm Mejba — I design and ship production AI systems, automations, and full-stack apps. If you want this turned into a working solution for your team, let's talk.

Meer in GitHub Copilot Prompts

Engr Mejba Ahmed

Engr Mejba Ahmed

Claude Code Expert · Online

👋

Hey there!

Quick Actions

WhatsApp Instant reply

Chat on WhatsApp

+880 1723 741224 · Instant reply

Popular Questions

Engr Mejba Ahmed is connected
Engr Mejba Ahmed is typing...
Engr Mejba Ahmed avatar

✉ Want me to follow up? Drop your email

Engr Mejba Ahmed avatar

📞 Connect Directly

Choose how you'd like to reach me

WhatsApp

+880 1723 741224

Email

[email protected]

✓ Details sent! I'll get back to you shortly.

Powered by OpenAI

335+

Blog Posts

25

AI Courses

63

Projects

Services & Expertise

Pricing & Process

Learning & Resources

Connect & Support