GitHub Copilot Chat Cookbook
Find examples of prompts to use with GitHub Copilot Chat.
Spotlight


Improving code readability and maintainability
Copilot Chat can suggest ways to make your code easier to understand and maintain.

Debugging invalid JSON
Copilot Chat can identify and resolve syntax errors or structural issues in JSON data.
Explore 27 prompt articles
Creating diagrams
GitHub Copilot Chat can help you create diagrams to better understand your data and communicate insights.- Simple
Extracting information
Copilot Chat in GitHub can help you extract key information from issues and discussions.- Simple
Debugging invalid JSON
Copilot Chat can identify and resolve syntax errors or structural issues in JSON data.- Debugging code
- Intermediate
Handling API rate limits
Copilot Chat can help handle API rate limits by suggesting code that detects implements retry logic.- Debugging code
- Intermediate
Exploring potential feature implementations
Copilot Chat can help explore different approaches for implementing a single feature.- Functionality analysis
- Intermediate
Analyzing and incorporating user feedback
Copilot Chat can enhance the process of incorporating user feedback into your project.- Functionality analysis
- Intermediate
Improving code readability and maintainability
Copilot Chat can suggest ways to make your code easier to understand and maintain.- Refactoring code
- Simple
Fixing lint errors
Copilot Chat can suggest ways to fix issues identified by a code linter.- Refactoring code
- Intermediate
Refactoring for performance optimization
Copilot Chat can suggest ways to speed up slow-running code.- Refactoring code
- Simple
Refactoring to implement a design pattern
Copilot Chat can suggest design patterns that you can use to improve your code.- Refactoring code
- Intermediate
Refactoring 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 code
- Advanced
Decoupling 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 code
- Advanced
Handling 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 code
- Intermediate
Simplifying complex inheritance hierarchies
Copilot Chat can help you to refactor code to avoid classes with multiple layers of inheritance.- Refactoring code
- Intermediate
Fixing 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 code
- Advanced
Translating code to a different programming language
Copilot Chat can help you rewrite code to perform the same operations but in a different programming language.- Refactoring code
- Simple
Explaining complex algorithms or logic
Copilot Chat can help add clear and concise documentation on complex algorithms or logic.- Documenting code
- Intermediate
Syncing documentation with code changes
Copilot Chat can help with keeping code documentation up-to-date.- Documenting code
- Intermediate
Writing discussions or blog posts
Copilot Chat can help you generate ideas, outline, or draft discussions or blog posts.- Documenting code
- Simple
Generating unit tests
Copilot Chat can help with generating unit tests for a function.- Testing code
- Intermediate
Creating mock objects to abstract layers
Copilot Chat can help with creating mock objects that you can use for unit tests.- Testing code
- Intermediate
Creating end-to-end tests for a webpage
Copilot Chat can help with generating end-to-end tests.- Testing code
- Advanced
Securing your repository
Copilot Chat can help you to secure your repository and your code.- Security analysis
- Simple
Managing dependency updates
Copilot Chat can help you get set up with Dependabot to streamline dependency updates.- Security analysis
- Simple
Finding existing vulnerabilities in code
Copilot Chat can help find common vulnerabilities in your code and suggest fixes.- Security analysis
- Intermediate