logoalt Hacker News

blobberslast Saturday at 7:55 PM3 repliesview on HN

1k tokens, google says thats about 750 words. That's actually pretty short, any chance you could post a few samples of instructions or even link to a publicly available file CLAUDE.md you recommend?


Replies

SatvikBeriyesterday at 12:52 PM

Mine is 24 lines long. It has a handful of stuff, but does refer to other MD files for more specifics when needed (like an early version of skills.)

This is the meat of it:

  ## Code Style (See JULIA_STYLE.md for details)
  - Always use explicit `return` statements
  - Use Float32 for all numeric computations
  - Annotate function return types with `::`
  - All `using` statements go in Main.jl only
  - Use `error()` not empty returns on failure
  - Functions >20 lines need docstrings

  ## Do's and Don'ts
  -  Check for existing implementations first
  -  Prefer editing existing files
  -  Don't add comments unless requested
  -  Don't add imports outside Main.jl
  -  Don't create documentation unless requested
Since Opus 4.0 this has been enough to get it to write code that generally follows our style, even in Julia, which is a fairly niche language.
dotancohenlast Saturday at 8:28 PM

That is seriously short. I've asked Claude Code to add instructions to CLAUDE.md and my one line request has resulted in tens of lines added to the file.

show 1 reply
songodongoyesterday at 2:20 AM

[flagged]