$npx -y skills add openai/codex --skill skill-creatorGuide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Codex's capabilities with specialized knowledge, workflows, or tool integrations.
| 1 | # Skill Creator |
| 2 | |
| 3 | This skill provides guidance for creating effective skills. |
| 4 | |
| 5 | ## About Skills |
| 6 | |
| 7 | Skills are modular, self-contained folders that extend Codex's capabilities by providing |
| 8 | specialized knowledge, workflows, and tools. Think of them as "onboarding guides" for specific |
| 9 | domains or tasks—they transform Codex from a general-purpose agent into a specialized agent |
| 10 | equipped with procedural knowledge that no model can fully possess. |
| 11 | |
| 12 | ### What Skills Provide |
| 13 | |
| 14 | 1. Specialized workflows - Multi-step procedures for specific domains |
| 15 | 2. Tool integrations - Instructions for working with specific file formats or APIs |
| 16 | 3. Domain expertise - Company-specific knowledge, schemas, business logic |
| 17 | 4. Bundled resources - Scripts, references, and assets for complex and repetitive tasks |
| 18 | |
| 19 | ## Core Principles |
| 20 | |
| 21 | ### Concise is Key |
| 22 | |
| 23 | The context window is a public good. Skills share the context window with everything else Codex needs: system prompt, conversation history, other Skills' metadata, and the actual user request. |
| 24 | |
| 25 | **Default assumption: Codex is already very smart.** Only add context Codex doesn't already have. Challenge each piece of information: "Does Codex really need this explanation?" and "Does this paragraph justify its token cost?" |
| 26 | |
| 27 | Prefer concise examples over verbose explanations. |
| 28 | |
| 29 | ### Set Appropriate Degrees of Freedom |
| 30 | |
| 31 | Match the level of specificity to the task's fragility and variability: |
| 32 | |
| 33 | **High freedom (text-based instructions)**: Use when multiple approaches are valid, decisions depend on context, or heuristics guide the approach. |
| 34 | |
| 35 | **Medium freedom (pseudocode or scripts with parameters)**: Use when a preferred pattern exists, some variation is acceptable, or configuration affects behavior. |
| 36 | |
| 37 | **Low freedom (specific scripts, few parameters)**: Use when operations are fragile and error-prone, consistency is critical, or a specific sequence must be followed. |
| 38 | |
| 39 | Think of Codex as exploring a path: a narrow bridge with cliffs needs specific guardrails (low freedom), while an open field allows many routes (high freedom). |
| 40 | |
| 41 | ### Protect Validation Integrity |
| 42 | |
| 43 | You may use subagents during iteration to validate whether a skill works on realistic tasks or whether a suspected problem is real. This is most useful when you want an independent pass on the skill's behavior, outputs, or failure modes after a revision. Only do this when it is possible to start new subagents. |
| 44 | |
| 45 | When using subagents for validation, treat that as an evaluation surface. The goal is to learn whether the skill generalizes, not whether another agent can reconstruct the answer from leaked context. |
| 46 | |
| 47 | Prefer raw artifacts such as example prompts, outputs, diffs, logs, or traces. Give the minimum task-local context needed to perform the validation. Avoid passing the intended answer, suspected bug, intended fix, or your prior conclusions unless the validation explicitly requires them. |
| 48 | |
| 49 | ### Anatomy of a Skill |
| 50 | |
| 51 | Every skill consists of a required SKILL.md file and optional bundled resources: |
| 52 | |
| 53 | ``` |
| 54 | skill-name/ |
| 55 | ├── SKILL.md (required) |
| 56 | │ ├── YAML frontmatter metadata (required) |
| 57 | │ │ ├── name: (required) |
| 58 | │ │ └── description: (required) |
| 59 | │ └── Markdown instructions (required) |
| 60 | ├── agents/ (recommended) |
| 61 | │ └── openai.yaml - UI metadata for skill lists and chips |
| 62 | └── Bundled Resources (optional) |
| 63 | ├── scripts/ - Executable code (Python/Bash/etc.) |
| 64 | ├── references/ - Documentation intended to be loaded into context as needed |
| 65 | └── assets/ - Files used in output (templates, icons, fonts, etc.) |
| 66 | ``` |
| 67 | |
| 68 | #### SKILL.md (required) |
| 69 | |
| 70 | Every SKILL.md consists of: |
| 71 | |
| 72 | - **Frontmatter** (YAML): Contains `name` and `description` fields. These are the only fields that Codex reads to determine when the skill gets used, thus it is very important to be clear and comprehensive in describing what the skill is, and when it should be used. |
| 73 | - **Body** (Markdown): Instructions and guidance for using the skill. Only loaded AFTER the skill triggers (if at all). |
| 74 | |
| 75 | #### Agents metadata (recommended) |
| 76 | |
| 77 | - UI-facing metadata for skill lists and chips |
| 78 | - Read references/openai_yaml.md before generating values and follow its descriptions and constraints |
| 79 | - Create: human-facing `display_name`, `short_description`, and `default_prompt` by reading the skill |
| 80 | - Generate deterministically by passing the values as `--interface key=value` to `scripts/generate_openai_yaml.py` or `scripts/init_skill.py` |
| 81 | - On updates: validate `agents/openai.yaml` still matches SKILL.md; regenerate if stale |
| 82 | - Only include other optional interface fields (icons, brand color) if explicitly provided |
| 83 | - See references/openai_yaml.md for field definitions and examples |
| 84 | |
| 85 | #### Bundled Resour |