what-context-needed
github/awesome-copilot
Get Copilot to ask for the right files before it answers your question.
What is what-context-needed?
A prompt template that makes Copilot pause and list which files it needs to see before answering a question, rather than answering with potentially incomplete context. Useful for reducing inaccurate or guessed answers in large codebases.
- Takes a user-supplied question as input
- Prompts Copilot to list required and helpful files before answering
- Separates files into 'Must See', 'Should See', and 'Already Have' categories with reasons
- Surfaces uncertainties Copilot has without seeing the code
- Waits for the user to supply files before the question is answered
How to install what-context-needed
npx skills add https://github.com/github/awesome-copilot --skill what-context-needed- GitHub Copilot or compatible coding agent set up in the environment
How to use what-context-needed
- 1.Invoke the what-context-needed skill and supply your question in place of {{question}}
- 2.Review the markdown output listing 'Must See', 'Should See', 'Already Have', and 'Uncertainties' files
- 3.Open or paste the contents of the 'Must See' (and optionally 'Should See') files into the conversation
- 4.Re-ask your original question now that Copilot has the relevant context
Use cases
- Asking a question about an unfamiliar codebase and wanting to ensure Copilot has full context first
- Avoiding inaccurate answers caused by Copilot guessing without seeing relevant files
- Debugging a multi-file issue where it's unclear which files are relevant
- Onboarding to a new repo and wanting Copilot to surface relevant files for a feature area
- Developers using Copilot in large or unfamiliar codebases
- Engineers wanting more accurate, context-aware answers from an AI coding assistant
- Teams that want to reduce hallucinated or guessed responses from Copilot
what-context-needed FAQ
It instructs Copilot to first list which files it needs to examine before answering your question, instead of guessing or answering with incomplete context.
No, it only generates a list of needed files with explanations. You still need to manually provide those files to Copilot.
A markdown breakdown with sections for 'Must See', 'Should See', 'Already Have', and 'Uncertainties' files.
Use it when you suspect Copilot lacks enough codebase context to answer accurately, such as in large or unfamiliar repositories.
Full instructions (SKILL.md)
Source of truth, from github/awesome-copilot.
name: what-context-needed description: 'Ask Copilot what files it needs to see before answering a question'
What Context Do You Need?
Before answering my question, tell me what files you need to see.
My Question
{{question}}
Instructions
- Based on my question, list the files you would need to examine
- Explain why each file is relevant
- Note any files you've already seen in this conversation
- 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.
Related skills
More from github/awesome-copilot and the wider catalog.
git-commit
Execute semantic git commits with conventional message analysis and intelligent staging.
excalidraw-diagram-generator
Generate Excalidraw diagrams from natural language descriptions.
documentation-writer
Create structured technical documentation using the Diátaxis framework for tutorials, how-to guides, references, and explanations.
gh-cli
GitHub CLI comprehensive reference for repositories, issues, PRs, Actions, projects, releases, and all GitHub operations from the command line.
prd
Generate comprehensive Product Requirements Documents with executive summaries, user stories, technical specs, and risk analysis.
refactor
Surgical code refactoring to improve maintainability without changing behavior.