Get the FREE Ultimate OpenClaw Setup Guide →

context-map

Scanned
npx machina-cli add skill github/awesome-copilot/context-map --openclaw
Files (1)
SKILL.md
1.1 KB

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.

Source

git clone https://github.com/github/awesome-copilot/blob/main/plugins/context-engineering/skills/context-map/SKILL.mdView on GitHub

Overview

Context-map analyzes the codebase to produce a map of all files, dependencies, tests, and patterns relevant to a task before making changes. It helps you understand scope and risk, ensuring safer, more informed edits.

How This Skill Works

By crawling the repository, it identifies files related to the task, extracts direct dependencies via imports/exports, locates related tests, and surfaces existing patterns. The resulting map can be reviewed to guide implementation and minimize ripple effects.

When to Use It

  • Starting a new feature with unclear boundaries
  • Planning a refactor with potential ripple effects
  • Preparing a breaking change to a public API
  • Migrating dependencies or reorganizing modules
  • Onboarding a new engineer to a codebase

Quick Start

  1. Step 1: Search the codebase for files related to the task
  2. Step 2: Identify direct dependencies (imports/exports) and related tests
  3. Step 3: Review the context map, then implement changes with awareness of dependencies

Best Practices

  • Clarify task scope before mapping
  • Search broadly for related files and entry points
  • Capture dependencies, tests, and similar patterns in one view
  • Review the map with teammates before changes
  • Update the map as work progresses and decisions change

Example Use Cases

  • Adding a feature in a React app by mapping components and tests first
  • Refactoring a Python service after mapping imports and tests
  • Updating a Node.js API and assessing impacted routes and tests
  • Migrating a monolith module by listing affected files and patterns
  • Onboarding a new engineer with a published context map for a task

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers