Context Map Before Code Changes

VerifiedSafe

Analyzes the codebase and generates a map of relevant files, dependencies, tests, and risks before making any changes.

Sby Skills Guide Bot
DevelopmentBeginner
3010/18/2026
Claude CodeCursorWindsurfCopilotCodex
#codebase-analysis#dependency-analysis#planning#context-engineering#risk-assessment

Recommended for

Our review

Before any code change, this skill has the agent explore the repository and produce a structured map of files to modify, their dependencies, affected tests, and reference patterns.

Strengths

  • Enforces an explicit analysis pass before any code is written, reducing mis-targeted edits
  • The markdown table output (files, dependencies, tests, patterns) is human-readable and reusable in a review
  • The Risk Assessment section pushes the agent to flag public API breaks, database migrations, and configuration changes
  • The format is generic and independent of the project's language or framework

Limitations

  • Ships no scripts or tooling: everything relies on the agent's own search ability, so map quality varies with the model
  • No stopping strategy is defined for very large repositories, where exploration can be slow or incomplete
  • The resulting map is not automatically verified and may miss dynamic dependencies or generated files
When to use it

Use it at the start of a refactoring or feature-addition task in an existing codebase the agent does not yet know well.

When not to use it

Skip it for a trivial, tightly scoped fix, or when the project context is already fully loaded in the conversation.

Security analysis

Safe
Quality score84/100

The skill only provides instructions for analyzing a codebase and generating a documentation artifact. It does not declare or invoke any tools, execute commands, access network resources, or manipulate files. There is no destructive, exfiltrating, or obfuscated behavior.

No concerns found

Examples

Refactor an auth module
/context-map Add rate limiting to the login flow — map out which files, dependencies, and tests are involved before you change anything.
Plan a schema change
Use the context-map skill for this task: rename the `users.fullname` column to `display_name` across the API. Show me the files to modify, dependents, and whether migrations are needed.
Onboard to unfamiliar repo
/context-map I need to add CSV export to the reports page. I'm new to this repo — first give me the context map with reference patterns, then wait for my go-ahead.

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

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

Related skills