# Getting started with prompts for Copilot Chat on GitHub

> Explore example prompts to ask Copilot Chat about code, repositories, pull requests, and more.

- 网址：https://funcoding.ai/agents/github-copilot/how-tos/copilot-on-github/chat-with-copilot/get-started-with-chat/
- 来源：GitHub Copilot 官方文档原文（英文），CC-BY-4.0 许可，同步于 2026-10-11
- 官方原文：https://docs.github.com/en/copilot/how-tos/copilot-on-github/chat-with-copilot/get-started-with-chat

---
<a href="https://github.com/copilot?ref_product=copilot&ref_type=engagement&ref_style=button" target="_blank" class="btn btn-primary mt-3 mr-3 mb-3 no-underline">
    <span>Chat with Copilot on GitHub</span> 
</a>

Copilot Chat responds differently depending on where you are on GitHub. The following examples show the kinds of questions you can ask in each context.

## General software questions

* 

```text
tell me about nodejs web server frameworks
```

* 

```text
how can I create an Express app
```

* 

```text
what is the best way to update an npm package
```

## Repository questions

Navigate to a repository to ask about its purpose, structure, code, or history. Copilot Chat grounds its answers in the actual files and symbols in the repository, so you can get a high-level overview and then ask follow-up questions within the same context.

* 

```text
What is the main purpose of this repo?
```

* 

```text
Give me an overview of how this project is structured.
```

* 

```text
How do I set up and run this project locally?
```

* 

```text
Where is rate limiting implemented in our API?
```

* 

```text
What was the last merged PR by USERNAME
```

## File and code questions

Open a file or select specific lines, then ask about them.

* 

```text
Explain this file.
```

* 

```text
How could I improve this code?
```

* 

```text
Write a unit test for this method.
```

## Pull request questions

Navigate to a pull request to ask about changes, reviews, or failing workflows.

* 

```text
Summarize the changes in this PR.
```

* 

```text
What's the purpose of this file?
```

* 

```text
Tell me why this job failed
```

* 

```text
What did Copilot change in this PR and why?
```

* 

```text
What did Copilot validate before opening this PR?
```

## Debugging questions

Navigate to a failed workflow run, a pull request with a failing check, or paste a stack trace to get help diagnosing and fixing the problem.

* 

```text
Why did this workflow run fail?
```

* 

```text
Explain this stack trace and suggest a fix.
```

* 

```text
Which change in this PR most likely caused the failing test?
```

## Security alert questions

Navigate to a code scanning, secret scanning, or Dependabot alert to ask about it.

* 

```text
How would I fix this alert?
```

* 

```text
Which line of code is this alert referencing?
```

## Issue, discussion, and commit questions

Navigate to any issue, discussion, or commit and ask Copilot Chat about it.

* 

```text
What is the purpose of this issue?
```

* 

```text
What is the expected output of this commit?
```
