codex icon indicating copy to clipboard operation
codex copied to clipboard

Support for SKILL.md files

Open carterworks opened this issue 2 months ago • 18 comments

What feature would you like to see?

https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills

Of course, I can just tell codex to read the SKILL.md file, but a more automatic indexing of the name and description from the frontmatter would be nice, too.

Additional information

At its simplest, a skill is a directory that contains a SKILL.md file. This file must start with YAML frontmatter that contains some required metadata: name and description. At startup, the agent pre-loads the name and description of every installed skill into its system prompt.

This metadata is the first level of progressive disclosure: it provides just enough information for Claude to know when each skill should be used without loading all of it into context. The actual body of this file is the second level of detail. If Claude thinks the skill is relevant to the current task, it will load the skill by reading its full SKILL.md into context.

As skills grow in complexity, they may contain too much context to fit into a single SKILL.md, or context that’s relevant only in specific scenarios. In these cases, skills can bundle additional files within the skill directory and reference them by name from SKILL.md. These additional linked files are the third level (and beyond) of detail, which Claude can choose to navigate and discover only as needed. … Skills can also include code for Claude to execute as tools at its discretion.

carterworks avatar Oct 17 '25 16:10 carterworks

Right now codex cli lacks the ability to encapsulate a 'skill' into it's own context. Currently the industry have solved this with sub agents, or Claudes recent 'skills' addition.

Say I have an agent that I want to access various analytic tools like Google Analytics, Google Search Console, Git etc. Right now there are a few ways to allow codex cli to have do this. I can:

  • Add them as mcps (with full api wrapper), but this pollutes the context when not all requests need to use these features
  • Add api wrappers as code that the cli can run. This works but unfortunately once pulled into the main context it persists there. It's also a bit slower because codex will need to take many steps to understand how to achieve this goal.
  • Create MCP's that are coordinators/sub agents of their own that then use their an agent workflow + tools to achieve access to the api. E.g. I can use an MCP that takes in an analytics question then uses an OpenAI Agents SDK workflow to make the API requests and return the output back to codex cli. This works great but involves a separate API key, development etc, so it's not optimal.

The optimal solution would be a native way to separate context for domain specific tasks (e.g. sub agents / skills). That way I can hand over a question to a domain specific sub agent or skill feature, and it can complete the request without bloating context, and it's easy to develop, while also not needed external api keys / agent sdks.

Would love to see this in codex cli!

patrickp2 avatar Oct 20 '25 13:10 patrickp2

I put together a first prototype of a Codex CLI bootstrap for skills today. It requires adding a couple of lines to AGENTS.md, but GPT5-Codex really likes to follow instructions. ;)

https://blog.fsck.com/2025/10/27/skills-for-openai-codex/

obra avatar Oct 28 '25 05:10 obra

I made a tool and GitHub Action that does something similar, automatically compiling the skills and adding them to AGENTS.md, for use by any agent: https://github.com/dave1010/skills-to-agents

skills-to-agents is effective, even if it's not the optimal solution of having first class support for Skills in Codex.

More info: https://dave.engineer/blog/2025/11/skills-to-agents/

dave1010 avatar Nov 01 '25 11:11 dave1010

Here another claude-to-codex skills

https://www.robert-glaser.de/claude-skills-in-codex-cli/

mahdialibi avatar Nov 01 '25 22:11 mahdialibi

I reverse engineered how Anthropic implemented skills and built an exact copy based MCP: klaudwors/universal-skills. I diffed the API requests to Anthropic's API and it's basically the same: A "skill" tool is injected into the API request to Anthropic. Works great with codex and can be installed as follows:

codex mcp add skills -- npx universal-skills mcp
Image

klaudworks avatar Nov 04 '25 13:11 klaudworks

Dropping this plug as it appears you can also use https://github.com/numman-ali/openskills to help out with leveraging skills. Although, support directly by OpenAI Codex would be optimal in this case to avoid having folks create their own solutions.

BA-CalderonMorales avatar Nov 05 '25 18:11 BA-CalderonMorales

Openskills generally works. This implementation is better though: universal-skills. If you are interested in the details check out the: FAQs

klaudworks avatar Nov 05 '25 21:11 klaudworks

I'm building a POC to create a universal agent rule system that allows various agents (e.g., Codex, Claude Code) to automatically discover /rules and /skills under the .agents folder.

https://github.com/leochiu-a/universal-agents

The reference layout is inspired by Claude Code’s “skills” and Cursor’s “rules”:

.agents/
  skills/
    code-review/
      SKILL.md
  rules/
    api-guideline.md
    react-components-guideline.md
AGENTS.md

The AGENTS.md file defines the execution protocol, for example:

