logoalt Hacker News

simonwyesterday at 2:40 AM2 repliesview on HN

I'm still not 100% sure I understand what a symlink in a git repository actually does, especially across different operating systems. Maybe it's fine?

Anthropic say "put @AGENTS.md in your CLAUDE.md" file and my own experiments confirmed that this dumps the content into the system prompt in the same way as if you had copied it to CLAUDE.md manually, so I'm happy with that solution - at least until Anthropic give in and support AGENTS.md directly.


Replies

OJFordyesterday at 11:46 AM

It just creates the same symlink on any other checkout. (On Linux/macOS at least, Windows I believe requires local settings changes.)

Only sane (guaranteed portable) option is for it to be a relative symlink to another file within the same repo, of course. i.e. CLAUDE.md would be -> 'AGENTS.md', not '/home/simonw/projects/pelicans-on-bicycles/AGENTS.md' or whatever.

pletnesyesterday at 10:16 AM

On windows, it depends on the local git configuration. It’s not something I’ve been happy with, especially since symlinks also behave differently again when you’re running a docker container to get your windows usable for development.