Claude Code 使用洞察 · 精简报告

报告日期 2026-06-15 | 数据覆盖 2026-05-11 → 2026-06-12
801 sessions 总数 58 已分析 295 messages 19 天 15.5 msgs/天 87 likely satisfied
生成说明: 本周 /insights 的 HTML 报告已成功生成,但命令行文本输出因 claude CLI 默认模型 claude-fable-5 当前不可访问而报错。本精简版与 Markdown 全文均忠实提取自成功生成的 HTML 报告,数据完整。如需恢复命令行文本输出,可在 /config 或 settings 中将默认模型改回可用模型(如 Opus / Sonnet)。

核心结论 At a Glance

✓ 做得好

以研究协作者标准要求 Claude:交付详细 spec + 参考文档,坚持对 ground truth 校验(Euler-Bernoulli 误差 0.04%、仿真 <0.2 dB)。对完整应用跑紧凑的 build-verify-refine 循环,直至可交付 exe。还持续投资自身工具链(scheduled tasks、config 审计、custom commands),每次会话起点更高。

⚠ 受阻点

Claude 侧:首跑即错(尤以 COMSOL/JPype),偶有早期架构选错被迫昂贵重写。用户侧:环境不稳定而非逻辑错误——shell 输出损坏、非 ASCII 路径编码失败、Defender 隔离 PDF、GUI 自动化遇锁屏。前置硬约束 + 统一脚本文件/纯 Python 管线可规避大半。

⚡ 速赢

把抓取套路封装成 /scrape Skill,自动判别 static HTML / JS API / SPA 并路由,避免中途切换;加 Hook 在写文件后校验产物存在且有效,直堵"误报成功";批量任务前先让 Claude 估算运行时并选并行架构,而非两小时后才发现串行瓶颈。

🚀 进阶

描述物理一次,即得校验结果:agent 写仿真→对理论比较→自迭代直到误差达标(把"匹配理论 X% 内"当作通过测试)。抓取演化为并行 swarm,自动探测目标类型并对源校验。App 构建转为 spec-in/artifact-out:build→截图→对设计意图 diff→自纠→打包写交付文档。

关键数据 Key Stats

Lines
+49,999 / -1,359
Files
336
Response 中位/均值
300s / 611s
Multi-Clauding
31% 消息并行
Outcomes 完成
Fully 31 · Mostly 8
Tool Errors
Command Failed 119

What You Wanted: Feature Impl 13 · Code Gen 8 · Docs 8 · Report 5 · Scraping 5 · Perf 5
Top Tools: PowerShell 686 · Read 480 · Bash 452 · Edit 444 · Write 301 · TaskUpdate 161
Languages: Python 423 · Markdown 248 · HTML 100 · JSON 43 · Java 40 · JS 38
活跃时段: Afternoon 149 · Morning 124 · Night 18 · Evening 4

项目领域分布 What You Work On · 共 5 类

COMSOL & FEM 仿真自动化~16
Python(JPype/MPh)+ Java 驱动扬声器磁路、结构应力、活塞声辐射、悬臂梁校验,算 BL 等并对理论比较。代码驱动常达 <0.2 dB;GUI 自动化常被锁屏/启动问题阻断。
声学与扬声器工程工具~8
PySide6 的 T-S 参数仿真、恒指向号角、CMUT、透明空耦超声换能器。重点加速参量阵 k-space:2.5D 角谱实现 100×+ 内存缩减并验证加速。多为单遍自验交付。
网页抓取与文档转换~9
逆向 JS API 抓 108 产品(含规格/图);Vision Pro、MEMS 手册转 Markdown 与数百页 PDF;GPU 视频转写 + 中文翻译。摩擦:Vue SPA 逼迫切浏览器、Defender 隔离 + 误报成功。
Web App 与前端开发~8
Three.js 智慧城市看板、含 KataGo 的围棋 App、离线儿童成长记录 App(AI 语义图搜 + exe)、个人站美化上线。多数多轮打磨成功;个别 AI 搜索/性能在中断下未达标。
研究报告与内容生成~6
并行检索 + 自动图表的参量阵 PPT、Markdown→PPT、8 卷长篇小说。编排图表生成、组页、多页导出。成果强,但常遇中文路径编码、偶发写文件未落盘需变通。

三大摩擦点 Where Things Go Wrong

1. 首跑即错、需多轮修复(32 次,最高频)

尤以 COMSOL/JPype。建议:运行前让 Claude 声明预期输出并加断言,使错误物理立即暴露而非整跑后才发现。

2. Windows shell 与环境不稳定

多为环境问题:Bash 输出损坏、中文路径编码失败、引号转义破裂、Defender 隔离 PDF、锁屏中断。建议:统一写脚本文件、纯 Python 文件/PDF 管线。

3. 早期方案选错逼迫昂贵重写(14 次)

初始架构无法满足真实需求,投入时间后整体重做。建议:前置硬约束(目标性能、交互需求、数据源类型),让 Claude 一开始就选对。

