← 返回
未分类 中文

Nm Conserve Context Map

Generates a compressed project context map to avoid expensive Read/Grep calls. Use at session start or before implementing features in an unfamiliar codebase
生成精简的项目结构图,减少昂贵的读取/搜索操作。在会话开始或实现新功能前使用,尤其适用于不熟悉的代码库。
athola athola 来源
未分类 clawhub v1.9.12 2 版本 100000 Key: 无需
★ 0
Stars
📥 65
下载
💾 1
安装
2
版本
#latest

概述

> Night Market Skill — ported from claude-night-market/conserve. For the full experience with agents, hooks, and commands, install the Claude Code plugin.

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

CategoryDescription
-----------------------
StructureDirectory layout with file counts and languages
DependenciesMulti-ecosystem: Python, Node, Rust, Go, Java
FrameworksFramework detection from dependency analysis
Entry Pointsmain.py, index.ts, CLI scripts, etc.
Import GraphFile-to-file import relationships
Hot FilesFiles imported by 3+ others (high blast radius)
RoutesFastAPI, Flask, Express, Hono API endpoints
Env VarsEnvironment variable references with defaults
MiddlewareAuth, CORS, rate-limit, logging patterns
Models/SchemasSQLAlchemy, Django, Pydantic, Prisma definitions
Token SavingsEstimated tokens saved vs manual exploration

Procedure

  1. Run the scanner on the project root:
PYTHONPATH="$(find . -path '*/conserve/scripts' -type d \
  -print -quit 2>/dev/null || \
  echo 'plugins/conserve/scripts')" \
  python3 -m context_scanner .
  1. Present the output to the user as the project overview.
  1. 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:

python3 scanner.py .
# Creates .codesight/INDEX.md, auth.md, database.md, etc.

Load only what you need per session instead of the full map:

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

版本历史

共 2 个版本

  • v1.9.12 当前
    2026-06-19 20:45
  • v1.0.0
    2026-06-09 19:28 安全 安全

安全检测

腾讯云安全 (Keen)

队列中

腾讯云安全 (Sanbu)

队列中

🔗 相关推荐

business-ops

Nm Attune Project Planning

athola
将规格说明转化为分阶段、依赖排序的实施计划,用于规格完成后、执行前。
★ 0 📥 748
dev-programming

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 196 📥 67,927
dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 681 📥 329,269