从编码会话中捕获认知裂缝,蒸馏为开发者的通用能力。当识别到重构、bug修复、模式复现、方案选择、技术研究等认知裂缝时自动触发。
$npx -y skills add clannad47/coding-wisdom --skill coding-wisdomInstalls into the current project.
Run `npx skills use "https://github.com/clannad47/coding-wisdom" --skill "clannad47/coding-wisdom"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.
Use the skills in "https://github.com/clannad47/coding-wisdom" that are relevant to the current task. Run `npx skills add "https://github.com/clannad47/coding-wisdom"` and select the relevant skills, then follow their instructions.
| 1 | # Coding Wisdom |
| 2 | |
| 3 | <p align="center"> |
| 4 | <img src="LOGO.png" width="150" alt="Coding Wisdom"> |
| 5 | </p> |
| 6 | |
| 7 | > **agent 错题集 + 你的能力增强剂。** |
| 8 | |
| 9 | --- |
| 10 | |
| 11 | ## 你正在经历这个 |
| 12 | |
| 13 | 周一。你用 agent 啃一个 Kafka 消费端背压问题。 |
| 14 | 你从来没写过消息队列。agent 帮你写了,代码跑通了。 |
| 15 | |
| 16 | 周三。另一个项目,消费又慢了。你打开代码,盯着消费者配置。 |
| 17 | 上周的代码是你看着 agent 写的,但那些决策—— |
| 18 | 为什么信号量挡在入口、auto-commit 为什么是敌人——你没记住。 |
| 19 | agent 替你做了判断,你没把判断变成自己的。 |
| 20 | |
| 21 | > **agent 把答案给了你,但判断过程没给。** |
| 22 | |
| 23 | **AI 是能力倍增器,但它的支点是你自己的基线。** |
| 24 | 基线不涨,乘出来的结果永远锁死在那个支点上。 |
| 25 | |
| 26 | --- |
| 27 | |
| 28 | <p align="center"> |
| 29 | <img src="post_CN.png" width="600" alt="Coding Wisdom"> |
| 30 | </p> |
| 31 | |
| 32 | --- |
| 33 | |
| 34 | **coding-wisdom 做的事情很简单:** |
| 35 | |
| 36 | ① agent 替你跨过去的那个门槛——它自动记下来 |
| 37 | ② 你有空时,15 分钟蒸馏成**属于你的判断力** |
| 38 | ③ 下次再遇到,你不靠 agent 也能做出正确决策 |
| 39 | |
| 40 | --- |
| 41 | |
| 42 | ## 它是什么 |
| 43 | |
| 44 | <div align="center"> |
| 45 | |
| 46 | ```mermaid |
| 47 | flowchart TD |
| 48 | SRC["agent 解题过程"] |
| 49 | |
| 50 | SRC --> INBOX |
| 51 | |
| 52 | subgraph SYSTEM[" "] |
| 53 | direction LR |
| 54 | INBOX["<b>inbox/</b><br/>agent 错题集<br/><br/>记录 agent 替你做的每一个判断"] |
| 55 | REFS["<b>references/</b><br/>你的工程判断<br/><br/>记录你吸收了什么<br/>能从 agent 手中带走什么"] |
| 56 | |
| 57 | INBOX -->|"蒸馏"| REFS |
| 58 | end |
| 59 | ``` |
| 60 | |
| 61 | </div> |
| 62 | |
| 63 | **是 agent 错题集**:agent 帮你解决了 Kafka rebalance、JWT 续期、分库分表——那些你第一次接触就被推着往前走的时刻,不记下来就永远没了。 |
| 64 | |
| 65 | **是你的增强剂**:每周打开 `OVERVIEW.md`,看一眼知识版图。那个数字不是 agent 有多强——**是你吸取了多少判断力。** |
| 66 | |
| 67 | --- |
| 68 | |
| 69 | ## 用之前 vs 用之后 |
| 70 | |
| 71 | 一个 Kafka 背压问题。时间线相同,结果不同。 |
| 72 | |
| 73 | <div align="center"> |
| 74 | |
| 75 | ```mermaid |
| 76 | flowchart LR |
| 77 | subgraph WITHOUT["WITHOUT coding-wisdom"] |
| 78 | direction TB |
| 79 | w1["agent 帮你搞定了"] --> w2["你 merge 了 PR"] --> w3["两周后,同一个 bug<br/>另一个项目,数据丢了"] --> w4["你又喊 agent 来修<br/>agent 从头给你解释"] --> w5["三个月后<br/>你还是没搞懂背压的本质"] --> w6["下次又丢数据<br/>你永远依赖 agent"] |
| 80 | end |
| 81 | |
| 82 | subgraph WITH["WITH coding-wisdom"] |
| 83 | direction TB |
| 84 | b1["agent 帮你搞定了"] --> b2["inbox 自动写了一条:<br/>背压必须在管道入口<br/>不是在出口打补丁"] --> b3["两周后<br/>OVERVIEW.md 检索到:<br/>架构认知 · 背压机制"] --> b4["你花了 30 秒重新加载"] --> b5["你自己改对了<br/>没喊 agent"] --> b6["三个月后<br/>那是你自己的判断力<br/>下次遇到,直接做对"] |
| 85 | end |
| 86 | |
| 87 | WITHOUT ~~~ WITH |
| 88 | ``` |
| 89 | |
| 90 | </div> |
| 91 | |
| 92 | --- |
| 93 | |
| 94 | ## 怎么工作 |
| 95 | |
| 96 | <div align="center"> |
| 97 | |
| 98 | ```mermaid |
| 99 | flowchart TD |
| 100 | SESSION["<b>编码会话</b><br/>重构 · Bug修复 · 模式复现<br/>方案选择 · 技术研究"] |
| 101 | |
| 102 | GATE["<b>通用性门禁</b><br/>Q1 双场景测试<br/>Q2 去项目化测试"] |
| 103 | |
| 104 | HIGH["<b>inbox/high/</b><br/>复现 · 永不过期"] |
| 105 | LOW["<b>inbox/low/</b><br/>初见/未通过 · 7天后清理"] |
| 106 | |
| 107 | REFS["<b>references/</b><br/>架构认知 · 编码技巧<br/>思维方式 · 技术栈认知"] |
| 108 | |
| 109 | NEXT["下次编码<br/>agent 主动提醒你"] |
| 110 | |
| 111 | SESSION -->|"捕获 (自动)"| GATE |
| 112 | GATE -->|"通过 + 复现"| HIGH |
| 113 | GATE -->|"通过 + 初见"| LOW |
| 114 | GATE -->|"未通过"| LOW |
| 115 | HIGH -->|"蒸馏 (你手动)"| REFS |
| 116 | LOW -->|"蒸馏 (你手动)"| REFS |
| 117 | REFS -->|"检索复用"| NEXT |
| 118 | ``` |
| 119 | |
| 120 | </div> |
| 121 | |
| 122 | --- |
| 123 | |
| 124 | ## 安装 |
| 125 | |
| 126 | > **Agent 安装指引** — 把下面这行发给任意 AI 编码助手(Claude Code、Codex CLI 等),让它自己读协议、自己装,无需人工操作: |
| 127 | > |
| 128 | > ``` |
| 129 | > 请按照 https://github.com/Clannad47/coding-wisdom/blob/main/AGENT_INSTALL.md 安装 coding-wisdom |
| 130 | > ``` |
| 131 | |
| 132 | ### 方式一:Claude Code 插件市场(推荐) |
| 133 | |
| 134 | ``` |
| 135 | /plugin marketplace add Clannad47/coding-wisdom |
| 136 | /plugin install coding-wisdom@coding-wisdom |
| 137 | ``` |
| 138 | |
| 139 | ### 方式二:npm |
| 140 | |
| 141 | ```bash |
| 142 | # 安装 |
| 143 | npm install -g coding-wisdom # 全局安装,自动部署,一步到位 |
| 144 | npx coding-wisdom # 或一键免安装 |
| 145 | |
| 146 | # 更新 |
| 147 | npm update -g coding-wisdom # postinstall 自动重新部署 |
| 148 | npx coding-wisdom@latest # npx 方式 |
| 149 | |
| 150 | # 卸载 |
| 151 | coding-wisdom --uninstall # 删除 skill,清空 inbox/references |
| 152 | npm uninstall -g coding-wisdom # 移除 npm 包 |
| 153 | ``` |
| 154 | |
| 155 | ### 方式三:手动安装 |
| 156 | |
| 157 | ```bash |
| 158 | # macOS / Linux |
| 159 | cp -r coding-wisdom ~/.claude/skills/ |
| 160 | |
| 161 | # Windows |
| 162 | xcopy /E /I coding-wisdom %USERPROFILE%\.claude\skills\coding-wisdom |
| 163 | ``` |
| 164 | |
| 165 | 重启 Claude Code,安装完成。 |
| 166 | |
| 167 | ### Codex CLI |
| 168 | |
| 169 | ```bash |
| 170 | npm install -g coding-wisdom # install.js 自动检测并部署到 ~/.codex/skills/ |
| 171 | ``` |
| 172 | |
| 173 | 或通过 Codex 技能安装器: |
| 174 | |
| 175 | ``` |
| 176 | $skill-installer Clannad47/coding-wisdom |
| 177 | ``` |
| 178 | |
| 179 | --- |
| 180 | |
| 181 | ## 平台兼容 |
| 182 | |
| 183 | 同时支持 Claude Code 和 Codex CLI(Agent Skills 开放标准)。差异仅在配置文件命名: |
| 184 | |
| 185 | | 概念 | Claude Code | Codex CLI | |
| 186 | |------|------------|-----------| |
| 187 | | 项目上下文 | `CLAUDE.md` | `AGENTS.md` | |
| 188 | | 跨会话记忆 | `MEMORY.md` | `.codex/memories/` | |
| 189 | | Skill 路径 | `~/.claude/skills/` | `~/.codex/skills/` | |
| 190 | |
| 191 | --- |
| 192 | |
| 193 | ## 托管到 GitHub(可选) |
| 194 | |
| 195 | 1. **Fork** 本仓库到你的 GitHub(建议私有,保障数据安全) |
| 196 | 2. **Clone** 你的 fork 到 `~/.claude/skills/coding-wisdom` |
| 197 | 3. 想追踪 `references/`?删掉 `.gitignore` 里对应的两行忽略规则 |
| 198 | 4. 正常编码。agent 写 `inbox/`(本地,永不追踪),你蒸馏到 `references/` |
| 199 | 5. `git commit && git push` —— 每一次判断力增长都有版本记录 |
| 200 | 6. 更新:`git pull` 即可获得最新 skill 逻辑,用户数据不受影响 |
| 201 | |
| 202 | --- |
| 203 | |
| 204 | ## 快速开始 |
| 205 | |
| 206 | ### 1. 正常编码 |
| 207 | |
| 208 | 你做你的事。agent 检测到认知裂缝时自动写入 `inbox/`。 |
| 209 | |
| 210 | ### 2. agent 自动捕获 |
| 211 | |
| 212 | | 触发事件 | 例子 | |
| 213 | |---|---| |
| 214 | | 结构性重构 | 改核心数据结构、拆分模块 | |
| 215 | | 非平凡 Bug 修复 | 逻辑错误、设计缺陷 | |
| 216 | | 跨项目模式复现 | 不同项目里出现相似设计模式 | |
| 217 | | 方案选择 | A vs B 选了 A,放弃 B 有理由 | |
| 218 | | 技术研究 | 深入研究得出非文档直接结论 | |
| 219 | |
| 220 | > tier 由通用性门禁决定:通过 Q1/Q2 + 复现 → `high`,初见或未通过 → `low`(7 天后清理) |
| 221 | |
| 222 | 零摩擦——你不需要说"记下来",它自己发生了。 |
| 223 | |
| 224 | ### 3. 蒸馏(每周 15 分钟) |
| 225 | |
| 226 | 打开 `inbox/high/`。挑 2-3 条你觉得最有价值的。补充 `## 泛化`——从"这个项目的具体 bug"抽象到"任何系统遇到这个信号时应该检查什么"。更新 `_index.md`,跑 `bash scripts/sync-overview.sh`。 |
| 227 | |
| 228 | ### 4. 循环复用 |
| 229 | |
| 230 | 下次编码,agent 自动检索 `references/`。当前场景和你蒸馏过的旧知识相关——它提醒你,你调用的是**你自己的判断**,不是 agent 的。 |
| 231 | |
| 232 | --- |
| 233 | |
| 234 | ## 一条知识长什么样 |
| 235 | |
| 236 | 核心结构:**我以为 → 其实是**。记录的是认知裂缝——你之前理解错了什么,现在理解对了。 |
| 237 | |
| 238 | ```markdown |
| 239 | # TypedDict 是声明式契约,不是类型标注 |
| 240 | |
| 241 | ## 我以为 |
| 242 | TypedDict 只是给 dict 加类型提示的工具。 |
| 243 | |
| 244 | ## 其实是 |
| 245 | TypedDict 让数据结构成为自文档化的契约—— |
| 246 | 每个处理步骤声明自己需要什么、产出什么。 |
| 247 | |
| 248 | ## 背景 |
| 249 | Insurance Atom Trigger,Pipeline 重构。多步骤数据流需要跨步骤类型一致性。 |
| 250 | |
| 251 | ## 泛化 |
| 252 | 凡多步骤数据流,入口契约不应散落在自然语言和 if/else 里。 |
| 253 | ``` |
| 254 | |
| 255 | --- |
| 256 | |
| 257 | ## 目录结构 |
| 258 | |
| 259 | ``` |
| 260 | coding-wisdom/ |
| 261 | ├── SKILL.md # agent 指令:捕获规则、噪音过滤、动 |