← 返回 Skills 市场
athola

Nm Conserve Context Map

作者 athola · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
34
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install 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
使用说明 (SKILL.md)

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

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

  2. 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
安全使用建议
Install only if you want an agent to scan and summarize your local project. Use it on intended repositories, consider --no-wiki if you want to avoid creating .codesight/ files, and be aware that broad trigger words may cause the skill to be selected more often than expected.
能力评估
Purpose & Capability
The stated purpose is to summarize a codebase by structure, dependencies, imports, routes, environment variable references, and related project metadata; those capabilities match the advertised context-map function.
Instruction Scope
The runtime procedure is scoped to the current project root, but several triggers such as "context," "scanning," and "exploration" are broad enough that the skill could activate for ordinary requests.
Install Mechanism
The package contains only SKILL.md, no executable payload, declared dependencies, install hooks, or bundled scripts.
Credentials
Repository-wide scanning is proportionate to the skill purpose, but users should run it only in repositories they intend to summarize because it may reveal project structure and environment variable names in the agent context.
Persistence & Privilege
No privilege escalation, credential use, network exfiltration, or background persistence is shown; the skill does disclose optional wiki article generation under .codesight/, which can write local files.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install nm-conserve-context-map
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /nm-conserve-context-map 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of nm-conserve-context-map. - Generates a compressed project context map to reduce expensive Read/Grep operations. - Detects project structure, key dependencies, frameworks, entry points, import graph, API routes, hot files, environment variables, middleware, and data models. - Offers command-line options for output format, section selection, token limits, and caching controls. - Produces per-topic wiki articles for selective context loading (.codesight/). - Estimates token savings vs manual code exploration.
元数据
Slug nm-conserve-context-map
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

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. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 34 次。

如何安装 Nm Conserve Context Map?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install nm-conserve-context-map」即可一键安装,无需额外配置。

Nm Conserve Context Map 是免费的吗?

是的,Nm Conserve Context Map 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Nm Conserve Context Map 支持哪些平台?

Nm Conserve Context Map 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Nm Conserve Context Map?

由 athola(@athola)开发并维护,当前版本 v1.0.0。

💬 留言讨论