logoalt Hacker News

rectangyesterday at 8:35 PM0 repliesview on HN

I agree, Claude has been pretty great at explaining code. It even does well at explaining to me old code that I wrote by hand — including both non-intuitive quirks and flaws.

Claude in its default configuration has untapped potential for explaining and documenting code because it defaults to writing no comments. I added this to my global CLAUDE.md and so far so good:

    # Comments

    Keep existing comments unless they're wrong
    or stale. Err slightly toward adding short
    explanatory comments for non-obvious code.