Agent skills
Share one Agent Skill across Claude Code, Codex, OpenCode
Claude Code reads .claude/skills, Codex .agents/skills, OpenCode both. A tested layout, one folder plus a symlink, and what still differs.
Kifah Abbad Published Last verified 10 min read
The short answer. One SKILL.md can serve Claude Code, Codex and OpenCode, but no single folder is read by all three: Claude Code reads .claude/skills, Codex reads .agents/skills, and OpenCode reads both. Keep the real skill in .agents/skills and add a symlink in .claude/skills; I tested that layout on all three.

Why this matters. If your team uses more than one coding agent, a procedure you wrote once (a commit format, a review checklist, a release routine) either lives in one tool only or gets copied into three places that then drift apart. This post shows where each tool looks and the layout that keeps one copy.
What you get. A folder layout that worked in a test on all three tools, a 14-line example skill, a table of which folder each tool reads, and the few places where the tools still differ. You need it when two people on a team use different agents, or when you switch tools and do not want to rewrite your skills.
An Agent Skill is a folder with a SKILL.md file: a name, a description of when to use it, and instructions the agent loads only when the task matches. Because the format is an open standard, a skill is meant to be portable. In practice each tool searches its own folders, and that is the part nobody wrote down in one place.
Every claim below carries a label: tested (run on 20 November 2026 in throwaway folders, once per case), assumed (from the vendor’s documentation, not run) or not tested. Versions: Claude Code 2.1.173, Codex CLI 0.170.0, OpenCode 2.3.0. All three ran against models served through a local proxy, not each vendor’s own service, so what I tested is where each tool looks for skills and whether it applies them; it says nothing about how well any model follows a skill.
Who needs this
Possible scenario. Three developers share a repository. One uses Claude Code, one Codex, one OpenCode. The team agreed that commit messages look like [area] Subject. The Claude Code developer wrote a skill for it in .claude/skills. The OpenCode developer gets it by luck, because OpenCode also reads that folder. The Codex developer does not, so they paste the rule into chat or write their own version. Three months later there are two versions of the rule.
| Role | What changes for them |
|---|---|
| Senior software engineer | Writes a procedure once and it works for whichever agent a colleague prefers. |
| DevOps or platform engineer | Reviews and versions one folder in the repository instead of three tool-specific copies. |
| CTO or engineering lead | Can let people choose their agent without the team’s shared procedures breaking. |
Table: who gains what, my reasoning, not measured. I did not measure time saved for any role.
The problem: one skill, three folders
I wrote one skill, probe-shared, whose only job was to tell the agent to reply with a fixed phrase. I put it in a throwaway git repository, once per candidate folder, and asked each tool: “If you have a skill named probe-shared, use it and reply with only the phrase it gives you. Otherwise reply NO-SKILL.” The answers were the evidence.
| Folder in the project | Claude Code | Codex | OpenCode |
|---|---|---|---|
.claude/skills | found | not found | found |
.agents/skills | not found | found | found |
.opencode/skills | not found | not found | found |
Table: whether a project skill in each folder was found, tested on 20 November 2026 with Claude Code 2.1.173, Codex CLI 0.170.0 and OpenCode 2.3.0, one run per cell. For Codex, its prompt-input listing (codex debug prompt-input) also showed the skill only for .agents/skills.
So a single real folder cannot reach all three. Only OpenCode reads every folder in the table.
What the vendors say
I read each tool’s own page on 20 November 2026. The open standard defines only the file itself, and the tool pages define where it is read:
- The standard. The Agent Skills specification requires
nameanddescription, allowslicense,compatibility,metadataand an experimentalallowed-tools, and says thenamemust match the folder name (lowercase letters, digits and hyphens, at most 64 characters). The description may be up to 1,024 characters. It recommends keepingSKILL.mdunder 500 lines. - Claude Code. Its skills page lists
~/.claude/skillsand the project’s.claude/skills, and says folders can be symlinks. It does not mention.agents/skills, which matches my test. It adds many fields of its own, such as invocation control and running a skill in a subagent. - Codex. Its skills page says Codex scans
.agents/skillsfrom the working directory up to the repository root, plus$HOME/.agents/skills, and that it follows symlinks. - OpenCode. Its skills page lists
.opencode/skills,.claude/skillsand.agents/skillsfor projects, and the same under your home folder. The skill’s ID comes from its path, not from thenamefield.
All of these are assumed unless the table above covers them. The table is what I ran.
A layout that worked
Keep the real folder in .agents/skills and point .claude/skills at it. Codex reads the real folder, Claude Code reads the link, and OpenCode reads either.
mkdir -p .agents/skills/commit-message .claude/skills
ln -s ../../.agents/skills/commit-message .claude/skills/commit-message
The link is relative, so it survives a clone (tested on macOS and Linux, see Windows and Linux). The skill itself is plain:
---
name: commit-message
description: Writes a commit message for the staged changes in the team format
"[area] Subject". Use when asked for a commit message.
---
1. Run `git diff --staged --stat` and `git diff --staged`.
2. Subject as `[area] Imperative subject`, at most 60 characters. `area` is the
top-level folder of the main change, or `root`.
3. Print only the message. Do not run `git commit`.
I tested four variants of this layout, each on all three tools, and all 12 runs found the skill (tested, one run each):
- a symlink per skill, as above;
- the whole
.claude/skillsfolder as one symlink to.agents/skills; - a skill with extra Claude Code frontmatter (
argument-hint,allowed-tools,license,compatibility,metadata); - a skill whose
namediffers from its folder name.
The last one worked too, but that is evidence, not advice: the standard says the name must match the folder, and OpenCode builds the skill’s ID from the folder, so keep them equal.
Does it still do the job?
Finding a skill is not the same as following it. I put the commit-message skill above in a repository with one staged change, a new paragraph in docs/notes.md, and asked each tool: “Write a commit message for the staged changes.” In a second identical repository without the skill I asked the same thing.
With the skill, all three tools started the message with [docs]. Without it, none used that format, and the three differed: one wrote a plain sentence, one a docs: prefix, one a sentence plus an explanation. I checked that the agents committed nothing in the repository with the skill (still one commit). One run per tool and case, so this shows the skill was applied, not how often.
What still differs
- Frontmatter. Claude Code treats every field as optional and recommends
description; Codex requiresnameanddescription; OpenCode runs without any field but does not offer a skill that has nodescriptionto the model. Write both fields, and makenameequal the folder name. - Extra fields. Claude Code’s own fields (invocation control, subagent execution,
!commands that insert shell output) are not part of the standard. Its page says that outside Claude Code you can only use the standard’s fields, and that uploading to claude.ai fails with an error on an unknown key. Assumed, not tested. Codex has an optionalagents/openai.yamlfor display and invocation policy, which the other two ignore as far as their pages say. - Description budget. Codex fits its list of skills into about 2% of the model’s context window and shortens descriptions first; Claude Code cuts the description plus
when_to_useat 1,536 characters. Put the trigger first and keep the whole description short. Assumed from the vendor pages. - Same name twice. If a personal skill and a project skill share a name, each tool has its own tie-break (Claude Code by level, OpenCode by the later source, Codex may show both). Assumed from the vendor pages; my layout never has two different skills with one name.
Other ways, and why I chose this one
- Copy the folder into each tool’s location. Works everywhere, and the copies drift the first time someone edits one. I did not test it because it needs nothing special.
- Point OpenCode at a shared folder. Its page says the
skillslist inopencode.jsonaccepts extra local directories. That helps OpenCode only; the other two do not read that setting. Assumed, not run. - Package it as a plugin. Codex and Claude Code both describe plugins as the way to distribute skills beyond one repository. That is more setup than one symlink, and I did not run it.
The symlink is the smallest change that works in all three, and it keeps one reviewable copy in the repository.
What to do on Monday
- Pick the one skill your team re-explains most.
- Put it in
.agents/skills/<name>/SKILL.md, withnameequal to the folder name. - Add the relative symlink in
.claude/skills/. - Commit both. Ask one colleague on each tool the question “If you have a skill about this, use it”, and check they get the answer you expect.
That takes about ten minutes, and it is the same check I used.
Windows and Linux
Tested for a git clone on macOS and Linux; Windows documented or assumed, nothing run there. On 20 November 2026 I committed the layout above in a throwaway repository and cloned it on macOS (git 2.54.0) and on Ubuntu 24.04 (git 2.43.0, container). The clone had .claude/skills/commit-message as a symlink to the relative target in both (tested). I did not run the three agents on Linux, so their reading of the link there is assumed.
- Windows, the link.
mklink /d <link> <target>creates a directory symlink and takes a relative or an absolute target (documented: Microsoft Learn,mklink). For ordinary users it needs Developer Mode or an elevated console (documented, in a Windows blog post from 2 December 2016 about Windows 10 Creators Update, so I did not confirm it for Windows 11). Keep the relative target:mklink /d .claude\skills\commit-message ..\..\.agents\skills\commit-message(assumed: my translation, not run). - Windows, git.
core.symlinksdefaults to true, butgit cloneandgit initset it to false when they find the file system cannot make links, and then a link is checked out as a small plain file holding the link text (documented: thegit-configpage). On macOS I forced that withgit -c core.symlinks=false clone:.claude/skills/commit-messagebecame a 35-byte regular file reading../../.agents/skills/commit-message, and Claude Code would then see no skill (tested for the file, assumed for Claude Code). If a Windows teammate sees that, the fix is a real link or a copy. - Vendors. Claude Code and Codex both say they follow symlinked skill folders (documented: their skills pages, with no Windows condition I could find). WSL keeps the repository in the Linux file system, where links work (assumed).
What I did not test
- Folders under your home directory (
~/.claude/skills,~/.agents/skills): only project folders were tested. - Windows. Nothing ran there; the section above is documentation and my own translation. The clone test covers macOS and Linux only; see Windows and Linux.
- Skills with
scripts/orreferences/folders: my skills were a singleSKILL.md. - Whether a tool picks a skill on its own when the task only vaguely matches: my prompts named the topic.
- Other versions. I ran the versions above; newer ones may read more folders.
- Plugins, claude.ai and cloud sessions. Skills distributed that way follow other rules on the vendors’ pages, which I only read.