-
Notifications
You must be signed in to change notification settings - Fork 5.8k
docs: document ~/.claude/CLAUDE.md compatibility behavior #8268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The following comment was made by an LLM, it may be inaccurate: No duplicate PRs found |
|
|
||
| ### Claude Code Compatibility | ||
|
|
||
| For users migrating from or using both Claude Code and OpenCode, OpenCode also reads `~/.claude/CLAUDE.md`. This allows you to share instructions between both tools. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only reads it if u don't have AGENTS.md (note)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Updated to clarify these are fallbacks: d68ed5c
- Add CLAUDE.md as alternative to AGENTS.md in intro and Project sections - Add Claude Code Compatibility section with project/global rules and skills - Document all three OPENCODE_DISABLE_CLAUDE_CODE* environment variables - Update Precedence section to list all local file types and clarify behavior - Add cross-reference to Agent Skills docs for ~/.claude/skills/
033e17f to
2d52fdd
Compare
AGENTS.md takes precedence over CLAUDE.md at both project and global levels.
| ### Project | ||
|
|
||
| The ones we have seen above, where the `AGENTS.md` is placed in the project root, are project-specific rules. These only apply when you are working in this directory or its sub-directories. | ||
| Place an `AGENTS.md` (or `CLAUDE.md`) in your project root for project-specific rules. These only apply when you are working in this directory or its sub-directories. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: prefer not to say or CLAUDE.md everywhere, stick to AGENTS.md everywhere and then just document that CLAUDE.md is picked up as a fallback like u have
| --- | ||
|
|
||
| You can provide custom instructions to opencode by creating an `AGENTS.md` file. This is similar to `CLAUDE.md` or Cursor's rules. It contains instructions that will be included in the LLM's context to customize its behavior for your specific project. | ||
| You can provide custom instructions to opencode by creating an `AGENTS.md` file (or `CLAUDE.md` for Claude Code compatibility). This is similar to Cursor's rules. It contains instructions that will be included in the LLM's context to customize its behavior for your specific project. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: prefer not to say or CLAUDE.md everywhere, stick to AGENTS.md everywhere and then just document that CLAUDE.md is picked up as a fallback like u have
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call. Reverted intro and project sections to just reference AGENTS.md: 37356cc
Keep CLAUDE.md documentation in the Claude Code Compatibility section only.
|
thx! |
This PR documents Claude Code compatibility features in the Rules documentation.
Changes
CLAUDE.mdas alternative toAGENTS.mdCLAUDE.mdsupportCLAUDE.md~/.claude/CLAUDE.md~/.claude/skills/OPENCODE_DISABLE_CLAUDE_CODE*environment variablesAGENTS.md,CLAUDE.md,CONTEXT.md)Closes #8265
Testing locally