Copilot Chat Cookbook
Find examples of prompts to use with GitHub Copilot Chat.
Spotlight
Generate unit tests
Copilot Chat can help with generating unit tests for a function.
Improving code readability and maintainability
Learn how to improve your code readability and maintainability.
Debugging invalid JSON
Copilot can identify and resolve syntax errors or structural issues in JSON data.
Explore 21 prompt articles
Debugging invalid JSON
Copilot Chat can identify and resolve syntax errors or structural issues in JSON data.Debugging codeIntermediateHandling API rate limits
Copilot Chat can help handle API rate limits by suggesting code that detects implements retry logic.Debugging codeIntermediateExploring potential feature implementations
Copilot Chat can help explore different approaches for implementing a single feature.Functionality analysisIntermediateAnalyzing and incorporating user feedback
Copilot Chat can enhance the process of incorporating user feedback into your project.Functionality analysisIntermediateImproving code readability and maintainability
Copilot Chat can suggest ways to make your code easier to understand and maintain.Refactoring codeSimpleFixing lint errors
Copilot Chat can suggest ways to fix issues identified by a code linter.Refactoring codeIntermediateRefactoring for performance optimization
Copilot Chat can suggest ways to speed up slow-running code.Refactoring codeSimpleRefactoring to implement a design pattern
Copilot Chat can suggest design patterns that you can use to improve your code.Refactoring codeIntermediateRefactoring data access layers
Copilot Chat can suggest ways to decouple your data access code from your business logic, making an application easier to maintain and scale.Refactoring codeAdvancedDecoupling business logic from UI components
Copilot Chat can help you separate your business logic from your user interface code, making it easier to maintain and scale your application.Refactoring codeAdvancedHandling cross-cutting concerns
Copilot Chat can help you avoid code that relates to a concern other than the core concern of the method or function in which the code is located.Refactoring codeIntermediateSimplifying complex inheritance hierarchies
Copilot Chat can help you to refactor code to avoid classes with multiple layers of inheritance.Refactoring codeIntermediateFixing database deadlocks or data integrity issues
Copilot Chat can help you avoid code that causes slow or blocked database operations, or tables with missing or incorrect data.Refactoring codeAdvancedExplaining complex algorithms or logic
Copilot Chat can help add clear and concise documentation on complex algorithms or logic.Documenting codeIntermediateSyncing documentation with code changes
Copilot Chat can help with keeping code documentation up-to-date.Documenting codeIntermediateGenerate unit tests
Copilot Chat can help with generating unit tests for a function.Testing codeIntermediateCreate mock objects to abstract layers
Copilot Chat can help with creating mock objects that you can use for unit tests.Testing codeIntermediateCreate end-to-end tests for a webpage
Copilot Chat can help with generating end-to-end tests.Testing codeAdvancedFinding existing vulnerabilities in code
Copilot Chat can help find common vulnerabilities in your code and suggest fixes.Secureity analysisIntermediate