Control Which Skills Load in Codex and Claude
To control which skills load, you configure the listing layer rather than the skill body. Codex exposes a context budget plus a config.toml switch; Claude Code exposes frontmatter flags, path globs and scope precedence. Both approaches decide what enters context, not what the skill does once it runs.
How Codex Decides Which Skills Load
Codex loads skills progressively. It starts with each skill's name, description and file path, and reads the full SKILL.md only after it selects that skill. That initial list is capped at roughly 2 percent of the model's context window, or 8,000 characters when the context window is unknown.
The cap has visible consequences. When many skills are installed, Codex shortens descriptions first, and for very large skill sets it may omit some skills from the initial list and show a warning. The budget applies only to the initial list; a selected skill's full instructions are still read. This is why a long, nuanced description can be truncated before it ever influences matching.
Codex shows the initial list so it can choose a skill without reading every file. That makes the description the only part you can optimize for discovery; the body is read after selection. A skill with a perfect body and a vague description behaves like a skill that does not exist.
Turn Skills Off in Codex Without Deleting Them
Codex reads disable rules from ~/.codex/config.toml. Each entry points at a SKILL.md file and flips a boolean:
[[skills.config]]
path = "/home/you/.agents/skills/linear/SKILL.md"
enabled = false
Restart Codex after editing the file. Deleting the folder also works, but the config entry keeps the files available for a later re-enable and leaves the skill's dependencies intact.
For finer control, add agents/openai.yaml to the skill directory. The optional policy.allow_implicit_invocation setting defaults to true; when set to false, Codex will not invoke the skill from a matching prompt, while an explicit $skill-name mention still works:
policy:
allow_implicit_invocation: false
That switch is per skill and travels with the folder, so a team can share a skill that stays manual-only by default.
Configuration is local, so a disable rule does not travel with the repository. If a team needs the same behavior everywhere, put the switch in the skill's agents/openai.yaml policy or remove the skill from the shared .agents/skills folder instead of relying on each user's config.
Control Which Skills Load in Claude Code with Frontmatter
Claude Code puts the decision in SKILL.md frontmatter. Two fields cover most cases. disable-model-invocation: true makes a skill manual-only, which suits workflows with side effects such as deploy or send-message steps. user-invocable: false hides a skill from the slash menu while still letting Claude load it as background knowledge.
The combination changes what enters context, not just who can call the skill. With default settings, the description is always in context and the full skill loads when invoked. With disable-model-invocation: true, the description is not kept in context at all. With user-invocable: false, the description stays in context but the skill is absent from the / menu.
Claude Code also supports a paths field that accepts glob patterns. When set, Claude loads the skill automatically only while working with files that match those patterns. This is the closest thing to scoping a skill to a directory tree, and it has no documented Codex equivalent.
Scope and Precedence Decide the Winner
Codex reads skills from four scopes: repository .agents/skills folders, the user folder $HOME/.agents/skills, the admin folder /etc/codex/skills, and skills bundled with Codex. If two skills share a name, Codex does not merge them; both can appear in the selector. That makes duplicate names a configuration problem rather than a silent override.
Claude Code resolves collisions with an explicit order: enterprise overrides personal, and personal overrides project. Plugin skills sit outside that ladder because they use a plugin-name:skill-name namespace, so they cannot collide with personal or project skills. If a skill and a legacy command share a name, the skill takes precedence.
The practical rule is to keep one definition per skill name per scope, and to prefer the narrowest scope that works. A repository-scoped skill travels with the code; a personal skill follows you across projects; a plugin skill is shared but namespaced.
Claude Code's nested discovery is another form of scoping. When you edit a file under packages/frontend/, Claude also looks for packages/frontend/.claude/skills/, so a monorepo can ship a skill that only activates inside that package.
Audit the List Before You Add More Skills
List the actual directories instead of trusting memory. In Codex, check ~/.agents/skills, the project .agents/skills, and any parent or root skill folders that apply. In Claude Code, check ~/.claude/skills, .claude/skills, and the plugin directories enabled for the session.
Then read the descriptions as the model sees them. Front-load the trigger words, keep the first sentence specific, and remember that Claude truncates the combined description and when_to_use text at 1,536 characters. A skill whose distinguishing detail appears after that cutoff is effectively generic.
Record the list you expect. A short note in the repository README listing installed skill names and their scopes prevents the slow drift where three people think three different copies are active. Review that note whenever a skill starts or stops matching without an obvious code change.
Finally, remove skills you no longer use rather than leaving them disabled forever. Fewer descriptions mean less pressure on the Codex budget and fewer near-duplicate matches in Claude. The Anthropic skills page and OpenAI skills page show the installable sets, and the install guide covers the rest of the setup.
FAQ
Yes. Add a [[skills.config]] entry in ~/.codex/config.toml with the path to the skill's SKILL.md and enabled = false, then restart Codex.
Set disable-model-invocation: true in the skill's frontmatter. You can still run it with /skill-name, but Claude will not load it on its own.
Codex caps the initial skill list at roughly 2 percent of the context window, or 8,000 characters when the window is unknown. It shortens descriptions first and may omit some skills with a warning.
Codex uses the config.toml enable switch plus the agents/openai.yaml invocation policy, while Claude Code uses disable-model-invocation, user-invocable and paths in the skill frontmatter.
Related Terms
- Context budget
- The portion of a model's context window reserved for the initial list of skill names and descriptions before any skill is activated.— OpenAI Codex documentation
- disable-model-invocation
- A Claude Code frontmatter flag that prevents Claude from loading a skill automatically while leaving manual invocation available.— Anthropic Claude Code documentation
- Skill precedence
- The rule that decides which definition wins when skills share a name across scopes, such as enterprise, personal and project.— Anthropic Claude Code documentation
Sources
- Agent Skills in Codex· OpenAI
- Extend Claude with skills· Anthropic
- Agent Skills specification· Agent Skills