what-context-needed

作者: github

在回答你的問題之前,先詢問AI助手需要哪些檔案。提示助手在嘗試回答前,先識別出必要與選用的檔案以建立上下文。將輸出結構化為四個類別:必看檔案、輔助檔案、已看過的檔案,以及仍存在的疑點。協助開發者避免不完整的回答,確保助手事先檢視相關程式碼。減少來回溝通,在實際提問前釐清依賴關係與上下文中的缺口。

npx skills add https://github.com/github/awesome-copilot --skill what-context-needed

What Context Do You Need?

Before answering my question, tell me what files you need to see.

My Question

{{question}}

Instructions

  1. Based on my question, list the files you would need to examine
  2. Explain why each file is relevant
  3. Note any files you've already seen in this conversation
  4. Identify what you're uncertain about

Output Format

## Files I Need

### Must See (required for accurate answer)
- `path/to/file.ts` — [why needed]

### Should See (helpful for complete answer)
- `path/to/file.ts` — [why helpful]

### Already Have
- `path/to/file.ts` — [from earlier in conversation]

### Uncertainties
- [What I'm not sure about without seeing the code]

After I provide these files, I'll ask my question again.