Orkas Orkas
Home Blog Can You Use Claude Skills in Codex and OpenCode?
Product

Can You Use Claude Skills in Codex and OpenCode? Shared Folders and Migration

Copy one complete Skill to validate it before choosing a shared source folder. Check each client’s permissions and script dependencies separately.

Yes. Claude Code, Codex and OpenCode all support Agent Skills with SKILL.md as the entry point. You can usually reuse an existing Claude Skill, but you need to check discovery folders, client-specific syntax and runtime dependencies separately. Seeing a Skill in the list does not mean its scripts and permission settings have migrated successfully.

If your main goal is to use Claude Skills in Codex, copy the complete Skill folder to ~/.agents/skills/, check it with /skills in Codex, then invoke it explicitly with $skill-name. OpenCode already supports reading ~/.claude/skills/, so you usually do not need to move the files first.

This article is based on official documentation accessed on December 2, 2026, and covers local CLIs. The commands below are configuration examples; they have not been tested jointly across all three CLIs. Cloud sessions may not be able to read folders on your computer.

Where does each tool load Skills from?

A Skill is a folder: SKILL.md contains the task instructions, and reference files and scripts can sit alongside it. All three tools share this basic format, but discover Skills in different folders.

Local folderClaude CodeCodexOpenCode
~/.agents/skills/Not listed as a local discovery folder in the current docsSupportedSupported
Project .agents/skills/Not listed as a local discovery folder in the current docsSupportedSupported
~/.claude/skills/SupportedNot listed as a local discovery folder in the current docsSupported
Project .claude/skills/SupportedNot listed as a local discovery folder in the current docsSupported
~/.config/opencode/skills/, project .opencode/skills/Not a standard folder for this toolNot a standard folder for this toolSupported
Explicit invocation/skill-name$skill-name or /skills@skill-id

~ means the current user’s home directory; in PowerShell, you can use $HOME. Codex checks .agents/skills from the launch directory up to the repository root. OpenCode’s discovery rules continue up to the filesystem root, so the three tools do not necessarily use the same traversal boundary.

Codex’s local Skills documentation also explicitly supports Skill folders linked from elsewhere. Claude Code supports folder symlinks in its own discovery folders too, letting you keep one set of source files and expose it through each tool’s entry point.

Get a Claude Skill working in Codex first: copy one complete folder

Start by validating the migration with a Skill that does not publish, delete or incur charges. Suppose it is called release-notes and lives here:

~/.claude/skills/release-notes/
├── SKILL.md
├── references/
└── scripts/

On macOS or Linux, first check that the destination does not already contain an item with the same name, then copy:

mkdir -p "$HOME/.agents/skills"
if [ -e "$HOME/.agents/skills/release-notes" ] || [ -L "$HOME/.agents/skills/release-notes" ]; then
  printf '%s\n' '目标已存在,请先比较内容;本次不覆盖。'
else
  cp -R "$HOME/.claude/skills/release-notes" "$HOME/.agents/skills/"
fi

In Windows PowerShell, use:

$source = Join-Path $HOME '.claude\skills\release-notes'
$parent = Join-Path $HOME '.agents\skills'
$target = Join-Path $parent 'release-notes'
New-Item -ItemType Directory -Force $parent | Out-Null
if (Get-Item -LiteralPath $target -Force -ErrorAction SilentlyContinue) {
    Write-Warning '目标已存在,请先比较内容;本次不覆盖。'
} else {
    Copy-Item -LiteralPath $source -Destination $target -Recurse -ErrorAction Stop
}

Open Codex, run /skills to find it, then enter $release-notes. Ask it only to read and summarize changes in the current repository, without creating a release or modifying files yet. If the list has not refreshed, restart Codex and check again.

Keep the entire folder when copying. Taking only SKILL.md can leave behind referenced templates and scripts. After copying, the original and destination are independent copies; later edits will not sync automatically.

Share Skills long term: keep one source folder and link it into Claude Code

If you regularly switch between all three tools, you can use ~/.agents/skills/ as the source folder. Codex and OpenCode read it directly, while Claude Code reads links under ~/.claude/skills/.

Back up your existing Skills and check that the source folder contains all required files. Compare any existing folder with the same name before proceeding; do not overwrite it with a link. Leave Claude Code’s managed synced and .trash folders out of manual migration.

macOS and Linux

The following links just one prepared Skill so you can check the result first:

