Show HN: Cck ClaudeCode 文件变更追踪与自动 Claude.md

3作者: takawasi6 个月前
每次使用 Claude Code,会话都会从头开始。你需要重新解释你的项目结构、构建命令和约定。每一次,都得重新解释。<p>我构建了 cck 来解决这个问题。它有两种模式:<p>*1. CLAUDE.md 生成* ```bash git clone <a href="https:&#x2F;&#x2F;github.com&#x2F;takawasi&#x2F;claude-context-keeper" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;takawasi&#x2F;claude-context-keeper</a> &amp;&amp; cd claude-context-keeper &amp;&amp; pip install . cck sync ``` 扫描你的代码库,生成 CLAUDE.md。Claude 在会话开始时会读取它。<p>*2. 逐轮上下文注入(真正的力量所在)* ```bash cck setup --cb-style cck watch --with-history &amp; cck hook install --use-history ``` 这会跟踪 SQLite 中每一次的文件更改,并在每一轮中注入最近的更改: ``` [CCK] 最近的更改: 15:23:45 ~ src&#x2F;main.py 15:22:30 + src&#x2F;utils&#x2F;helper.py 15:20:12 ~ tests&#x2F;test_main.py ```<p>Claude 确切地知道你刚刚编辑了什么。不再需要解释“我刚刚更改了 X”。<p>基于 300 多个 Claude Code 会话构建。零 AI 调用,纯静态分析。<p>GitHub: <a href="https:&#x2F;&#x2F;github.com&#x2F;takawasi&#x2F;claude-context-keeper" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;takawasi&#x2F;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:&#x2F;&#x2F;github.com&#x2F;takawasi&#x2F;claude-context-keeper" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;takawasi&#x2F;claude-context-keeper</a> &amp;&amp; cd claude-context-keeper &amp;&amp; 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 &amp; 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&#x2F;main.py 15:22:30 + src&#x2F;utils&#x2F;helper.py 15:20:12 ~ tests&#x2F;test_main.py ```<p>Claude sees exactly what you just edited. No more &quot;I just changed X&quot; explanations.<p>Built from 300+ Claude Code sessions. Zero AI calls, pure static analysis.<p>GitHub: <a href="https:&#x2F;&#x2F;github.com&#x2F;takawasi&#x2F;claude-context-keeper" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;takawasi&#x2F;claude-context-keeper</a>