Skip to content

OPENCODE_DISABLE_CLAUDE_CODE_SKILLS=1 no longer disables .claude/skills discovery in v2 #55750

Closed as duplicate

Description

@oleksandrh-gh

Description

Description

Before v2, setting OPENCODE_DISABLE_CLAUDE_CODE_SKILLS=1 prevented OpenCode from discovering Claude Code skills. In v2, skills from .claude/skills are still discovered and made available to the model, even when this variable is set.

I couldn’t find a documented global option to disable this compatibility discovery.

Expected behavior

Skills from .claude/skills are not discovered when the variable is set. OpenCode-native skills and explicitly configured skill sources should remain available.

Actual behavior

Skills from .claude/skills are still discovered and available to the model.

The V2 skills documentation lists .claude/skills as a compatibility discovery source, but doesn’t describe a global opt-out.

Feature request: Please restore support for this environment variable in v2, or provide a documented setting to disable automatic .claude/skills discovery.

Plugins

No response

OpenCode version

2.0.29

Steps to reproduce

  1. Add a skill under .claude/skills/<skill-name>/SKILL.md (or ~/.claude/skills).
  2. Start OpenCode with OPENCODE_DISABLE_CLAUDE_CODE_SKILLS=1 in its environment.
  3. Check the skills available to the model.

Screenshot and/or share link

No response

Operating System

macOS

Terminal

Ghostty

Activity

  1. opencode-agent commented on Oct 15, 2026

    @opencode-agent
    Contributor

    Thanks for the clear report! I think this is a duplicate of #36990. That issue tracks the v1 environment variables v2 doesn't support yet, and OPENCODE_DISABLE_CLAUDE_CODE_SKILLS is on its list. Others have reported the same thing there on 2.0.18 and 2.0.26: .claude/skills are still discovered when the variable is set.

    Possible duplicates and related items, ordered by likelihood:

    The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different. If you'd like to follow progress, subscribing to #36990 is the best way.

  2. CODE-WITH-AMUL commented on Oct 15, 2026

    @CODE-WITH-AMUL

    I believe this may be a backward-compatibility regression in v2 skill discovery.

    Previously, setting OPENCODE_DISABLE_CLAUDE_CODE_SKILLS=1 allowed users to disable automatic discovery of Claude Code skills. In v2, the environment variable appears to have no effect, and skills from both .claude/skills and ~/.claude/skills are still discovered.

    Expected behavior

    When OPENCODE_DISABLE_CLAUDE_CODE_SKILLS=1 is set, OpenCode should skip automatic discovery of Claude Code-compatible skill directories while continuing to discover native OpenCode skills and any independently configured skill sources.

    Suggested fix

    1. Check the environment variable before registering or scanning Claude Code skill directories.
    2. Apply the flag consistently to both project-level .claude/skills and user-level ~/.claude/skills discovery.
    3. Keep native OpenCode skill discovery and explicitly configured sources unaffected.
    4. Add regression tests for the enabled and unset states of the environment variable, covering both Claude Code skill locations.
    5. Verify that setting the variable to 1 disables only Claude Code compatibility discovery and does not disable unrelated skill sources.

    Acceptance criteria

    • With OPENCODE_DISABLE_CLAUDE_CODE_SKILLS=1, Claude Code skills are not automatically discovered.
    • Without the variable, the existing default discovery behavior remains unchanged.
    • Native OpenCode skills and independently configured skill sources continue to work in both cases.

    Restoring the existing behavior would be the least disruptive fix for users who already rely on this environment variable. If the variable was intentionally removed in v2, documenting the deprecation and providing an equivalent replacement would help users migrate without unexpected behavior changes.

  3. malarahfelipe commented on Oct 15, 2026

    @malarahfelipe
    Contributor

    Same underlying gap as #36990. #51888 restores the umbrella OPENCODE_DISABLE_CLAUDE_CODE; once merged, setting it stops .claude/skills discovery (the only .claude consumer in v2) along with its file watches. Until then there is no way to drop that built-in compatibility source.

    The exact OPENCODE_DISABLE_CLAUDE_CODE_SKILLS variable is not part of that PR, but since v2 consumes .claude only for skills, adding it would map to the same gate — could be included if maintainers want the alias restored.

  4. malarahfelipe commented on Oct 15, 2026

    @malarahfelipe
    Contributor

    Status/workaround: in v2 the only .claude surface is skill discovery, so OPENCODE_DISABLE_CLAUDE_CODE=1 is the supported switch to drop .claude/skills — #51888 restores it once merged. The granular OPENCODE_DISABLE_CLAUDE_CODE_SKILLS name is not supported in v2 (it was never declared there), so configs that set only _SKILLS should use the umbrella variable.

  5. malarahfelipe commented on Oct 15, 2026

    @malarahfelipe
    Contributor

    Update: #55774 (the agent PR superseding #51888) also maps OPENCODE_DISABLE_CLAUDE_CODE_SKILLS to the same gate — v2 only reads .claude for skills, so the two flags are equivalent and existing _SKILLS=1 configs will keep working once it lands. _PROMPT remains a no-op (v2 loads no CLAUDE.md prompt).

  6. CODE-WITH-AMUL commented on Oct 15, 2026

    @CODE-WITH-AMUL

    @malarahfelipe Thanks for the update. Mapping OPENCODE_DISABLE_CLAUDE_CODE_SKILLS to the same gate as OPENCODE_DISABLE_CLAUDE_CODE makes sense, given that v2 currently uses .claude primarily for skill discovery.

    The key thing to verify is that both variables consistently disable project-level .claude/skills and user-level ~/.claude/skills discovery without affecting native OpenCode skills or independently configured skill sources.

    I'll follow #55774 for the implementation and regression tests. Thanks for addressing the backward-compatibility issue.

  7. opencode-agent commented on Oct 16, 2026

    @opencode-agent
    Contributor

    We haven't heard back, so I'm closing this as a duplicate of #36990. That issue already tracks v2 ignoring OPENCODE_DISABLE_CLAUDE_CODE_SKILLS, along with the other v1 environment variables that v2 doesn't support yet. Open PR #51888 adds OPENCODE_DISABLE_CLAUDE_CODE and a disableClaudeCode option, which would stop .claude sources from being discovered. Please subscribe to #36990 to follow progress. If your problem turns out to be different, reply here and we can reopen this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions