context-map — GitHub Copilot skill: map files before you edit
This skill makes the agent map every file, test and dependency tied to a task before it touches code. Handy on a codebase you don't know yet.
npx skills add github/awesome-copilot --skill context-mapWhat context-map does
The skill sets an order of work: search the codebase for files related to the task, trace direct dependencies through imports and exports, find the tests that cover the affected functionality, and collect similar patterns worth copying. Output is markdown tables — files to modify, dependencies, test files, reference patterns — plus a risk checklist covering public API breaks, database migrations and config changes.
There is one SKILL.md file with the instructions and the output template. No scripts, no external services, no API keys. It ships for GitHub Copilot and installs into Claude, Codex, Cursor, Gemini CLI and Windsurf through the skills installer.
The rule is explicit: don't start implementing until the map has been reviewed. That pays off in large repos where an agent happily edits the wrong module. For a one-line fix in a single file the map is just overhead — skip it.
What it helps with
- find every file a change will touch
- trace direct dependencies of the module you edit
- pick the tests that cover the affected code
- find an existing pattern to follow for new code
- flag risk to public API and migrations
Example prompts for the agent
- build a context map for this task: add pagination to the orders list
- before changing anything, show me the files and tests this task touches
- which dependencies and tests does the auth module refactor affect?
How to install context-map
1Skills CLI (Vercel)
npx skills add github/awesome-copilot --skill context-map2GitHub CLI
gh skill install github/awesome-copilot context-map3Manually: put the files in place
.github/skills/context-map/SKILL.md1Skills CLI (Vercel)
npx skills add github/awesome-copilot --skill context-map -a claude-code2Manually: put the files in place
~/.claude/skills/context-map/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/context-map/
Manually: put the files in place
.agents/skills/context-map/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/context-map/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
Platform CLI
gemini skills install https://github.com/github/awesome-copilot --path skills/context-mapManually: put the files in place
.devin/skills/context-map/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set554
The whole set →Similar
Questions about context-map
How do I install context-map in GitHub Copilot?
Run npx skills add github/awesome-copilot --skill context-map or gh skill install github/awesome-copilot context-map. The file lands at .github/skills/context-map/SKILL.md.
What does context-map do?
Before any edits it searches for task-related files, dependencies, tests and similar patterns, then returns a markdown map with a risk assessment section.
Does it work with Claude or Cursor?
Yes. The installer targets several agents: npx skills add github/awesome-copilot --skill context-map -a claude-code. For Cursor the file goes to .cursor/skills/context-map/SKILL.md.
Source text
SKILL.md · MIT
---
name: context-map
description: 'Generate a map of all files relevant to a task before making changes'
---
# Context Map
Before implementing any changes, analyze the codebase and create a context map.
## Task
{{task_description}}
## Instructions
1. Search the codebase for files related to this task
2. Identify direct dependencies (imports/exports)
3. Find related tests
4. Look for similar patterns in existing code
## Output Format
```markdown
## Context Map
### Files to Modify
| File | Purpose | Changes Needed |
|------|---------|----------------|
| path/to/file | description | what changes |
### Dependencies (may need updates)
| File | Relationship |
|------|--------------|
| path/to/dep | imports X from modified file |
### Test Files
| Test | Coverage |
|------|----------|
| path/to/test | tests affected functionality |
### Reference Patterns
| File | Pattern |
|------|---------|
| path/to/similar | example to follow |
### Risk Assessment
- [ ] Breaking changes to public API
- [ ] Database migrations needed
- [ ] Configuration changes required
```
Do not proceed with implementation until this map is reviewed.
© github · MIT · github/awesome-copilot