mkdir -p "$HOME/.agents/skills" "$HOME/.claude/skills"
source="$HOME/.agents/skills/release-notes"
target="$HOME/.claude/skills/release-notes"
if [ ! -f "$source/SKILL.md" ]; then
  printf '%s\n' '源目录缺少 SKILL.md,停止。'
elif [ -e "$target" ] || [ -L "$target" ]; then
  printf '%s\n' '目标已存在,请先比较或处理旧链接;本次不覆盖。'
else
  ln -s "$source" "$target"
fi

Windows PowerShell

For local folders, you can use a directory junction. If filesystem or organization permissions block the operation, stop and investigate rather than switching to administrator privileges by default:

$source = Join-Path $HOME '.agents\skills\release-notes'
$parent = Join-Path $HOME '.claude\skills'
$target = Join-Path $parent 'release-notes'
New-Item -ItemType Directory -Force $parent | Out-Null
if (-not (Test-Path -LiteralPath (Join-Path $source 'SKILL.md') -PathType Leaf)) {
    throw '源目录缺少 SKILL.md,停止。'
}
if (Get-Item -LiteralPath $target -Force -ErrorAction SilentlyContinue) {
    Write-Warning '目标已存在,请先比较内容或检查旧联接;本次不覆盖。'
} else {
    New-Item -ItemType Junction -Path $target -Target $source -ErrorAction Stop | Out-Null
}

Linking the entire Skill folder keeps reference files and scripts with the same source. Do not point the whole ~/.claude/skills folder at the shared folder, as that can mix in content managed by Claude Code’s sync mechanism.

A team repository can use the same layout: commit the actual files under .agents/skills/, then create links under .claude/skills/ with a setup script. Cross-platform teams should not assume that symlinks checked out by Git will work directly on Windows.

Write a more portable SKILL.md

Here is a complete minimal example to save as release-notes/SKILL.md. It only asks for Git history to be read and does not depend on extra templates:

---
name: release-notes
description: "根据当前 Git 仓库的提交记录起草发布说明。用户要求整理 changelog、发布说明或版本变更时使用。"
---

# 起草发布说明

1. 确认当前目录属于目标 Git 仓库;不确定时询问用户。
2. 运行 git describe --tags --abbrev=0 查找最近的标签。
3. 如果没有标签,询问用户希望采用的起始提交或范围。
4. 读取指定范围的提交,按新增、变更和修复整理中文草稿。
5. 不创建标签、不提交、不推送、不发布。用户明确要求写文件时,再保存草稿。

Keeping the folder name and name consistent, with a short lowercase hyphenated name, helps reduce invocation differences between clients. OpenCode derives the Skill ID from its path; name is primarily the display name.

The description should explain when to use the Skill and when not to. Put important trigger conditions first, without stuffing it with keywords. Quote YAML values containing a colon followed by a space to reduce parsing ambiguity.

Check the execution environment separately for Skills with scripts. Shell scripts may not run directly on Windows, and Python packages, Node.js packages and external commands are not installed automatically with the Markdown file. For relative paths, state whether they are resolved from the Skill folder or the project folder.

Which Claude Code features cannot be copied over directly?

General task instructions are usually easy to migrate; client extensions need separate handling. Check the following during migration rather than assuming identical behavior just because the Skill is discoverable:

Syntax or capabilityHow to handle migration
allowed-toolsDo not treat it as a cross-client permission restriction; configure the target tool’s permissions and sandbox separately
$ARGUMENTS, $1Replace with clear input requirements; have the target tool ask for missing information instead of relying on Claude’s argument substitution
Dynamic command injection in the bodyReplace with explicit execution steps and check permissions; do not assume other clients will run commands in advance
${CLAUDE_SKILL_DIR}Do not assume the target client will substitute it; use the client’s directory information or explicit location steps
context: fork, agent, model, hooksConfigure separately through the target client’s subagent, model and Hook mechanisms
disable-model-invocation: trueCheck invocation policies separately; copying the field alone does not mean automatic invocation is disabled in every client

See Claude Code’s Skill configuration documentation for its extension fields. After migrating, check for variables or command syntax in the body that only the original client understands.

Codex can disable implicit invocation through agents/openai.yaml inside the Skill folder:

policy:
  allow_implicit_invocation: false

Explicit invocation with $skill-name remains available. OpenCode’s current documentation supports disable-model-invocation: true, as well as this configuration:

