Show HN: Cck ClaudeCode 文件变更追踪与自动 Claude.md
3 分•作者: takawasi•6 个月前
每次使用 Claude Code,会话都会从头开始。你需要重新解释你的项目结构、构建命令和约定。每一次,都得重新解释。<p>我构建了 cck 来解决这个问题。它有两种模式:<p>*1. CLAUDE.md 生成*
```bash
git clone <a href="https://github.com/takawasi/claude-context-keeper" rel="nofollow">https://github.com/takawasi/claude-context-keeper</a> && cd claude-context-keeper && pip install .
cck sync
```
扫描你的代码库,生成 CLAUDE.md。Claude 在会话开始时会读取它。<p>*2. 逐轮上下文注入(真正的力量所在)*
```bash
cck setup --cb-style
cck watch --with-history &
cck hook install --use-history
```
这会跟踪 SQLite 中每一次的文件更改,并在每一轮中注入最近的更改:
```
[CCK] 最近的更改:
15:23:45 ~ src/main.py
15:22:30 + src/utils/helper.py
15:20:12 ~ tests/test_main.py
```<p>Claude 确切地知道你刚刚编辑了什么。不再需要解释“我刚刚更改了 X”。<p>基于 300 多个 Claude Code 会话构建。零 AI 调用,纯静态分析。<p>GitHub: <a href="https://github.com/takawasi/claude-context-keeper" rel="nofollow">https://github.com/takawasi/claude-context-keeper</a>
查看原文
Every Claude Code session starts fresh. You re-explain your project structure, build commands, and conventions. Every. Single. Time.<p>I built cck to solve this. Two modes:<p>*1. CLAUDE.md Generation*
```bash
git clone <a href="https://github.com/takawasi/claude-context-keeper" rel="nofollow">https://github.com/takawasi/claude-context-keeper</a> && cd claude-context-keeper && pip install .
cck sync
```
Scans your codebase, generates CLAUDE.md. Claude reads it at session start.<p>*2. Per-Turn Context Injection (the real power)*
```bash
cck setup --cb-style
cck watch --with-history &
cck hook install --use-history
```
This tracks every file change in SQLite and injects recent changes on every turn:
```
[CCK] Recent changes:
15:23:45 ~ src/main.py
15:22:30 + src/utils/helper.py
15:20:12 ~ tests/test_main.py
```<p>Claude sees exactly what you just edited. No more "I just changed X" explanations.<p>Built from 300+ Claude Code sessions. Zero AI calls, pure static analysis.<p>GitHub: <a href="https://github.com/takawasi/claude-context-keeper" rel="nofollow">https://github.com/takawasi/claude-context-keeper</a>