Codex 與 Claude Code 能否共用同一個技能?
Codex vs Claude Code: can you use the same skill in both?
Codex 與 Claude Code 通常可共用只採用 name、description 前置資料及純 Markdown 指令的技能,但要分別安裝到各自路徑。
Originally published at buyagentskills.com.
Short answer: Often yes. Both tools read a skill as a folder with a SKILL.md file that has a name and a description in YAML frontmatter, followed by plain Markdown instructions. The folder goes in a different place for each tool, and some optional features exist in only one of them. A simple skill written to the shared minimum can be copied into both.
Written by the Buy Agent Skills team. Updated 12 November 2026. Going by each vendor's public documentation, re-checked on 11 November 2026. See "What we tested and what we did not" below.
Most comparisons of Codex and Claude Code look at benchmarks, speed and price. This one asks a narrower question that matters once you own a few skills: if you build or buy a skill for one tool, can you use it in the other?
If you are new to the format, start with What are agent skills?.
What a skill is, in one paragraph
A skill is a folder. Inside is a SKILL.md file, and optionally reference files, templates or scripts. The description tells the agent when the skill applies. When your request matches, the agent loads the instructions and follows them. Because it is just files, you can read it, edit it and keep it in version control.
What is the same
Per the Claude Code skills documentation and the Codex skills documentation:
| Claude Code | Codex | |
|---|---|---|
| Unit of a skill | Folder with SKILL.md
|
Folder with SKILL.md
|
| Required frontmatter |
name (defaults to folder name), description (recommended) |
name and description
|
| Body | Markdown instructions | Markdown instructions |
| Picked automatically | Yes, when the task matches the description | Yes, "implicit" invocation, when the task matches the description |
| Picked by hand | Type /skill-name
|
Type $ or run /skills in the Codex CLI and select the skill |
| Supporting files | Allowed in the skill folder | Allowed in the skill folder |
The most important line in both is the description. It decides whether the skill fires. A good description says what the skill does and when to use it, in a sentence or two.
Where each tool reads skills from
This is the main practical difference. The same folder, placed in the right spot for each tool:
Claude Code
- Personal, all projects:
~/.claude/skills/<skill-name>/SKILL.md - One project:
.claude/skills/<skill-name>/SKILL.md - Also: plugin skills and organisation-managed skills
Codex
- One project:
.agents/skills/<skill-name>/SKILL.md(in the current folder and in each parent folder up to the repository root) - Personal, all projects:
$HOME/.agents/skills/<skill-name>/SKILL.md - Also: an admin location at
/etc/codex/skillsand a few skills bundled with Codex
So the folder name is the same, and the parent folder differs: .claude/skills/ for Claude Code, .agents/skills/ for Codex.
How to install one skill in both
Project-level install, from your repo root. Replace my-skill with the real folder name.
# Claude Code
mkdir -p .claude/skills
cp -r my-skill .claude/skills/my-skill
# Codex
mkdir -p .agents/skills
cp -r my-skill .agents/skills/my-skill
For every project on your machine, use ~/.claude/skills/ and ~/.agents/skills/ instead.
Then start a new session in each tool and check it loaded:
- In Claude Code, run a task that matches the skill's description. You can also type
/my-skillto call it directly. - In Codex CLI, type
$(or run/skills) and look for the skill in the list, or run a matching task. - If it does not fire, the first thing to check is the
description. The second is the folder path.
Keep one copy of the skill and copy it, or symlink both folders to it, so the two do not drift apart.
What differs
Treat these as the places a skill can stop being portable.
Frontmatter fields. Claude Code documents extra frontmatter fields, for example allowed-tools, disable-model-invocation, context: fork (run the skill in a separate subagent), agent, arguments and paths. Codex documents name and description as the required fields, and puts extra settings in an optional file, agents/openai.yaml (display name, icon, tool dependencies and a switch for implicit invocation). A tool that does not recognise a field may ignore it. A skill that depends on one of these fields behaving a certain way, such as running in a forked subagent, is not guaranteed to behave the same in the other tool.
Variables and substitutions. Claude Code skills can use variables such as $ARGUMENTS and ${CLAUDE_SKILL_DIR}. These are Claude Code features. If a skill's text relies on them, write file references as plain relative paths inside the skill folder instead.
Tool names in the instructions. If a skill says "use the Read tool" or "use the Skill tool", that wording is specific to one agent. Say what you want done ("read the file references/checklist.md") and let each agent choose its own tool.
Subagents, limits and behaviour. The two agents differ in how they use subagents, context and usage limits, and these change with releases. A third-party comparison of the two tools is here (Morph); we cite it as an outside view, we did not verify its figures, and you should check current vendor documentation before you rely on any limit.
Output quality. Even with an identical skill, the two models can produce different wording and different depth. The skill sets the process; the model still writes the output. Review the result in each tool.
How to write a skill that travels
- Use only
nameanddescriptionin the frontmatter. - Write a description that says what it does and when to use it.
- Keep instructions in plain Markdown: steps, rules, a checklist.
- Put long reference material in separate files in the skill folder and refer to them by relative path.
- Do not name agent-specific tools or variables in the body.
- Keep a license file with the skill if it includes someone else's work.
- Test it in both tools with a prompt that should trigger it and one that should not.
Which should you use?
This depends on your habits, not on the skill format.
- You already work in one of them. Stay there. Skills do not need a switch. Add the other later if you want a second opinion on the same task.
- You want the same instructions in a team with mixed tools. Keep skills in the shared minimum format above and install them in both folders.
- You rely on Claude Code's subagent or tool-permission fields. Those parts will not carry over automatically; plan to adjust them for Codex.
- You use skills from a paid or free pack. Check the pack's page for which tools it has been tested in. "Works with" should mean someone ran it.
What we tested and what we did not
Honest status as of 11 November 2026:
- The paths and frontmatter rules above come from the vendors' public documentation, not from our own runs.
- Our Marketing Foundations Pack and Marketing Copy Pack pass our structure checks (frontmatter, links, clean install into an empty folder). Runtime testing inside Claude Code and Codex is still pending for those packs, and their pages say so. We have not yet run any of our packs in Codex.
- We will update this page with Codex install results and the version tested once we have run it ourselves.
This is why we do not claim a pack "works in Codex" until it has been run there. See how we test.
FAQ
Can I copy a Claude Code skill straight into Codex?
If it uses only name, description and plain Markdown, copying the folder into .agents/skills/ should work. Skills that use Claude Code-only fields or variables may need edits.
Do I need to rename SKILL.md?
No. Both tools use SKILL.md.
Does the skill run the same way in both?
The instructions are the same. The agent, its tools and its model are different, so the output will differ. Test in both.
Which folder do I use for all my projects?
~/.claude/skills/ for Claude Code and $HOME/.agents/skills/ for Codex.
What if two skills have the same name?
Claude Code ranks same-named skills by location (enterprise, then personal, then project). Codex does not merge them, and both can appear in its selector. Use unique names.
Are the paid packs from this store available for both?
Browse works with Claude Code and works with Codex for what each pack has actually been tested in. Cartoon Films needs macOS on Apple Silicon and Blender. Results vary; no income is guaranteed.
Where to go next
- Browse packs and skills
- Works with Claude Code
- Works with Codex
- How to review a skill before you install it
Independent product. Not affiliated with or endorsed by Anthropic or OpenAI.
來源:DEV Community · dev.to