
Context Map
Build a one-screen structural map of an unfamiliar repo so your agent stops burning tokens on blind Read and Grep loops.
Overview
context-map is an agent skill most often used in Build (agent-tooling) (also Ship review, Idea discover) that emits a compressed repo map so agents skip redundant file reads.
Install
npx skills add https://github.com/athola/claude-night-market --skill context-mapWhat is this skill?
- Detects directory layout with file counts and languages across Python, Node, Rust, Go, and Java ecosystems
- Builds an import graph and flags hot files imported by three or more others before you edit
- Surfaces framework hints from dependencies plus API routes for FastAPI, Flask, Express, and Hono
- Lists environment variable references with defaults and common middleware patterns
- Frontmatter estimates ~300 tokens and targets fast models for session-start scans
- Estimated ~300 tokens in skill frontmatter for the map workflow
- Hot files defined as those imported by 3+ other files
Adoption & trust: 1 installs on skills.sh; 304 GitHub stars; 2/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
What problem does it solve?
You opened a repo you do not own end-to-end and your agent keeps re-reading files to find routes, env vars, and high-impact modules.
Who is it for?
Solo builders jumping into monorepos or client codebases who want a fast structural briefing before the first real edit.
Skip if: Teams that already maintain up-to-date architecture docs and do not need automated rescans each session.
When should I use this skill?
At session start or before implementing features in an unfamiliar codebase, per SKILL.md When to Use.
What do I get? / Deliverables
You get a structural map with import graph, hot files, routes, and env references so the next implementation or review step targets the right entry points.
- Compressed context map covering structure, dependencies, entry points, import graph, routes, and env references
- Hot-file list highlighting high blast-radius modules
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Most value appears when you are about to implement or extend code and need entry points fast—the canonical shelf is Build agent tooling. Context Map is procedural knowledge for coding agents: compress layout, imports, routes, and env usage into a token-cheap briefing.
Where it fits
Scan a forked SaaS template to see frameworks and entry points before deciding whether to adopt it.
List FastAPI or Express routes and env vars before adding a new authenticated endpoint.
Identify hot files imported by three or more modules before approving a refactor PR.
How it compares
Token-saving exploration generator, not a deep static-analysis security audit or test runner.
Common Questions / FAQ
Who is context-map for?
Indie developers and agent users who frequently start cold sessions in unfamiliar or large repositories and need layout without a manual tour.
When should I use context-map?
Use it at Build (agent-tooling) session start, at Idea (discover) when surveying a new repo, and at Ship (review) before editing files the import graph marks as hot.
Is context-map safe to install?
Check the Security Audits panel on this Prism page; the skill scans project structure locally and you should confirm it matches your org’s rules for repository introspection.
SKILL.md
READMESKILL.md - Context Map
# Context Map Generate a compressed context map for the current project. The map pre-compiles structural knowledge that AI assistants would otherwise discover through expensive Read/Grep calls, saving thousands of tokens per session. ## When to Use - At the start of a session to understand project layout - Before implementing features to identify entry points - When exploring an unfamiliar codebase - To reduce token waste from Read calls - To identify hot files (high blast radius) before changes ## What It Detects | Category | Description | |----------|-------------| | Structure | Directory layout with file counts and languages | | Dependencies | Multi-ecosystem: Python, Node, Rust, Go, Java | | Frameworks | Framework detection from dependency analysis | | Entry Points | main.py, index.ts, CLI scripts, etc. | | **Import Graph** | File-to-file import relationships | | **Hot Files** | Files imported by 3+ others (high blast radius) | | **Routes** | FastAPI, Flask, Express, Hono API endpoints | | **Env Vars** | Environment variable references with defaults | | **Middleware** | Auth, CORS, rate-limit, logging patterns | | **Models/Schemas** | SQLAlchemy, Django, Pydantic, Prisma definitions | | **Token Savings** | Estimated tokens saved vs manual exploration | ## Procedure 1. Run the scanner on the project root: ```bash PYTHONPATH="$(find . -path '*/conserve/scripts' -type d \ -print -quit 2>/dev/null || \ echo 'plugins/conserve/scripts')" \ python3 -m context_scanner . ``` 2. Present the output to the user as the project overview. 3. Use the context map to guide subsequent file reads. Prioritize hot files and entry points first. ## Options ### Output - `--format json` for structured output - `--max-tokens N` to adjust output size (default: 5000) - `--output FILE` to save to a file ### Modes - `--blast FILE` to show blast radius for a specific file - `--section NAME` to output a single section (routes, deps, env, hot-files, models, structure, middleware, frameworks) - `--wiki-only` to generate wiki articles without stdout ### Opt-out - `--no-cache` to force a fresh scan - `--no-wiki` to skip wiki article generation ## Wiki Articles The scanner generates per-topic knowledge articles in `.codesight/` for selective context loading: ```bash python3 scanner.py . # Creates .codesight/INDEX.md, auth.md, database.md, etc. ``` Load only what you need per session instead of the full map: ```bash python3 scanner.py --section routes . # ~200 tokens vs ~5,000 for the full map ``` ## Example Output ``` # Context Map: myproject Files: 127 ## Structure src 42 files (Python) tests 18 files (Python) docs 5 files (Markdown) ## Dependencies (Python) Package manager: uv - fastapi 0.104.0 - pydantic 2.5.0 - sqlalchemy 2.0.0 ...12 more ## Frameworks Detected - FastAPI - SQLAlchemy - Pytest ## Routes GET /users (src/routes/users.py) POST /users (src/routes/users.py) GET /users/{id} (src/routes/users.py) ## Hot Files (high blast radius) - src/models/base.py (12 importers) - src/utils/auth.py (8 importers) ## Environment Variables - DATABASE_URL (required) - SECRET_KEY (has default) ## Token Savings: ~12,600 tokens saved Routes: ~1,200 Hot files: ~300 Env vars: ~200 File scanning: ~10,200 ```