1. **Always read this file** before starting a task to understand which skills or rules to load from `.agents/`.
2. **Skills**:
   - Load a skill only if its trigger condition matches the task. For example, code-review tasks must load `skills/code-review/SKILL.md`.
   - Once loaded, follow the process and output format defined in the skill file so that the final response remains consistent.
3. **Rules**:
   - Rules are long-lived constraints (API guidelines, React component practices, etc.). Whenever a task touches those domains, read the corresponding file under `.agents/rules/`.
   - Treat these rules as required context: preload them before drafting any response and ensure all recommendations comply with them.
4. **Response contract**:
   - Explicitly state which skills and rules are in effect.
   - Provide findings, recommendations, or code while enforcing all loaded constraints. If any conflicts arise, ask for clarification before diverging.

This way, both Codex and Claude Code can understand and operate using the same skills and rules framework.

leochiu-a avatar Nov 14 '25 08:11 leochiu-a

whats your motivation behind using rules and skills at the same time? In your example, why not have an api-guideline skill?

klaudworks avatar Nov 14 '25 11:11 klaudworks

whats your motivation behind using rules and skills at the same time? In your example, why not have an api-guideline skill?

@klaudworks

Skills and rules are different concepts:

  • Skills: Like functions — they let the AI agent execute specific actions.
  • Rules: Like conventions — they inform the AI agent about the guidelines of the codebase.

leochiu-a avatar Nov 16 '25 09:11 leochiu-a

I referenced openspec and universal-skills to build ccski.
codex mcp add skills -- npx ccski mcp

It also supports the skills you installed via the Claude plugin.
Built-in CLI tools make it easy to manage and install local skills:
npx ccski list/install/enable/disable

Image

Gaubee avatar Nov 25 '25 04:11 Gaubee

@Gaubee whats the difference to klaudworks/universal-skills?

klaudworks avatar Nov 25 '25 07:11 klaudworks

I also created a Rust MCP project to address this issue, slightly different focus over some of previously mentioned projects as it's meant to sync claude skills into ~/.codex/skills-mirror/ while additionally allowing for codex specific skills within ~/.codex/skills. I implemented an autoload-snippet tool to return JSON with additionalContext containing the rendered bundle. Codex appends that string to the model prompt immediately after it receives the tool result. The Codex client calls the autoload-snippet MCP tool before responding to each user message, which is accomplished by appending an explicit instruction to ~/.codex/AGENTS.md to do so.

Ultimately it would be awesome if codex could just support this functionality so we all don't end up reinventing the wheel :) athola/skrills

athola avatar Nov 25 '25 08:11 athola

@Gaubee whats the difference to klaudworks/universal-skills?

As shown in the image, it now supports Claude plugin skills.
Many of my skills were installed via claude plugin install to marketplaces, whereas universal-skills only recognizes project skills and user skills—plugin skills are left out.

Gaubee avatar Nov 25 '25 13:11 Gaubee

You can just specify additional directories to load skills from in klaudworks/universal-skills

klaudworks avatar Nov 25 '25 17:11 klaudworks

ccski 2.x - Unified SKILL.md manager for Claude Code + Codex

Sharing an update on ccski, which now deeply integrates Claude Code Skills and Codex Skills into a single MCP-first tool.

Core pain points solved:

  • unified skill discovery across agents: ccski scans .claude/skills, .codex/skills, and plugin marketplaces in one registry
  • install/toggle workflow: ccski install from git/marketplace/file; ccski enable/disable via filesystem rename

What's in 2.x:

  • Deep Claude + Codex fusion: unified discovery, shared filters, cross-agent MCP serving
  • ccski install <source> - git repos, marketplace.json, single SKILL.md, with caching and conflict detection
  • ccski enable/disable - toggle skills via .SKILL.md rename (filesystem as truth)
  • Interactive pickers with copyable one-shot commands; --json for automation

Quick start for Codex:

codex mcp add skills -- npx ccski mcp --exclude=codex

Quick start for Claude Code:

claude mcp add skills -- npx ccski mcp --exclude=claude

For other Agents:

your-cli-agents mcp add skills -- npx ccski mcp

Repo: https://github.com/jixoai/ccski

Gaubee avatar Dec 10 '25 09:12 Gaubee

this appears to now be supported! https://github.com/openai/codex/pull/7412

can read a well-written blog piece on this here: https://simonwillison.net/2025/Dec/12/openai-skills/

I updated athola/skrills to account for this update - it now primarily validates skills, analyzes for performance and optimization purposes, and syncs bidirectionally between Claude Code and Codex. So if you have a bunch of skills/commands/subagents you want to transfer from Claude to Codex or vice versa.

athola avatar Dec 14 '25 08:12 athola

We officially announced support today for skills. You can read about it in the codex documentation.

etraut-openai avatar Dec 19 '25 21:12 etraut-openai