Example prompts for GitHub Copilot Chat
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 16 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 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 codeAdvancedImproving code readability and maintainability
Copilot Chat can suggest ways to make your code easier to understand and maintain.Refactoring codeSimpleDecoupling 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 codeAdvancedFixing lint errors
Copilot Chat can suggest ways to fix issues identified by a code linter.Refactoring codeIntermediateRefactoring to implement a design pattern
Copilot Chat can suggest design patterns that you can use to improve your code.Refactoring codeIntermediateRefactoring for performance optimization
Copilot Chat can suggest ways to speed up slow-running code.Refactoring codeSimpleExplaining 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.Security analysisIntermediate