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 31 examples
- Creating templatesCopilot Chat can help you create templates to streamline your workflow and ensure consistency across your projects.- Communicate effectively
- Author and optimize with Copilot
- Simple
 
- Extracting informationCopilot Chat in GitHub can help you extract key information from issues and discussions.- Communicate effectively
- Author and optimize with Copilot
- Simple
 
- Synthesizing researchCopilot Chat can help you synthesize research findings and insights from multiple sources into a cohesive summary.- Communicate effectively
- Author and optimize with Copilot
- Simple
 
- Creating diagramsGitHub Copilot Chat can help you create diagrams to better understand your data and communicate insights.- Communicate effectively
- Visualize data
- Simple
 
- Generating tablesCopilot Chat can help you create tables to organize information and present it clearly.- Communicate effectively
- Author and optimize with Copilot
- Simple
 
- Debugging invalid JSONCopilot Chat can identify and resolve syntax errors or structural issues in JSON data.- Debugging code
- Author and optimize with Copilot
- Intermediate
 
- Handling API rate limitsCopilot Chat can help handle API rate limits by suggesting code that detects implements retry logic.- Debugging code
- Author and optimize with Copilot
- Intermediate
 
- Exploring potential feature implementationsCopilot Chat can help explore different approaches for implementing a single feature.- Functionality analysis
- Author and optimize with Copilot
- Intermediate
 
- Analyzing and incorporating user feedbackCopilot Chat can enhance the process of incorporating user feedback into your project.- Functionality analysis
- Author and optimize with Copilot
- Intermediate
 
- Improving code readability and maintainabilityCopilot Chat can suggest ways to make your code easier to understand and maintain.- Refactoring code
- Author and optimize with Copilot
- Simple
 
- Fixing lint errorsCopilot Chat can suggest ways to fix issues identified by a code linter.- Refactoring code
- Author and optimize with Copilot
- Intermediate
 
- Refactoring for performance optimizationCopilot Chat can suggest ways to speed up slow-running code.- Refactoring code
- Author and optimize with Copilot
- Simple
 
- Refactoring to implement a design patternCopilot Chat can suggest design patterns that you can use to improve your code.- Refactoring code
- Author and optimize with Copilot
- Intermediate
 
- Refactoring data access layersCopilot Chat can suggest ways to decouple your data access code from your business logic, making an application easier to maintain and scale.- Refactoring code
- Author and optimize with Copilot
- Advanced
 
- Decoupling business logic from UI componentsCopilot Chat can help you separate your business logic from your user interface code, making it easier to maintain and scale your application.- Refactoring code
- Author and optimize with Copilot
- Advanced
 
- Handling cross-cutting concernsCopilot 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
- Author and optimize with Copilot
- Intermediate
 
- Simplifying complex inheritance hierarchiesCopilot Chat can help you to refactor code to avoid classes with multiple layers of inheritance.- Refactoring code
- Author and optimize with Copilot
- Intermediate
 
- Fixing database deadlocks or data integrity issuesCopilot Chat can help you avoid code that causes slow or blocked database operations, or tables with missing or incorrect data.- Refactoring code
- Author and optimize with Copilot
- Advanced
 
- Translating code to a different programming languageCopilot Chat can help you rewrite code to perform the same operations but in a different programming language.- Refactoring code
- Author and optimize with Copilot
- Simple
 
- Creating issuesCopilot Chat can help you quickly create issues without filling out every field manually.- Documenting code
- Author and optimize with Copilot
- Simple
 
- Documenting legacy codeCopilot Chat can help with documenting legacy code.- Documenting code
- Author and optimize with Copilot
- Simple
 
- Explaining legacy codeCopilot Chat can help with explaining unfamiliar code.- Documenting code
- Author and optimize with Copilot
- Simple
 
- Explaining complex algorithms or logicCopilot Chat can help add clear and concise documentation on complex algorithms or logic.- Documenting code
- Author and optimize with Copilot
- Intermediate
 
- Syncing documentation with code changesCopilot Chat can help with keeping code documentation up-to-date.- Documenting code
- Author and optimize with Copilot
- Intermediate
 
- Writing discussions or blog postsCopilot Chat can help you generate ideas, outline, or draft discussions or blog posts.- Documenting code
- Author and optimize with Copilot
- Simple
 
- Generating unit testsCopilot Chat can help with generating unit tests for a function.- Testing code
- Author and optimize with Copilot
- Intermediate
 
- Creating mock objects to abstract layersCopilot Chat can help with creating mock objects that you can use for unit tests.- Testing code
- Author and optimize with Copilot
- Intermediate
 
- Creating end-to-end tests for a webpageCopilot Chat can help with generating end-to-end tests.- Testing code
- Author and optimize with Copilot
- Advanced
 
- Securing your repositoryCopilot Chat can help you to secure your repository and your code.- Security analysis
- Author and optimize with Copilot
- Simple
 
- Managing dependency updatesCopilot Chat can help you get set up with Dependabot to streamline dependency updates.- Security analysis
- Author and optimize with Copilot
- Simple
 
- Finding existing vulnerabilities in codeCopilot Chat can help find common vulnerabilities in your code and suggest fixes.- Security analysis
- Author and optimize with Copilot
- Intermediate