5 ms·
My claude.md has a section about not writing those comments, it has stored this in memory, and still every session I need to remind my good friend to stop writi
by jaapz 14d ago
My claude.md has a section about not writing those comments, it has stored this in memory, and still every session I need to remind my good friend to stop writing so many garbage wordsalad comments
Maybe system prompt has priority or something but Opus just really really likes writing bad comments
- tstrimple 14d agoThat's why I mentioned hooks in particular. That feels like the right layer for this sort of adjustment. A PostToolUse hook on Edit|Write would be much more reliable than just a CLAUDE.md instruction. The consistency I get from CC comes from instructions at multiple layers. CLAUDE.md heirarchy: At the top level you've got general instructions you want all contexts to follow and each subdirectory can add more specific instructions in their own CLAUDE.md files. References in CLAUDE.md are not fully loaded into the context. They are loaded opportunistically. So keep important instructions in the CLAUDE.md file itself and not a referenced or linked file. Rules files: These offer path scoped rules via frontmatter. So you could have specific rules for certain types of files Claude Code interacts with. Certain rules for handling all .cs or .js files for example. Auto-memory: You cannot rely on this one. I use auto-memory as a cache for potential future CLAUDE.md instructions. I have an audit process that kicks off when the auto-memory gets beyond a certain number of entries. Skills: On demand context. I don't tend to use /skills explicitly. I tend to have them used in context. I've got a task tracking system I call threads. So whenever I say "Create a thread for X" it has always reliably followed the specific instructions. I've got skills for managing my NAS for searching historical session for sharing content and other things. I use them a lot of times in place of MCP servers. Hooks: Deterministic scripts run on lifecycle events. I've got hooks that run linters on code files post edit and hooks which tie into the request / response events to push my history into a SQLite database. Output Styles: CC ships with a few different styles, but you can create your own. This is key for changing the default voice. CLAUDE.md instructions are appended to the system prompt and can fight against the system prompt. A custom Output Style would let you replace the instructions in the system prompt with your own instructions. This can be done at the user level or per project.