skill-creator: default new skills to ~/.codex/skills#14837
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3ec95126df
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| 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. |
There was a problem hiding this comment.
Resolve default skill path from CODEX_HOME
Do not treat ~/.codex/skills as equivalent to $CODEX_HOME/skills. If a user sets CODEX_HOME to a custom directory, this instruction creates skills in a different location that may not be auto-discovered. The default guidance should derive from CODEX_HOME (or explicitly fall back to ~/.codex) instead of hardcoding ~/.codex/skills.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Summary
- Updated the skill-creator prompt and setup guidance so the default install path is derived from
$CODEX_HOME/skills, with~/.codex/skillsonly as the fallback whenCODEX_HOMEis unset. codex-rs/skills/src/assets/samples/skill-creator/SKILL.mdL256-L292 - Updated the
init_skill.pyexamples to use--path "${CODEX_HOME:-$HOME/.codex}/skills"so the examples match the same precedence/fallback behavior. codex-rs/skills/src/assets/samples/skill-creator/SKILL.mdL305-L307 - Committed the change (
187a415) and created a follow-up PR with title “Follow-up: resolve skill-creator default path via CODEX_HOME”.
Testing
- ✅
cargo test -p codex-skills ⚠️ python - <<'PY' ... urllib.request.urlopen('https://duckduckgo.com/html/?q=...') ... PY(web search attempt failed in this environment with403 Forbidden)⚠️ curl -fsSL 'https://r.jina.ai/http://duckduckgo.com/?q=bash+parameter+expansion+default+value+unset' | head -n 40(web search proxy returned403)
Motivation
skill-creatorinstructions explicit about the recommended default (~/.codex/skills/$CODEX_HOME/skills) so the agent and users follow a consistent, discoverable convention.Description
codex-rs/skills/src/assets/samples/skill-creator/SKILL.mdto add a user prompt: "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.".init_skill.pythat if the user does not specify a location, the agent should default to~/.codex/skills(equivalently$CODEX_HOME/skills) for auto-discovery.init_skill.pyexamples in the sameSKILL.mdto use~/.codex/skillsas the recommended default while keeping one custom path example.Testing
cargo test -p codex-skillsand the crate's unit test suite passed (1 passed; 0 failed).codex-rs/utils/home-dir/src/lib.rs(find_codex_homedefaults to~/.codex) andcodex-rs/core/src/skills/loader.rs(user skill roots include$CODEX_HOME/skills).Codex Task