From 3ec95126dfff37879167a1c11054ad8cd79cbe3c Mon Sep 17 00:00:00 2001 From: xl-openai Date: Mon, 16 Mar 2026 11:48:37 -0700 Subject: [PATCH 1/2] skill-creator: default new skills to ~/.codex/skills --- .../skills/src/assets/samples/skill-creator/SKILL.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/codex-rs/skills/src/assets/samples/skill-creator/SKILL.md b/codex-rs/skills/src/assets/samples/skill-creator/SKILL.md index 5672731693bd..da1bcafb51f8 100644 --- a/codex-rs/skills/src/assets/samples/skill-creator/SKILL.md +++ b/codex-rs/skills/src/assets/samples/skill-creator/SKILL.md @@ -253,6 +253,7 @@ For example, when building an image-editor skill, relevant questions include: - "Can you give some examples of how this skill would be used?" - "I can imagine users asking for things like 'Remove the red-eye from this image' or 'Rotate this image'. Are there other ways you imagine this skill being used?" - "What would a user say that should trigger this skill?" +- "Where should I create this skill? If you do not have a preference, I will place it in ~/.codex/skills so Codex can discover it automatically." To avoid overwhelming users, avoid asking too many questions in a single message. Start with the most important questions and follow up as needed for better effectiveness. @@ -288,6 +289,8 @@ At this point, it is time to actually create the skill. Skip this step only if the skill being developed already exists. In this case, continue to the next step. +Before running `init_skill.py`, ask where the user wants the skill created. If they do not specify a location, default to `~/.codex/skills` (equivalently `$CODEX_HOME/skills`) so the skill is auto-discovered. + When creating a new skill from scratch, always run the `init_skill.py` script. The script conveniently generates a new template skill directory that automatically includes everything a skill requires, making the skill creation process much more efficient and reliable. Usage: @@ -299,9 +302,9 @@ scripts/init_skill.py --path [--resources script Examples: ```bash -scripts/init_skill.py my-skill --path skills/public -scripts/init_skill.py my-skill --path skills/public --resources scripts,references -scripts/init_skill.py my-skill --path skills/public --resources scripts --examples +scripts/init_skill.py my-skill --path ~/.codex/skills +scripts/init_skill.py my-skill --path ~/.codex/skills --resources scripts,references +scripts/init_skill.py my-skill --path ~/work/skills --resources scripts --examples ``` The script: From f9a1a93e1f5f2ac28e2a9084a5ccb35721255e4a Mon Sep 17 00:00:00 2001 From: xl-openai Date: Mon, 16 Mar 2026 16:14:05 -0700 Subject: [PATCH 2/2] skill-creator: default path to CODEX_HOME skills dir --- codex-rs/skills/src/assets/samples/skill-creator/SKILL.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/codex-rs/skills/src/assets/samples/skill-creator/SKILL.md b/codex-rs/skills/src/assets/samples/skill-creator/SKILL.md index da1bcafb51f8..57f4e58b10ce 100644 --- a/codex-rs/skills/src/assets/samples/skill-creator/SKILL.md +++ b/codex-rs/skills/src/assets/samples/skill-creator/SKILL.md @@ -253,7 +253,7 @@ For example, when building an image-editor skill, relevant questions include: - "Can you give some examples of how this skill would be used?" - "I can imagine users asking for things like 'Remove the red-eye from this image' or 'Rotate this image'. Are there other ways you imagine this skill being used?" - "What would a user say that should trigger this skill?" -- "Where should I create this skill? If you do not have a preference, I will place it in ~/.codex/skills so Codex can discover it automatically." +- "Where should I create this skill? If you do not have a preference, I will place it in `$CODEX_HOME/skills` (or `~/.codex/skills` when `CODEX_HOME` is unset) so Codex can discover it automatically." To avoid overwhelming users, avoid asking too many questions in a single message. Start with the most important questions and follow up as needed for better effectiveness. @@ -289,7 +289,7 @@ At this point, it is time to actually create the skill. Skip this step only if the skill being developed already exists. In this case, continue to the next step. -Before running `init_skill.py`, ask where the user wants the skill created. If they do not specify a location, default to `~/.codex/skills` (equivalently `$CODEX_HOME/skills`) so the skill is auto-discovered. +Before running `init_skill.py`, ask where the user wants the skill created. If they do not specify a location, default to `$CODEX_HOME/skills`; when `CODEX_HOME` is unset, fall back to `~/.codex/skills` so the skill is auto-discovered. When creating a new skill from scratch, always run the `init_skill.py` script. The script conveniently generates a new template skill directory that automatically includes everything a skill requires, making the skill creation process much more efficient and reliable. @@ -302,8 +302,8 @@ scripts/init_skill.py --path [--resources script Examples: ```bash -scripts/init_skill.py my-skill --path ~/.codex/skills -scripts/init_skill.py my-skill --path ~/.codex/skills --resources scripts,references +scripts/init_skill.py my-skill --path "${CODEX_HOME:-$HOME/.codex}/skills" +scripts/init_skill.py my-skill --path "${CODEX_HOME:-$HOME/.codex}/skills" --resources scripts,references scripts/init_skill.py my-skill --path ~/work/skills --resources scripts --examples ```