Maybe system prompt has priority or something but Opus just really really likes writing bad comments
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.
claude.md for all my projects are fairly tight, its seldom where im upset at anything a model does, and if it happens, its likely because i swapped provider and didn't realize i was failing to feed it proper context beforehand.
Opus 5.0 fails in different ways that I haven't had to deal with. Its insufferable with its choice of language, something I've never had to compensate for on any other model across any provider, so of course I have no preexisting rules for that, it also is sometimes just incredibly stubborn and just WONT finish, and requires several just "keep going" prompts.
This is much different than the issues people would make fun of users for in regards to treating models like slot machines and just pulling the lever over and over, this is more its stopping for no reason short of its task, and literally just needs to be told to continue? absurd.
Most of my workflows have reference material, with standards set, why opus 5.0 is the only model that fails to follow those standards and inserts wildly long weird code comments is not a failure on the end-user, thats the model failing. I can be MORE explicit of course, but i shouldnt need to be, this is supposed to be 5.0, its a downgrade. I went back to 4.8 and all these issues vanished.