Skip to content

Codex SKILL.md Template

A Codex skill packages instructions, resources, and optional scripts so Codex can follow a workflow reliably. It follows the Agent Skills open standard with progressive disclosure.

Where it lives

Repo (cwd)$CWD/.agents/skills/<name>/SKILL.md
User~/.agents/skills/<name>/SKILL.md
Admin/etc/codex/skills/<name>/SKILL.md

Codex selects the skill implicitly when the task matches the description, or you invoke it explicitly via /skills or a $ mention. Front-load the key use case and trigger words in the description.

Skill structure

structure
my-skill/
├── SKILL.md (required)
├── scripts/ (optional)
├── references/ (optional)
├── assets/ (optional)
└── agents/
└── openai.yaml (optional)

Copy the SKILL.md

SKILL.md
---
name: ci-failure-fix
description: Use when CI is red and the failure is a concrete, reproducible check. Do not use for flaky infrastructure or product decisions.
---
 
# CI Failure Fix
 
## When to Use This Skill
Use when CI is red and the failure is a concrete, reproducible check.
 
## When Not to Use This Skill
Do not use for flaky infrastructure, secrets issues, or product decisions.
 
## Workflow
1. Read the CI logs and identify the failing check.
2. Reproduce the failure locally.
3. Apply the smallest fix.
4. Re-run the full relevant suite.
5. Summarize the root cause.
 
## Validation
- The CI command passes locally.
- The same failing test now passes.
- No unrelated tests are skipped or deleted.
 
## Safety Rules
- Do not remove failing tests.
- Do not disable lint or type checks.
- Stop and escalate if blocked.
Customize it in the SKILL.md Generator

Good skill checklist

  • Front-load the key use case and trigger words in the description
  • Say clearly when the skill should and should not trigger
  • Keep the SKILL.md body short; move long material to references/
  • Make validation machine-checkable
  • Include explicit safety rules and an escalation condition

Sources