Read this first. Claude Code, Codex, and OpenCode all claim to load skills, yet a folder copied from one product's screenshot is often missing from the other two menus. The steps below were checked against the vendor docs on 24 November 2026. They take one skill from an empty directory to a named invocation in each tool, and they keep the three directory layouts, the precedence rules, and the off switches separate.
A skill stores a procedure, not another model
A skill is a directory that contains a file named exactly SKILL.md. The host reads the name and the description first, and it loads the procedure only after it selects that skill. A long checklist therefore does not occupy the start of every session. The file does not swap the model and it does not change the invoice. Claude Code still uses the Anthropic login, Codex still uses the OpenAI login, and OpenCode still uses the provider you already configured.
That is a different layer from the note that rides along with every session. CLAUDE.md and rules files belong in the context every time, which makes them the right place for "this repository must never do that." A skill is the right place for "here is how to do this one job." The split is already written up in how rules and skills divide the work. This page does not redraw that table. It installs one skill into three terminals.
Do not mix this file up with a packaged catalog. Everything Claude Code is a bundle of agents, skills, and hooks, and its install path is a plugin. This page writes one skill of your own. A graph of the repository is a different command, covered in the Graphify install. If the login is not finished, start with how to sign up for Claude Code and run it once. This page starts when claude, codex, and opencode each print a version in the shell.
| Host | Personal folder, every repo | Project folder, safe to commit | Named invocation |
|---|---|---|---|
| Claude Code | ~/.claude/skills/diff-risk/SKILL.md |
.claude/skills/diff-risk/SKILL.md |
/diff-risk |
| Codex | ~/.agents/skills/diff-risk/SKILL.md |
.agents/skills/diff-risk/SKILL.md |
$diff-risk |
| OpenCode | Reads both personal folders above. Its own global folder is ~/.config/opencode/skills/ |
Reads both project folders above. Its own project folder is .opencode/skills/ |
@diff-risk |
The sources checked on 24 November 2026 are the Claude Code skills document, the ChatGPT Learn page Build skills, and the OpenCode skills page. All three agree that one file loads on demand. They do not agree on directories or on the character you type to call the skill. An empty menu after you follow another product's screenshot is the expected result, not a broken install.
Write one SKILL.md all three can read
The directory name becomes the Claude Code slash command, and it becomes the OpenCode skill id. Codex requires both name and description in the frontmatter. Use diff-risk in all three places so the menu label and the invocation stay the same word. Do not name the directory synced. Claude Code reserves that folder for skills downloaded from claude.ai, and a skill you author under that name is skipped.
Do not depend on the Claude Code-only line that runs a shell command before the model sees the file. Codex and OpenCode do not document that injection. The portable instruction tells the agent to run git diff HEAD itself. The HEAD argument is what makes staged files visible. A bare git diff hides the index and then reports that nothing changed.
mkdir -p ~/.agents/skills/diff-risk claude --version codex --version opencode --version
If any of those three prints command not found, install and sign in to that CLI first. A skill file is not a login. After each binary prints a version, save the following as ~/.agents/skills/diff-risk/SKILL.md. The filename has to match that spelling, including the capitals.
--- name: diff-risk description: Summarize uncommitted changes and name the risks. Use when the user asks what changed, asks for a commit message, or asks for a diff review. Do not use when the user only asks how to write a function. --- ## Steps 1. Run git diff HEAD in the current repository. Do not edit files. Do not commit. 2. In two or three bullets, name the files that moved and what the edit was for. 3. List risks: missing error handling, hardcoded values, tests that were not updated. If none, say none. 4. If the diff is empty, say there are no uncommitted changes. Do not invent a filename.
The description needs a trigger and a boundary
All three hosts decide automatic use from description. "Handles git" will also fire when you ask how a function works. Say when to use it, and say when not to.
Claude Code: the personal folder and a slash command
Claude Code does not scan ~/.agents/skills. A personal skill belongs at ~/.claude/skills/<folder>/SKILL.md. A project skill belongs at .claude/skills/ in the repository. When the same name exists in both, the personal folder wins, so /diff-risk runs the copy in your home directory. Cloud sessions and Cowork do not read ~/.claude/skills on the machine in front of you. A skill that exists only at home is reported missing when a cloud task calls it. For a cloud task, commit the same file under .claude/skills/ in the repository.
mkdir -p ~/.claude/skills rm -rf ~/.claude/skills/diff-risk cp -R ~/.agents/skills/diff-risk ~/.claude/skills/
Open a new session and run claude. A session that was already open does not grow a new slash entry in the middle of the conversation. Type /skills first. diff-risk should be on the list. Then type /diff-risk, or ask what changed. Both routes should follow the same steps. If you want the slash command and you do not want automatic selection, add disable-model-invocation: true to the frontmatter. The slash command still works.
Codex: the user folder, $, and how to turn it off
Codex user skills live in $HOME/.agents/skills. Repository skills live in .agents/skills from the directory where you launched Codex, upward through parent directories, and at the repository root. A shared machine location is /etc/codex/skills. The bundled skill-creator and skill-installer are system skills, not this file. Codex does not merge two skills that share a name. Both can show up in the picker, so do not keep two different diff-risk copies, one at home and one in the repo.
Codex follows a symlinked skill folder, and it notices file changes on its own. If the list stays empty, quit and start Codex again. Call the skill with $diff-risk, or open /skills first. A matching description can also select it without the dollar sign. For the first proof, do not trust that automatic path. Use the dollar sign so you know the file was read.
Curated skills can be added with $skill-installer, for example the linear skill in the vendor's own example. That download is someone else's directory. It is not the file you just wrote. If the menu is still empty after the installer runs, read the path that turn printed before you copy anything by hand. Do not invent a second home directory from memory.
To disable a skill without deleting it, add one entry to ~/.codex/config.toml. The path has to be the SKILL.md file, not the folder that contains it. Restart Codex after the edit. Each entry uses one selector, either path or name, not both. When several entries match, the later one wins.
[[skills.config]] path = "/replace-with-your-home/.agents/skills/diff-risk/SKILL.md" enabled = false
If you only want to block automatic selection and you still want $diff-risk to work, do not set enabled to false. Add agents/openai.yaml inside the skill directory and set policy.allow_implicit_invocation to false. The initial list has a budget too. By default it uses at most 2 percent of the context window, or 8,000 characters when the window size is unknown. When many skills are installed, descriptions are shortened first, and a trigger that you wrote at the end of the description stops matching. skills.max_context_tokens can raise that cap to 10,000 tokens. The budget limits the list only. Once a skill is selected, Codex still reads the full instructions.
OpenCode: compatible folders and @
OpenCode has no separate install command for a local skill. It scans ~/.config/opencode/skills, and it also scans the compatible folders ~/.claude/skills and ~/.agents/skills. In a project it scans .opencode/skills, plus .claude/skills and .agents/skills. The file you already placed at ~/.agents/skills/diff-risk is therefore visible. A third copy is not required.
The skill id comes from the path, not from the name field. diff-risk/SKILL.md has the id diff-risk. If the file sits at teams/diff-risk/SKILL.md, the id becomes the inner folder name and @diff-risk will not match. A skill with no description is not advertised to the model. You call it with @diff-risk. When the model calls it, OpenCode uses the built-in skill tool and passes that id.
When two sources share an id, the source registered later wins. The order is built-in skills, then .claude, then .agents, then ~/.config/opencode/skills, then .opencode/skills in the project, then any extra directories listed in opencode.json. A project file at .opencode/skills/diff-risk hides the home copy. An empty directory with the same id in the project means the home file is not the one that loads. Do not make a different copy for each tool just to fill every folder.
To keep the skill out of the advertised list and still call it with @diff-risk, set metadata.opencode/autoinvoke to false. disable-model-invocation: true has the same kind of effect. If both are set, opencode/autoinvoke wins. Restart OpenCode after the edit. A permission rule of deny also hides the skill. That rule lives in opencode.json under the skill action, and it is not a wrong folder.
When it enters the repo, keep a single source
Do not commit the skill until the home copies work. After they work, the team should share one source in the repository, not three copies that drift. Codex and OpenCode both read .agents/skills/diff-risk/. Claude Code wants .claude/skills/diff-risk/. Commit .agents/skills/diff-risk/SKILL.md as the source, then copy it into the Claude project folder. Later edits start in the source and get copied again. If the two files diverge, Claude runs a different checklist from the other two, and the failure looks like a random menu bug.
mkdir -p .agents/skills .claude/skills rm -rf .agents/skills/diff-risk .claude/skills/diff-risk cp -R ~/.agents/skills/diff-risk .agents/skills/ cp -R .agents/skills/diff-risk .claude/skills/
Codex follows a symlink and treats the target as the skill. Pointing .claude/skills/diff-risk at .agents/skills/diff-risk does not create a second Codex skill by itself. If OpenCode sees both sources, the later .agents registration overrides .claude. Identical contents mean the override does not change the steps. A cloud Claude session reads .claude/skills from the repository, not the home directory on your laptop. A symlink that points at a home path on a machine the cloud task cannot see still resolves as missing. Commit the real file for that session.
OpenCode can also take extra directories, or an HTTP catalog with an index.json, from the skills array in opencode.json. That is a distribution channel. The first successful run does not need it. The exercise on this page stops at local files.
First real task: change one line and read the reply
Use a temporary repository so the first invocation does not land on a production branch. The five lines below create one unstaged addition. The commit message init is enough. The skill is not supposed to rewrite that history.
mkdir -p /tmp/diff-risk-demo && cd /tmp/diff-risk-demo git init echo "hello" > note.txt git add note.txt && git commit -m "init" echo "hello world" >> note.txt
Start each CLI in that directory. In Claude Code type /diff-risk. In Codex type $diff-risk. In OpenCode type @diff-risk. The reply should be two or three bullets that name note.txt and should say there is no test to update. It should not edit the file and it should not create another commit. If it starts editing, the line that forbids edits was not in the file that got loaded, or another skill with the same name was loaded instead.
Then run git checkout -- note.txt and invoke the skill again. The reply should say there are no uncommitted changes, and it should not invent a filename. That second call checks that the empty-diff step is in the skill, rather than the model improvising. The skill is installed only when all three tools match both replies. If only one tool matches, go back to that tool's directory. Do not edit the instructions yet.
The skill runs git on the machine where the CLI is running. When the laptop lid closes, the session and the uncommitted diff stop together. A long repository task needs the CLIs and the repository on a Mac that stays awake. The inference layer next to that machine is a separate decision, described in the private inference layer. It does not replace SKILL.md.
If the menu is empty, check in this order
- The filename. It has to be
SKILL.md.skill.mdorSKILL.MDis not a skill directory to any of the three. - The folder. Claude Code reads
~/.claude/skills. Codex reads~/.agents/skills. OpenCode reads both. The empty menu belongs to the host whose folder you missed. - The session. Claude Code needs a new session. Codex usually notices the file; if it does not, restart it. Reopen OpenCode after an edit.
- The description. Codex ignores the file as a skill when
nameordescriptionis missing. OpenCode does not advertise a skill that has no description. - A second copy. Claude Code's personal folder beats the project folder. OpenCode's project
.opencode/skillsbeats the home folder. Codex lists both names, and the one you picked may not be the file you just wrote. - A switch. Codex
enabled = false, OpenCodeautoinvoke: false, and Claude Codedisable-model-invocationall stop the "just ask" path. A named call should still work, except for the Codexenabled = falseentry, which turns the whole skill off.
Do not infer the handwritten path from the installer
The path $skill-installer prints belongs to the download. The file you wrote still belongs in ~/.agents/skills. Two copies with the same name are both listed by Codex.
Who should stop here, and who should read a different page
If you paste the same checklist into the chat every day, put that checklist in this directory and accept it with the temporary repository above. If the question will not be asked again, you do not need a skill. If you want hundreds of skills and hooks in one install, read the ECC page instead of stretching these four steps into a framework. If you want the model to see module relationships before it sees a diff, read the Graphify page. Rules still carry the bans that must hold on every turn. A ban written only inside a skill appears only when that skill is selected.
If none of the three CLIs is signed in, the copy commands on this page will not create a menu entry. Get a version string first. A cloud Claude task has to read .claude/skills from the repository. A copy that exists only in the laptop home directory is not enough for that task.
Questions
Does a free chat account run this skill? The file itself has no separate fee. Claude Code, Codex, and OpenCode each have to start and be signed in on this machine. The plan you need is whatever that vendor's pricing page says today. This page does not freeze a tier.
Why copy one file into two directories? Claude Code does not read .agents/skills. Codex does not read .claude/skills. OpenCode reads both. Keep the source under .agents and copy it for Claude, so the three tools do not each grow a private edit.
Can the description fire the skill with no slash, dollar sign, or @? Yes, but do not use that as the first proof. Automatic selection depends on whether the description was shortened, whether a switch is off, and whether another file shares the name. After the named call works, ask what changed and see whether the skill is selected on its own.
Is this the same file as Cursor rules? No. Rules load on every session. This skill loads on demand, and its directory is not .cursor/rules. The comparison sits on the rules-and-skills page.
Why does a cloud session say the skill is missing? Cloud Claude does not read ~/.claude/skills on your laptop. Commit .claude/skills/diff-risk so that task loads the skill from the repository.
ZavCloud Cloud Mac
The skill reads git on this machine
A closed laptop has no diff
Put the three CLIs and the repository on a Mac that stays awake, and diff-risk sees the uncommitted change you actually left.