Use when adding new error messages to React, or seeing "unknown error code" warnings.
npx skills add barelyknown/agents-md-to-skills
Or install specific skill: npx add-skill https://github.com/barelyknown/agents-md-to-skills/tree/main/agents-md-to-skills
# Description
Convert AGENTS.md (or similar agent instruction docs) into reusable Codex skills. Use when asked to extract, split, or refactor AGENTS.md guidance into skill folders, or to create skills that replace sections of an AGENTS.md file.
# SKILL.md
name: agents-md-to-skills
description: Convert AGENTS.md (or similar agent instruction docs) into reusable Codex skills. Use when asked to extract, split, or refactor AGENTS.md guidance into skill folders, or to create skills that replace sections of an AGENTS.md file.
AGENTS.md to Skills
Turn long or mixed-purpose AGENTS.md guidance into focused, reusable skills that Codex can trigger automatically.
Workflow
- Locate the source instructions
- Find the AGENTS.md (or equivalent) file in the repo.
-
Ask which sections to convert if it is unclear or if the file is long.
-
Identify skill candidates
- Group content that describes a repeatable workflow, tool usage pattern, or domain-specific knowledge.
- Keep global constraints (security, testing, coding style) in AGENTS.md unless they are truly task-specific.
-
Prefer small, single-responsibility skills.
-
Propose a skill map
- For each candidate, propose a hyphen-case skill name and a one-line purpose.
-
Merge candidates only if they share the same trigger and steps.
-
Create each skill folder
- Create
.codex/skills/<skill-name>/in the target repo scope unless the user specifies another location. -
Add
SKILL.mdwith valid frontmatter (name + description only). -
Write triggers and instructions
- In
description, include both what the skill does and when to use it (trigger phrases or contexts). - In the body, write imperative, step-by-step guidance.
- Keep SKILL.md lean; move large reference material into
references/and link from SKILL.md. -
Avoid extra docs inside the skill (no README, changelog, or setup guides).
-
Update AGENTS.md
- Replace converted sections with short pointers to the skill (e.g., βUse $skill-name for
β). -
Keep only repository-wide rules and minimal navigation.
-
Validate
- Ensure
namematches the folder and uses lowercase letters, numbers, and hyphens only. - Keep
descriptionunder 1024 characters and single-line. - If available, run
skills-ref validateon the new skill folder(s).
Heuristics for what to extract
Extract into a skill when the section:
- Describes a multi-step process or checklist.
- Documents a tool workflow, command sequence, or API usage.
- Encodes team-specific conventions for a repeatable task.
- Is large enough to distract from global, repo-wide rules.
Keep in AGENTS.md when the section:
- Defines global policies (security, testing, style).
- Applies to every task regardless of type.
- Is a short reminder that does not justify a new skill.
SKILL.md template
---
name: <skill-name>
description: <what it does + when to use it>
---
<imperative instructions>
Output expectations
- New skill directories with valid
SKILL.mdfiles. - AGENTS.md updated to reference the skills.
- A brief summary of changes and any follow-up questions.
# README.md
agents-md-to-skills
A Codex skill that helps convert long or mixed-purpose AGENTS.md instructions into focused, reusable skills.
What it does
When invoked, the skill guides Codex to:
- Identify which parts of
AGENTS.mdshould become standalone skills - Create skill folders with valid
SKILL.mdfiles - Move task-specific guidance into those skills
- Update
AGENTS.mdto reference the new skills
Install
Install in Codex (recommended)
In the Codex CLI, run:
$skill-installer https://github.com/barelyknown/agents-md-to-skills/tree/main/agents-md-to-skills
Restart Codex after installing.
Manual install
Clone this repo, then copy the skill folder into a Codex skills directory:
# Repo-scoped (recommended for teams)
mkdir -p .codex/skills
cp -R agents-md-to-skills .codex/skills/
# User-scoped (applies across all repos)
mkdir -p ~/.codex/skills
cp -R agents-md-to-skills ~/.codex/skills/
Restart Codex after installing.
Use
In Codex, invoke the skill directly:
$agents-md-to-skills
Convert our AGENTS.md into skills and update the file to reference them.
Or ask naturally:
Please refactor this AGENTS.md into reusable skills.
Contents
agents-md-to-skills/
βββ SKILL.md
License
Add your preferred open-source license for this repo.
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.