[DOCS]: Document ~/.claude/CLAUDE.md compatibility behavior #5406

Closed
opened 2026-02-16 17:52:19 -05:00 by yindo · 0 comments
Owner

Originally created by @zeke on GitHub (Jan 13, 2026).

Originally assigned to: @jayair on GitHub.

Problem

OpenCode has Claude Code compatibility features that are inconsistently documented:

Feature Documented? Where?
~/.claude/skills/ Yes Skills docs
.claude/skills/ (project) Yes Skills docs
~/.claude/CLAUDE.md No -
Project-level CLAUDE.md No -
OPENCODE_DISABLE_CLAUDE_CODE* env vars Partially CLI docs (env var table only)

The Rules documentation mentions CLAUDE.md only as a comparison ("similar to CLAUDE.md or Cursor's rules") but doesn't explain that OpenCode actually reads these files.

Affected Code

Proposed Changes

Update the Rules documentation to:

  1. Mention that CLAUDE.md works as an alternative to AGENTS.md (project-level)
  2. Document ~/.claude/CLAUDE.md support (global)
  3. Add a "Claude Code Compatibility" section that consolidates all compatibility features
  4. Document all three OPENCODE_DISABLE_CLAUDE_CODE* environment variables
  5. Cross-reference the Skills documentation for ~/.claude/skills/

Related Issues

  • #6551 - opencode doesn't respect CLAUDE_CONFIG_DIR environment variable
  • #8158 - Support loading Claude Code plugins from .claude/ directory
  • #6985 - Add .claude/commands/ compatibility
Originally created by @zeke on GitHub (Jan 13, 2026). Originally assigned to: @jayair on GitHub. ## Problem OpenCode has Claude Code compatibility features that are inconsistently documented: | Feature | Documented? | Where? | |---------|-------------|--------| | `~/.claude/skills/` | Yes | [Skills docs](https://opencode.ai/docs/skills/) | | `.claude/skills/` (project) | Yes | [Skills docs](https://opencode.ai/docs/skills/) | | `~/.claude/CLAUDE.md` | No | - | | Project-level `CLAUDE.md` | No | - | | `OPENCODE_DISABLE_CLAUDE_CODE*` env vars | Partially | [CLI docs](https://opencode.ai/docs/cli/) (env var table only) | The [Rules documentation](https://opencode.ai/docs/rules/) mentions `CLAUDE.md` only as a comparison ("similar to CLAUDE.md or Cursor's rules") but doesn't explain that OpenCode actually reads these files. ## Affected Code - [`packages/opencode/src/session/system.ts#L65-L73`](https://github.com/anomalyco/opencode/blob/c87939ad122a79150fa6360dacfdef63ea396b2d/packages/opencode/src/session/system.ts#L65-L73) - loads `CLAUDE.md` (project) and `~/.claude/CLAUDE.md` (global) - [`packages/opencode/src/skill/skill.ts#L78-L79`](https://github.com/anomalyco/opencode/blob/c87939ad122a79150fa6360dacfdef63ea396b2d/packages/opencode/src/skill/skill.ts#L78-L79) - scans `~/.claude/skills/` ## Proposed Changes Update the Rules documentation to: 1. Mention that `CLAUDE.md` works as an alternative to `AGENTS.md` (project-level) 2. Document `~/.claude/CLAUDE.md` support (global) 3. Add a "Claude Code Compatibility" section that consolidates all compatibility features 4. Document all three `OPENCODE_DISABLE_CLAUDE_CODE*` environment variables 5. Cross-reference the Skills documentation for `~/.claude/skills/` ## Related Issues - #6551 - opencode doesn't respect CLAUDE_CONFIG_DIR environment variable - #8158 - Support loading Claude Code plugins from .claude/ directory - #6985 - Add .claude/commands/ compatibility
yindo added the docs label 2026-02-16 17:52:19 -05:00
yindo closed this issue 2026-02-16 17:52:19 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#5406