Skip to main content
ClaudeWave
Skill58 repo starsupdated 2mo ago

context-map

Maps file dependencies, flags shared imports, groups files for safe parallel editing before code changes. Use when planning a refactoring, analyzing change impact, or understanding which files a modification will affect.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/monkilabs/opencastle /tmp/context-map && cp -r /tmp/context-map/src/orchestrator/skills/context-map ~/.claude/skills/context-map
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# 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:
```
grep_search("import.*from.*places", isRegexp=true)   # find importers
vscode_listCodeUsages("PlaceCard")                     # find component consumers
grep_search("places.*route|/places", isRegexp=true)    # find route references
```

### 3 — Trace Inward (sources)
Find what entry points depend on:
```
grep_search("from.*libs/", includePattern="src/places/**")  # shared lib deps
grep_search("from.*config", includePattern="src/places/**")  # config deps
```

### 4 — Build the Map

Produce compact Context Map for Team Lead, downstream agents. Example minimal map (inline):

```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: run `grep_search`, `vscode_listCodeUsages` results into map; confirm all listed files open without errors (CI: `pnpm typecheck`). For full template, Team Lead integration snippets see REFERENCE.md in this directory.

## Anti-Patterns

- Skipping for "obvious" tasks — shared libs cascade unexpectedly
- Guessing dependencies instead of using `grep_search` / `list_code_usages`
- Over-mapping a 2-file fix
- Using a stale map after plan changes
astro-frameworkSkill

Creates pages/layouts, defines content collections, configures hydration directives, and wires integrations. Use when adding or modifying Astro pages, layouts, components, or content collections. Trigger terms: Astro, content collection, client:load, client:visible, astro:content

browser-testingSkill

Drive real browsers via Chrome DevTools MCP: navigate pages, capture snapshots, run responsive checks, and collect console/perf traces. Use when the user mentions: 'validate UI change in Chrome', 'capture a screenshot', 'run responsive checks', or 'collect console logs'. Trigger terms: browser testing, DevTools, console logs, screenshot, responsive testing

cloudflare-platformSkill

Creates and deploys Cloudflare Workers, configures wrangler.toml bindings, sets up KV/D1/R2 storage and Durable Objects, manages Pages deployments, and implements edge function patterns. Use when building or deploying Cloudflare Workers, setting up Pages, working with KV/D1/R2 storage, configuring wrangler.toml, or deploying edge applications.

contentful-cmsSkill

Creates Contentful content types, queries entries via GraphQL/REST, runs CLI migrations, and manages assets and locales. Use when building or modifying Contentful content models, writing queries, or migrating content.

convex-databaseSkill

Convex reactive database patterns, schema design, real-time queries, mutations, actions, authentication, migrations, performance optimization, and component creation. Use when designing Convex schemas, writing queries/mutations, managing the Convex backend, setting up auth, migrating data, optimizing performance, or building Convex components.

coolify-deploymentSkill

Deploys applications, databases, and services on self-hosted Coolify instances, manages environments and env vars, runs infrastructure diagnostics, and performs batch operations. Use when deploying apps to Coolify, managing Coolify servers, debugging deployment issues, setting up databases, or managing Coolify infrastructure.

cypress-testingSkill

Writes Cypress E2E/component tests, configures `cy.intercept()` and `cy.session()`, authors custom commands, and wires CI artifacts. Use when creating E2E specs, component tests, or CI test pipelines. Trigger terms: cypress, e2e, component test, cy.intercept, cy.session

drizzle-ormSkill

Drizzle ORM schema definition, type-safe queries, relational queries, CRUD operations, transactions, migrations with drizzle-kit, and database setup for PostgreSQL, MySQL, and SQLite. Use when defining database schemas, writing queries or joins, managing migrations, setting up a new Drizzle project, or working with drizzle-kit.