Add mdTemplet/ sidecar templates for CLAUDE.md @-imports

主仓库的 CLAUDE.md 用 @~/.claude/note.md 等路径引用本地侧边文件, 克隆者
机器上默认没有这些文件会导致 @ 解析为空。提供 mdTemplet/ 下的现成样本
(note.md 工具笔记/debug.md 踩坑记录/log.md 会话日志空壳) 方便克隆者直接
拷到自己的 ~/.claude/ 作为起点。
This commit is contained in:
Zhang Jiahao
2026-04-21 00:51:56 +08:00
parent e99b5fe482
commit d99ac3a142
3 changed files with 27 additions and 0 deletions

17
mdTemplet/debug.md Normal file
View File

@@ -0,0 +1,17 @@
# Debug / Pitfalls
## 2026-04-21 eza --tree 无路径参数静默空输出
- 症状: `eza --tree --git-ignore --level=2` 输出空, exit 0
- 原因: eza tree 模式需要显式路径参数
- 规避: 总是加 `.`(或其他路径)
## 2026-04-21 broot 无法在非交互环境使用
- 症状: `broot --cmd ":pt;:q"``Termimad Error: IO error: No such device`
- 原因: broot 需要 TTY, 设计就是交互工具
- 规避: CLI/Claude Code 场景直接用 eza + fd + rg
- 附注: 首次运行会自动 patch `~/.bashrc``~/.zshrc` 注入 `br` 函数
## 2026-04-21 repomix 大仓库 token 预算
- 症状: nexus4cc (203M 磁盘) 经 .gitignore 过滤后仍 144k tokens
- 原因: 前端单文件(如 Terminal.tsx 21k tokens累积
- 规避: > 100k tokens 的仓库按子目录切片 (`repomix frontend/src -o /tmp/fe.xml`)

2
mdTemplet/log.md Normal file
View File

@@ -0,0 +1,2 @@
# Session Log

8
mdTemplet/note.md Normal file
View File

@@ -0,0 +1,8 @@
# Practice Notes
## Locate tooling (for mature/unfamiliar repos)
- `repomix -o /tmp/x.xml` (or `repomix <subdir>`) — full-repo LLM pack; slice by subdir if > 100k tokens
- `eza --tree --git-ignore --level=3 .` for layout (path arg required)
- `fd <pat>` for files; `rg <sym>` for call sites
- `git ls-files` when tokens are tight