关于 context-map
这是一个面向编码 Agent 的技能,要求 Agent 在实现前梳理相关代码、依赖、测试和现有模式。它规定先提交上下文图供审阅,再继续开发。
主要功能
- 01查找任务相关文件
- 02追踪直接依赖
- 03查找相关测试
- 04识别现有代码模式
- 05要求实现前审阅
适用场景
- 01修改前了解代码库
- 02识别任务影响的测试
- 03实现前检查依赖
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ github/ awesome-copilot --skill context-map安装后在 Claude Code 中输入/context-map确认已加载。
详细介绍
上下文映射
在实施任何更改之前,先分析代码库并创建上下文映射。
任务
{{task_description}}
说明
- 在代码库中搜索与此任务相关的文件
- 识别直接依赖项(导入/导出)
- 查找相关测试
- 在现有代码中寻找相似模式
输出格式
## 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
在此映射经过审查之前,请勿继续实施。
评论
支持 Markdown