metadata:
  opencode/autoinvoke: false

When both settings are present in OpenCode, opencode/autoinvoke takes precedence. Hiding a Skill from automatic discovery does not prohibit execution; use the target client’s permission rules to explicitly prohibit a Skill.

Can OpenCode use Claude Skills directly?

Yes. By default, OpenCode reads personal and project .claude/skills folders, as well as .agents/skills. If you already have a Claude Skill, invoke it in OpenCode with @skill-id first, check its content and dependencies, then decide whether you need to organize a shared folder.

Take care with duplicate names. OpenCode selects definitions by ID, and a later-registered source can override an earlier one. In the current documentation, the compatible .agents/skills folders take precedence over .claude/skills. If the two locations contain different versions, the loaded version may not be the one you just edited.

If the content looks wrong, compare folders with matching names and their link targets first. A single name in the list does not mean all sources have been merged. Do not delete old copies without comparing them.

Does Codex read CLAUDE.md? How is it different from a Skill?

CLAUDE.md and AGENTS.md provide project-level guidance; SKILL.md packages a workflow invoked for a task. Renaming one of the former files to the latter does not automatically make it a suitable Skill.

Codex’s project instructions documentation lists AGENTS.override.md and AGENTS.md as the default filenames and allows fallback filenames. If a repository only has CLAUDE.md, you can add this to the Codex configuration:

project_doc_fallback_filenames = ["CLAUDE.md"]

This is only a fallback lookup. If a directory already has a higher-priority AGENTS.md, this setting will not load both files together. Teams that want multiple tools to follow the same rules are usually better off maintaining shared rules in AGENTS.md, avoiding two copies that gradually drift apart.

Starting with v2.1.277, Claude Code can read AGENTS.md directly when the required conditions are met. If the working directory or an ancestor contains CLAUDE.md, .claude/CLAUDE.md or CLAUDE.local.md, Claude instruction files still take priority by default. To load both, adjust Project instructions as described in the project memory documentation. Older versions or sessions without that setting can import AGENTS.md from CLAUDE.md instead.

OpenCode falls back to CLAUDE.md when the same directory has no AGENTS.md. These rules and Skill discovery folders are separate mechanisms, so troubleshoot them separately.

What if you run these CLIs through Orkas?

Orchestrate Claude Code, Codex and OpenCode with Orkas

If you launch Claude Code, Codex or OpenCode from Orkas, distinguish local Skills loaded natively by the CLI from Skills supplied to agents through Orkas. The installation entry points differ; a name appearing in one place does not establish discovery in the other.

For a Skill supplied through Orkas, ask the agent in an actual session to load the named Skill and restate its task boundaries. Then run a low-risk task to confirm that the required scripts and files are available. Verify CLI startup and execution of the Skill’s complete workflow separately.

If you also need to divide tasks between multiple CLIs, see how to use Claude Code and Codex together. Sharing Skills handles workflow reuse; coordinating multiple agents is a separate configuration task.

How do you verify a migration?

First confirm that the client discovers the Skill, then check what it actually loads. Ask the agent to state the Skill’s name, source and key restrictions to catch interference from copies with the same name.

Next, try an input with no side effects. For the release-notes example above, generate only a chat draft first. Check the commit range and whether it respects the restrictions against committing, pushing and publishing. If the Skill includes scripts, check their paths, dependencies and output as well.

Check common issues in this order:

  • Codex cannot see the Skill: check that the complete folder is under .agents/skills, that SKILL.md exists and its metadata can be parsed, then restart the session.
  • The Skill loads but its script fails: check the working directory and dependencies, and whether the script supports the current operating system. Do not just reinstall the Skill repeatedly.
  • OpenCode loads old content: check precedence for the same ID across discovery sources, especially .claude/skills and .agents/skills.
  • Manual invocation still works after automatic invocation is disabled: this may match the setting’s intended meaning. Check automatic invocation policy and execution permissions separately.
  • You received a .skill file: confirm its source and packaging format first; do not simply rename the extension to .md. The local loading setup in this article is for unpacked folders containing SKILL.md. Follow each client’s own instructions for upload and import entry points.

If you only use Claude Code and OpenCode, continuing with .claude/skills is usually enough. When you add Codex, copy one Skill to validate it before deciding whether to adopt .agents/skills plus folder links for long-term sharing. Whichever layout you choose, verify the loaded content and execution result, not just the installation message.