Custom Copilot agents: accelerating development through shared knowledge

As our .NET projects continued to grow, we noticed a recurring challenge across the team. Developers were spending significant time writing similar test scaffolding, searching for the right Copilot prompts, and ensuring that generated code followed our established conventions. While GitHub Copilot was already helping us move faster, the quality and consistency of the output often depended on how well each developer knew the project's standards and how effectively they could craft prompts.

Software Developer

Simona Ciuhan

To address this, we started exploring how we could extend Copilot with team-specific knowledge and practices. The result was two custom GitHub Copilot agents that are now part of our repository: TestAgent and CodePromptHelper.

Because both agents live alongside the codebase, every developer has access to the same guidance, conventions, and best practices. This helps us reduce onboarding effort, eliminate inconsistencies, and spend more time focusing on solving business problems rather than repeating routine work.

What can it do?

  • Scaffold unit tests using FakeItEasy fakes and the team's naming convention: {Action}_When_{Condition}_Should_{ExpectedBehavior}
  • Scaffold integration tests
  • Apply team standards automatically
  • Generate tests that are consistent regardless of who invokes the agent

Developers simply select TestAgent in GitHub Copilot Chat and ask:

  • "Write unit tests for GetMessagesByFilterSpec"
  • "Scaffold integration tests for the Messages controller"

The result is faster test creation, greater consistency across projects, and less time spent reviewing style and structure during code reviews.

CodePromptHelper

As AI-assisted development became part of our daily workflow, another challenge emerged: different developers were achieving different results with Copilot because they used different prompts.

Over time, the team discovered effective prompting patterns for common development scenarios, but that knowledge remained scattered across individuals. We wanted a way to make those proven prompts available to everyone.

Stored in the CodePromptHelper.agent.md file, this custom agent acts as a centralized library of Copilot prompts tailored to our architecture, technology stack, and development practices.

What can it do?

  • Provide ready-to-use prompts for common development tasks
  • Automatically include team conventions, naming standards, and architectural patterns
  • Adapt prompts for specific scenarios, features, return types, or routes
  • Serve as a living, collaborative knowledge base that evolves through pull requests
  • Reduce code drift by ensuring Copilot-generated code aligns with existing project standards

Instead of reinventing prompts for every task, developers can leverage a shared collection of proven instructions that consistently produce better results.

Impact on the Team

Together, TestAgent and CodePromptHelper help transform individual knowledge into shared team capabilities.

The agents:

  • Improve consistency of generated code and tests
  • Accelerate onboarding for new team members
  • Promote adoption of team standards
  • Enable developers to focus more on business value and less on boilerplate implementation

Most importantly, they ensure that the benefits of AI-assisted development are not limited to individual experience levels but are available to the entire team.

What's Next?

As the team continues to explore AI-assisted development, both agents will evolve alongside our codebase and practices. New prompts, testing patterns, and development scenarios can be added through pull requests, allowing the knowledge captured in these agents to grow continuously.