Skip to content
Back to skills

Context Map

ASecurity

Maps which files a change touches, their importers and shared dependencies, and groups them for safe parallel editing. Use when planning a refactor or a change across 5+ files, or partitioning files between agents.

  • 80 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added May 28, 2026
ai-agentsbashrefactoring

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned October 5, 2026

npx -y skills add monkilabs/opencastle --skill context-map --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Context Map?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Context Map
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/monkilabs-context-map/badge)](https://www.skillsdirectory.com/skills/monkilabs-context-map)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: context-map
description: "Maps which files a change touches, their importers and shared dependencies, and groups them for safe parallel editing. Use when planning a refactor or a change across 5+ files, or partitioning files between agents."
---

# Skill: Context Map

Generate **file impact map** before code changes to identify affected files, relationships, cascades — improves agent file partitions for parallel work.

## When to Use

| Use | Skip |
|-----|------|
| Feature implementation (Phase 1) | Isolated bug fixes ≤2 files |
| Refactoring (Phase 1 Scope) | |
| Schema changes cascading through queries/components | |
| Any task touching `libs/` | |

## Steps

### 1 — Entry Points
Identify files that MUST change from task description.

### 2 — Trace Outward (dependents)
Find consumers of entry-point exports:
```bash
rg -n "import .*from .*libs/auth"          # find importers
rg -n "\bAuthCard\b" --type ts             # find component consumers (ts covers .tsx)
rg -n "auth.*route|/auth"                  # find route references
```
If the assistant exposes a code-usage lookup (find-references), prefer it for
symbols: it resolves re-exports and aliases that a text search misses.

### 3 — Trace Inward (sources)
Find what entry points depend on:
```bash
rg -n "from .*libs/" src/auth/     # shared lib deps
rg -n "from .*config" src/auth/    # config deps
```

### 4 — Build the Map

Produce a compact map for Team Lead and downstream agents:

```markdown
Context Map — Feature: Add priceRange

- Entry points:
	- src/lib/place/schema.ts
	- src/components/PriceRangeFilter/PriceRangeFilter.tsx

- Dependents (trace outward):
	- src/pages/places/page.tsx
	- src/components/PlacesList/PlaceCard.tsx

- Sources (trace inward):
	- src/lib/filters.ts
	- src/shared/types/place.ts

- Unaffected (optional):
	- src/components/Account/**
```

Validation checkpoint: every search hit lands in the map; all listed files open without errors (typecheck via the **codebase-tool** slot). Full template, depth levels, partition derivation, Team Lead integration: see [REFERENCE.md](./REFERENCE.md).

## Anti-Patterns

- Skipping for "obvious" tasks — shared libs cascade unexpectedly
- Guessing dependencies instead of searching for them
- Over-mapping a 2-file fix
- Using a stale map after plan changes

Files in this skill

  • REFERENCE.md2.3 KB
  • SKILL.md2.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…