context-map

作者: github

分析程式碼庫並在實施變更前繪製任務相關檔案。自動搜尋相關檔案、依賴關係、測試及相似程式碼模式以建立完整上下文。生成結構化Markdown輸出,包含需修改的檔案、依賴關係、測試覆蓋率及參考模式。包含中斷性變更、遷移與配置更新的風險評估檢查清單。設計為實施前步驟,以防止遺漏依賴關係及非預期副作用...

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

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

## 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.