← All articles
Guide · 2026-11-09

Can the Same Skill Work Across Claude Code, Codex, and Cursor?

Published 2026-11-09 ·Mentions: Claude Code, Codex, Cursor
Can the Same Skill Work Across Claude Code, Codex, and Cursor?
The core format is portable: the structure of SKILL.md, the rules for name and description, and the conventions for scripts/references/assets all follow the same open standard across all three hosts. What is not portable lies in three outer layers: directory locations, frontmatter extension fields, and dynamic features in the body. This article compares them item by item and includes a migration checklist.

1. What Is Portable: The Standard Core

Files and structure are unified: a directory containing a SKILL.md, accompanied by three conventional folders—scripts/, references/, and assets/—is consistent across all three hosts. Referencing bundled files via relative paths and going only one level deep are also unified recommendations in the specification.

For core frontmatter fields, the specification defines only six: name and description are required, while license, compatibility, metadata, and allowed-tools are optional. The rules are all written in the specification—name is up to 64 characters, uses only lowercase letters, numbers, and hyphens, cannot start or end with a hyphen, and must match the directory name; description has a limit of 1024 characters and must clearly state both what it does and when to use it. A Skill that uses only these six fields is a portable Skill.

The loading mechanism is also consistent: all three use progressive disclosure—reading only name and description at startup (the specification estimates metadata at roughly 100 tokens), reading the full body only when a task matches (the specification recommends keeping the body within 5000 tokens and 500 lines), and reading bundled resources on demand. Therefore, writing habits are equally portable: state trigger scenarios clearly in the description, keep the body concise, and split long materials into references.

2. Non-Portable Layer One: Each Host Scans Its Own Directory Locations

For the exact same folder, the three hosts look in different places. Claude Code reads ~/.claude/skills/ and .claude/skills/ inside a project (along with enterprise directories, plugins, and sources such as --add-dir); Codex reads .agents/skills climbing upward from the current directory to the repository root, $HOME/.agents/skills in the home directory, and /etc/codex/skills at the machine level; Cursor reads .agents/skills and .cursor/skills inside a project as well as their home-directory counterparts, and also scans .claude/skills and .codex/skills for compatibility.

Practical consequence: .agents/skills currently sits in a neutral position—Codex reads it natively, and Cursor reads it too; Claude Code's official location table does not include this directory, so its copy goes into .claude/skills. A common practice in repositories is to keep the actual files in one place and point to them from the other using a symlink (both Claude Code's and Codex's documentation explicitly state that they follow symlinked skill directories) to avoid inconsistencies from editing two copies back and forth.

3. Non-Portable Layer Two: Frontmatter Extension Fields

Claude Code has the longest field list: when_to_use, argument-hint, arguments, disable-model-invocation, user-invocable, disallowed-tools, model, effort, context, agent, hooks, paths, and shell are all its extensions. It silently ignores unrecognized fields without throwing errors, so moving a Skill with extension fields to another host usually just results in missing functionality rather than breaking outright—still, for reliability, write with the standard six fields as your baseline.

Cursor's field list is short: besides name and description, it only has paths, disable-model-invocation, icon, color, and metadata, where icon and color are badge settings for its own Custom Mode and are not recognized elsewhere. Codex's SKILL.md only requires name and description, placing its invocation policies and UI metadata inside agents/openai.yaml in the skill directory—that file is specific to Codex and ChatGPT, is not part of standard frontmatter, can be ignored during migration, and leaving it in place does not affect other hosts reading the Skill.

There is one hard exception to keep in mind: when uploading a Skill to claude.ai or via the Skills API, only the specification's six fields are allowed—including any extra extension fields will directly cause an error during packaging or upload rather than being ignored. If the same Skill needs to be both used locally and uploaded, cap the frontmatter at the six fields.

4. Non-Portable Layer Three: Dynamic Features in the Body and Script Assumptions

Claude Code's body has three host-specific additions: $ARGUMENTS parameter substitution, variable substitution such as ${CLAUDE_SKILL_DIR}, and !`command` dynamic injection (executing a command locally before invocation and concatenating its output into the body). When moved to Codex and Cursor, these constructs are not executed and remain in the body as plain text—at best having no effect, and at worst confusing the Agent with literal strings. Search them out item by item during migration and replace them: ask for parameters in natural language inside the body, switch paths to relative paths, and rewrite injected commands as plain steps instructing the model to "run a script and read its output."

Scripts themselves are relatively easy to move: all three hosts allow bundled scripts referenced by relative path, without restricting the programming language. The real portability risk lies in environmental assumptions inside scripts—hardcoding a specific host's configuration directory, calling commands available only on one host, or assuming a specific working directory. The diagnostic rule is the same as in the security review article: wherever a path is hardcoded is where it will break during migration.

Invocation and management controls also differ per host: manual triggering uses /name in Claude Code and Cursor, and $name or the /skills menu in Codex; disabling an individual Skill uses skillOverrides and permission rules in Claude Code, a config.toml section in Codex, and Customize settings in Cursor. These belong to the usage layer and do not affect whether the Skill files themselves can be moved, though a team's operating handbook needs separate sections per host.

5. Migration Checklist

Step one, strip fields: keep only name, description, and any needed license, compatibility, metadata, and allowed-tools in frontmatter, checking every extension field one by one—once removed, does the Skill's core functionality still hold up?

Step two, place directories: put the canonical source in either .agents/skills or .claude/skills, and mirror it to the other host's directory using a symlink or build-time copy so there is only one source of truth, avoiding edits in one place being missed in the other.

Step three, scrub the body: search the full text for the three markers $ARGUMENTS, ${CLAUDE_, and !`, rewriting each into host-agnostic phrasing; clear out any absolute paths and host-specific commands inside scripts as well, replacing them with relative paths.

Step four, verify twice per host: in each host, run one manual invocation by name (to confirm it loads) and one real request (to confirm automatic triggering)—migration is complete only when both pass; if triggering is off, adjust description first, as it is the sole trigger surface shared by all three.

Step five, decide whether to fork: only when heavily reliant on a host's extensions—such as Claude Code's context: fork subagent execution and hooks, or Codex's openai.yaml UI configuration—is it worth maintaining a forked version; if you do fork, label the host in the directory name or metadata so the team does not grab the wrong one.

Tools mentioned

Coding & Development · Paid — Anthropic agentic terminal coding tool capable of autonomous multi-file edits, testing, and Git workflows.
Coding & Development · See official site — OpenAI's AI coding agent: parallel multi-agent coding and testing with continuous cloud execution across terminal, editor, and desktop.
Coding & Development · Free tier + paid — AI-first code editor built on VS Code with fast multi-line Tab predictions and codebase-wide Agent.

Sources

  1. Agent Skills
  2. docs.claude.com
  3. developers.openai.com
  4. cursor.com

This article is compiled from the public sources above and does not reproduce the originals in full; see the official sources for details.

Sign in to Lumo

Sign in with a one-time code sent to your email — no password. Your saved tools will sync across your devices.

The code is only used to sign you in. We store just your email and saved list (privacy policy, in Chinese).

—

Signed in. Your saved tools sync across all your devices.

0saved
View saved tools

Send feedback

Found a mistake, missing something, or have a suggestion? Tell us.