You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🚀Congratulations! Now you understand the power behind Agent Mode and the many tasks that it can help with. Scroll down to the next section that will show you how to add context and customization to Copilot.
242
243
243
-
Agent Mode was able to perform C# specific tasks:
244
-
- ✅ Moving from inline route handlers to controller-based architecture
245
-
- ✅ Adding proper model validation
246
-
- ✅ Implementing comprehensive error handling
247
-
- ✅ Setting up dependency injection for better testability
248
-
- ✅ Creating an organized project structure
244
+
Agent Mode was able to perform Python specific tasks:
245
+
- ✅ Resolved code structure issues
246
+
- ✅ Improvements to the API design
247
+
- ✅ Created tests and documentation
248
+
- ✅ Created a deployment ready application
249
+
- ✅ Improved performance and provided security enhancements
249
250
250
251
### 🗒️ Section 4: Customization and Context
251
252
@@ -257,8 +258,8 @@ Agent Mode was able to perform C# specific tasks:
257
258
258
259
GitHub Copilot instructions files are markdown documents that provide essential context to guide Copilot’s behavior within a specific codebase. These files help tailor AI-generated suggestions to match your team’s coding standards, architectural patterns, naming conventions, testing strategies, and deployment practices. There are two types of instructions files: global instructions, which apply to the entire repository and are stored in `copilot-instructions.md`, and scoped instructions, which apply only to specific files or folders and are placed in `.github/instructions/*instructions.md`.
259
260
260
-
By supplying Copilot with detailed project context, instructions files significantly improve the relevance and accuracy of its code suggestions. For example, if your project uses Blazor and ASP.NET Core, Copilot can generate components that follow your preferred structure, use modern C# features, and adhere to your naming conventions. This leads to more consistent code and reduces the need for manual corrections or lengthy code reviews.
261
-
Instructions files also enhance Copilot’s ability to generate meaningful tests and documentation. With the right context, Copilot can suggest unit tests using xUnit, integration tests with TestServer, and even add XML comments or OpenAPI annotations to your APIs. When refactoring or adding new features, Copilot respects your dependency injection setup, configuration patterns, and error-handling strategies, making it a smarter and more reliable assistant.
261
+
By supplying Copilot with detailed project context, instructions files significantly improve the relevance and accuracy of its code suggestions. For example, if your project uses Blazor and ASP.NET Core, Copilot can generate components that follow your preferred structure, use modern Python features, and adhere to your naming conventions. This leads to more consistent code and reduces the need for manual corrections or lengthy code reviews. Instructions files also enhance Copilot’s ability to generate meaningful tests and documentation. With the right context, Copilot can suggest unit tests using unittest or pytest, integration tests with tools like requests or httpx, and even add docstrings or OpenAPI annotations to your FastAPI or Flask endpoints. When refactoring or adding new features, Copilot respects your dependency injection setup, configuration patterns, and error-handling strategies, making it a smarter and more reliable assistant.
262
+
262
263
263
264
Beyond technical benefits, instructions files improve collaboration across teams. New contributors can rely on Copilot to guide them through unfamiliar codebases, ensuring they follow established practices without needing extensive onboarding. This makes instructions files a powerful tool for maintaining code quality, streamlining development workflows, and fostering team alignment.
264
265
@@ -272,7 +273,7 @@ Let's create our first global custom instructions file!
The example below can be customized in your own project, for this example we've created an instructions file specific to our C# requirements in this project.
276
+
The example below can be customized in your own project, for this example we've created an instructions file specific to our Python requirements in this project.
0 commit comments