[skip ci] Import AGENTS.md from .claude/CLAUDE.md - #23691
Conversation
iluuu1994
left a comment
There was a problem hiding this comment.
Thanks. You could also drop the claude heading.
|
Oh actually, one concern. |
There was a problem hiding this comment.
If this is pasted verbatim into .claude/CLAUDE.md, will the path referenced within AGENTS.md be wrong? It references ./SECURITY.md, which doesn't live in .claude but in root.
Not sure how to best fix that. Maybe just move the CLAUDE.md file back into root.
|
I think not necessarily. the documented path-resolution rule applies to @ imports. ./SECURITY.md is a plain-text reference, so this isn’t a confirmed resolution bug. But it's frankly strange. Another solution is to put CLAUDE.md into root dir instead of ./claude. wdyt? |
|
Moving it back to the root works for me. |
|
I will make this 2 commits when merging. One for the @ syntax and one for moving it to root. To make |
e2df3cc to
e51a7eb
Compare
Load the shared instructions through an @ import and remove the redundant heading.
Place CLAUDE.md alongside AGENTS.md to clarify relative file references. Update the import to @AGENTS.md.
e51a7eb to
821e3f9
Compare
|
Thanks! |
Replace the prose instruction with Claude Code’s @ import syntax so that AGENTS.md is loaded automatically.
The official documentation describes importing AGENTS.md and states that relative paths resolve relative to the importing file. So using @../AGENTS.md is correct as far as I can tell and more recommended by claude code.