Live data from Hacker News

Writing a good Claude.md

humanlayer.dev

121–130 of 304 posts

Re: Writing a good Claude.md

#121
post #82

> Claude often ignores CLAUDE.md > The more information you have in the file that's not universally applicable to the tasks you have it working on, the more likely it is that Claude will ignore your instructions in the file Claude.md files can get pretty long, and many times Claude Code just stops following a lot of the directions specified in the file A friend of mine tells Claude to always address him as “Mr Tinkle…

I have a /bootstrap command that I run which instructs Claude Code to read all system and project CLAUDE.md files, skills and commands.

Helps me quickly whip it back in line.

Re: Writing a good Claude.md

#122
post #82

> Claude often ignores CLAUDE.md > The more information you have in the file that's not universally applicable to the tasks you have it working on, the more likely it is that Claude will ignore your instructions in the file Claude.md files can get pretty long, and many times Claude Code just stops following a lot of the directions specified in the file A friend of mine tells Claude to always address him as “Mr Tinkle…

> A friend of mine tells Claude to always address him as “Mr Tinkleberry”, he says he can tell Claude is not paying attention to the instructions on Claude.md, when Claude stops calling him “Mr Tinkleberry” consistently this is a totally normal thing that everyone does, that no one should view as a signal of a psychotic break from reality... is your friend in the room with us right now? I doubt I'll ever understand t…

I suspect you’re misjudging the friend here. This sounds more like the famous “no brown m&ms” clause in the Van Halen performance contract. As ridiculous as the request is, it being followed provides strong evidence that the rest (and more meaningful) of the requests are.

Sounds like the friend understands quite well how LLMs actually work and has found a clever way to be signaled when it’s starting to go off the rails.

Re: Writing a good Claude.md

#123
it's always funny, i think the opposite. I use a massive CLAUDE.md file, but it's targetted towards very specific details of what to do, and what not to do.

I have a full system of agents, hooks, skills, and commands, and it all works for me quite well.

I believe is massive context, but targetted context. It has to be valuable, and important.

My agents are large. My skills are large. Etc etc.

Re: Writing a good Claude.md

#124

Earlier quoted context omitted.

> A friend of mine tells Claude to always address him as “Mr Tinkleberry”, he says he can tell Claude is not paying attention to the instructions on Claude.md, when Claude stops calling him “Mr Tinkleberry” consistently this is a totally normal thing that everyone does, that no one should view as a signal of a psychotic break from reality... is your friend in the room with us right now? I doubt I'll ever understand t…

I suspect you’re misjudging the friend here. This sounds more like the famous “no brown m&ms” clause in the Van Halen performance contract. As ridiculous as the request is, it being followed provides strong evidence that the rest (and more meaningful) of the requests are. Sounds like the friend understands quite well how LLMs actually work and has found a clever way to be signaled when it’s starting to go off the rai…

It's also a common tactic for filtering inbound email.

Mention that people may optionally include some word like 'orange' in the subject line to tell you they've come via some place like your blog or whatever it may be, and have read at least carefully enough to notice this.

Of course ironically that trick's probably trivially broken now because of use of LLMs in spam. But the point stands, it's an old trick.

Re: Writing a good Claude.md

#125

I don't get the point. Point it at your relevent files ask it to review discuss the update refine it's understanding and then tell it to go. I have found that more context comments and info damage quality on hard problems. I actually for a long time now have two views for my code. 1. The raw code with no empty space or comments. 2. Code with comments I never give the second to my LLM. The more context you give the lo…

Genuinely curious — how did you isolate the effect of comments/context on model performance from all the other variables that change between sessions (prompt phrasing, model variance, etc)? In other words, how did you validate the hypothesis that "turning off the comments" (assuming you mean stripping them temporarily...) resulted in an objectively superior experience?

What did your comparison process look like? It feels intuitively accurate and validates my anecdotal impression but I'd love to hear the rigor behind your conclusions!

Re: Writing a good Claude.md

#126

Earlier quoted context omitted.

I have also done this, but my results are very hit or miss. Claude rarely actually reads the other documentation files I point it to.

I think the key here is “if X then Y syntax” - this seems to be quite effective at piercing through the “probably ignore this” system message by highlighting WHEN a given instruction is “highly relevant”

What?

Re: Writing a good Claude.md

#127
post #57

Earlier quoted context omitted.

> 1. The raw code with no empty space or comments. 2. Code with comments I like the sound of this but what technique do you use to maintain consistency across both views? Do you have a post-modification script which will strip comments and extraneous empty space after code has been modified?

Curious if that is the case, how you would put comments back too? Seems like a mess.

As I think more on how this could work, I’d treat the fully commented code as the source of truth (SOT).

1. SOT through a processor to strip comments and extra spaces. Publish to feature branch.

2. Point Claude at feature branch. Prompt for whatever changes you need. This runs against the minimalist feature branch. These changes will be committed with comments and readable spacing for the new code.

3. Verify code changes meet expectations.

4. Diff the changes from minimal version, and merge only that code into SOT.

Repeat.

Re: Writing a good Claude.md

#129

Earlier quoted context omitted.

The effort described in the article is maybe a couple hours of work. I understand the "enjoy doing anyway" part and it resonates, but not using AI is simply less productive.

> but not using AI is simply less productive Some studies shows the opposite for experienced devs. And it also shows that developers are delusional about said productivity gains: https://metr.org/blog/2025-07-10-early-2025-ai-experienced-o... If you have a counter-study (for experienced devs, not juniors), I'd be curious to see. My experience also has been that using AI as part of your main way to produce code, is no…

That study is garbo and I suspect you didn't even read the abstract. Am I right?

Re: Writing a good Claude.md

#130
> Regardless of which model you're using, you may notice that Claude frequently ignores your CLAUDE.md file's contents.

This is a news for me. And at the same time it isn’t. Without the knowledge of how the models actually work, most of the prompting is guesstimate at best. You have no control over models via prompts.

Post reply on HN