Configure Skill Invocation
Accept one optional scope argument: global or project.
Workflow
Resolve the scope.
- Use
globalorprojectwhen supplied. - With no scope, ask only, "Configure project or global skills?" Then wait for the answer.
- For any other value, ask the user to choose
globalorproject.
- Use
Discover every
SKILL.mdin scope with read-only shell commands. Preferrg --files --follow; use an equivalent command when unavailable. Support nested category directories, skip hidden directories such as.system, and deduplicate symlinks by real path.Inspect each skill's
SKILL.mdfrontmatter andagents/openai.yaml. A skill is a candidate when either target value is missing or different:# SKILL.md frontmatter disable-model-invocation: true# agents/openai.yaml policy: allow_implicit_invocation: falseReport skills that cannot be parsed reliably as invalid and leave them unchanged.
Present every candidate in one selection. Show each name, path, and missing or conflicting setting. Show invalid skills separately and make them unselectable. Use a structured multi-select when available; otherwise accept numbers, names,
all, ornone. Require an explicit selection and wait for the answer. If no candidates exist, report that and finish.Modify only the selected skills, completing all writes in one pass:
- Add or correct top-level
disable-model-invocation: truein theSKILL.mdfrontmatter. - Create
agents/openai.yamlwhen absent. Otherwise add or correct onlypolicy.allow_implicit_invocation: false, preserving every otherinterface,policy,dependencies, comment, and formatting choice. - Use the available file-editing tools or safe shell commands. The changed-file set must match the user's selection exactly.
- Add or correct top-level
Re-read every selected file and confirm both target values. Scan again and confirm selected skills are no longer candidates. Report modified, unchanged, and invalid skills, then finish this skill invocation.
Scope
global: scan~/.agents/skillsand${CODEX_HOME:-$HOME/.codex}/skills.project: locate the Git root from the current directory, then scan.agents/skillsand.codex/skillswithin it. Use the current directory when outside Git.