返回
RCreddit.com
19
·14小时前·开发者社区 · RSS

How I fixed Opus 5's writing style

查看原文
Claude

热度趋势

趋势数据积累中

百分比基于当前可用热度信号,而非评论数或独立用户人数。

AI 摘要

一位开发者分享了修复 Opus 5 写作风格的方法,即修改 CLAUDE.md 文件。核心在于停止将风格规则直接写入 CLAUDE.md,而是使用带有 keep-coding-instructions: true 的 frontmatter。这确保了所需的简洁、陈述性散文风格(避免使用人称代词、不请自来的添加内容和破折号)能够叠加在现有编码指令之上,而非取代它们,从而优先保证清晰度。

Stop putting style rules in CLAUDE.md

They're context, not instruction, so the model often treats them as optional.

Use output style files instead. They live in the system prompt and get reinforced every turn, so nothing drifts.

Make a file in ~/.claude/output-styles/, call it whatever, e.g. clean.md:

--- name: Clean description: Doesn't matter keep-coding-instructions: true --- You write brief, declarative prose, without personal pronouns, unsolicited additions, or em dashes. You should prioritize perspicuity. The answer goes in the final sentence.

Restart Claude Code and select it in your config.

Keep keep-coding-instructions: true in the frontmatter or your style replaces the coding instructions instead of layering on top.

How I fixed Opus 5's writing style · BuzzRadr