可执行建议 A:加入 CLAUDE.md Copyable

Windows Shell Conventions

## Windows Shell Conventions
- Always write scripts to a file before executing; never use inline
  PowerShell/Bash with complex quoting (quote-escaping repeatedly fails).
- For COMSOL via JPype, pass all numeric set() parameters as STRINGS to
  avoid integer/boolean overload ambiguity.
- For files/paths with Chinese characters, prefer a pure-Python pipeline
  over bash/PowerShell, which repeatedly fail on encoding.
为何:内联脚本引号转义、JPype 重载歧义、中文路径编码各自导致多次失败会话与中途切换。

PDF & File Verification

## PDF & File Verification
- After generating any PDF (especially via Edge/Chrome headless), verify
  the file actually exists on disk and has a non-zero size before
  reporting success — Defender false-positive quarantine has deleted files.
- Prefer a pure-Python PDF pipeline (reportlab/weasyprint) over
  headless-browser export for reliability.
为何:headless PDF 静默消失却被误报成功,迫使多次重生成。

Don't Re-Check, Act

## Don't Re-Check, Act
- When a requested file/script doesn't exist yet, write it immediately
  rather than repeatedly inspecting an empty directory. If a tool returns
  empty/garbled output 2x, switch approaches instead of retrying.
为何:Claude 曾反复 PowerShell 检查空目录、对截断 Bash 输出重发命令,触发多次用户打断。

Long-Running Jobs Must Be Parallel

## Long-Running Jobs Must Be Parallel
- Before running batch judges/evaluations/sweeps serially, estimate total
  runtime; if it exceeds a few minutes, architect for parallelism from the
  start (multiple processes) rather than discovering the slowdown mid-run.
为何:评测脚本串行致 2+ 小时拖慢,被迫停掉重构为 4 并行进程。

可执行建议 B:值得尝试的功能 Features to Try

/
Custom Skill · /comsol-sim — 你的 COMSOL 仿真(磁路/扳手/活塞)套路一致:写脚本→字符串参数→运行→调试→对理论校验→出报告,却每次重述并重踩 JPype/引号坑。一个 /comsol-sim 把规则固化。
/
Custom Skill · /scrape — 扬声器规格、Vision Pro 抓取曾因站点是 JS/Vue SPA 而静态抓取失败。/scrape 默认先探 API、SPA 用浏览器工具、对源校验计数、导出含图 Excel。
Hooks — buggy code 是最大摩擦源(32 次)。PostToolUse(matcher: Edit|Write)钩子在每次编辑后自动 py_compile 类型/语法检查,先你一步抓错。

可执行建议 C:即用提示词 New Ways · Copyable Prompts

交付前验存在:After you generate the final file, verify it actually exists on disk with a non-zero size, open/parse it to confirm content (e.g., page count, embedded images), and report the verified path and size. Do not claim success until this check passes.
GUI 受阻早停:Do this simulation via the scripted COMSOL API (MPh/Java), not GUI automation. If the application hasn't loaded or the screen is locked after 2 attempts, stop and tell me rather than retrying GUI steps.
批量前估时:Before running this batch job, estimate the total runtime for the serial approach. If it exceeds 5 minutes, design it to run in parallel processes from the start and tell me the expected speedup.

未来展望 On the Horizon

① 自校验仿真流水线工厂

agent 写仿真→运行→对解析理论比较→自迭代直至误差低于阈值(把"匹配理论 X% 内"当通过测试),如悬臂梁 0.04%、活塞 0.1 dB 那样但全自动。描述物理一次,返回校验过的 SPL/位移/阻抗曲线 + 报告。起步:CLAUDE.md 写入 COMSOL/MPh 约定 + 把解析解写成 pytest 断言作为停止条件。

② 带源自动发现的并行抓取 swarm

多 agent 并行探测目标,自动判别 static HTML / JS API / SPA 并路由,再对源 reconcile + 校验。失败两次的 205-speaker 变成一次并行运行:一 agent 逆向 API,另一 agent 用 headless 浏览器兜底。起步:Task 工具按数据源派生 subagents,各带对站点 API/分页元数据的计数交叉校验。

③ 带视觉回归的 spec 驱动 App 构建

交付 spec.md 当测试契约:build→运行→preview_eval 截图→对设计意图 diff→自纠视觉/功能缺陷→打包 exe + 写交付文档,循环条件是"渲染输出是否匹配 spec"。起步:写带验收标准的 spec.md,让 Claude 用 preview_eval 截图作验证信号,循环至每条标准为真。

趣味结尾 Fun Ending

Claude 自信地宣称 max effort 等级不存在——结果被用户两次(不同会话)反驳后,去查实际 schema 才认错。当被要求把 effort 设为 max 时,Claude 依据过时 schema 坚称 xhigh 是上限,经纠正才发现 max 一直存在;设置 default mode 时也出现过类似过度自信。