Discipline log first
Skill yli769227-jpg/awesome-claude-code-cn/skills/discipline-log-first
Karpathy 教你 LLM 会犯什么错。我教你 LLM 在我这犯了什么错、怎么治。8 条铁律 + 真实反例 + 中文 Claude Code 实战包
npx -y skills add yli769227-jpg/awesome-claude-code-cn --skill discipline-log-firstAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
日志优先(可观测性) —— 新代码必须包含关键路径日志:连接、状态变化、错误、请求/响应。触发: 即将写新模块、新接口、新异步任务、新外部调用,或正在 debug 一段没有日志的代码时,先加载本 skill。写代码犯错正常,定位问题难。
SKILL.md
1.1 KB, as published. Nobody here has run it
三、日志优先(可观测性)
写代码犯错是正常的,定位问题才是真正困难的。
- 所有新代码必须包含关键路径日志:连接建立、状态变化、错误发生、请求/响应。
- 日志格式统一,带前缀标识模块,便于 grep。
- 错误日志必须包含上下文:什么操作、什么参数、什么错误。
- Agent 写代码时也必须遵守。
加载时机
- 即将写新模块 / 新接口 / 新外部调用 / 新异步任务
- 正在 debug 一段没有日志的代码
- 派 agent 子任务写代码前(任务描述里要明确"加关键路径日志")
配套
具体反面例子 / 正面例子见 EXAMPLES.md。