codex - 💡(How to fix) Fix Support skill filtering for project-local skills.config entries [3 comments, 4 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#20210Fetched 2026-04-30 06:31:54
View on GitHub
Comments
3
Participants
4
Timeline
11
Reactions
0
Author
Timeline (top)
labeled ×5commented ×3unlabeled ×2renamed ×1

Root Cause

The docs describe project-local configuration as a configuration layer, and the skills docs describe skills.config as the mechanism for enabling/disabling skills. Users naturally expect those two features to compose.

Selective project-level skill filtering is useful for keeping prompts smaller and avoiding irrelevant automatic skill triggers without losing globally installed skills in other repositories.

Fix Action

Fix / Workaround

As a partial workaround, this project-local config does work:

Code Example

# <repo>/.codex/config.toml
[[skills.config]]
name = "codebase-to-course"
enabled = false

---

# <repo>/.codex/config.toml
[[skills.config]]
path = "/Users/me/.codex/skills/codebase-to-course/SKILL.md"
enabled = false

---

codex debug prompt-input 'test skill visibility' | rg 'codebase-to-course'

---

codex debug prompt-input \
  -c 'skills.config=[{name="codebase-to-course", enabled=false}]' \
  'test skill visibility' | rg 'codebase-to-course'

---

[skills]
include_instructions = false

---

if !matches!(
    layer.name,
    ConfigLayerSource::User { .. } | ConfigLayerSource::SessionFlags
) {
    continue;
}
RAW_BUFFERClick to expand / collapse

What version of Codex is running?

codex-cli 0.125.0

Which platform / environment?

macOS, Codex CLI installed via npm (@openai/codex).

What happened?

Project-local .codex/config.toml is loaded for normal project configuration, but [[skills.config]] entries in that project config do not affect the model-visible skills list.

This makes it impossible to selectively disable globally installed skills for one repository while keeping them available in other repositories.

For example, this project-local config does not hide codebase-to-course:

# <repo>/.codex/config.toml
[[skills.config]]
name = "codebase-to-course"
enabled = false

Nor does the path selector variant:

# <repo>/.codex/config.toml
[[skills.config]]
path = "/Users/me/.codex/skills/codebase-to-course/SKILL.md"
enabled = false

Running:

codex debug prompt-input 'test skill visibility' | rg 'codebase-to-course'

still shows the skill in <skills_instructions>.

However, the same setting does work when provided from the user config or from session flags:

codex debug prompt-input \
  -c 'skills.config=[{name="codebase-to-course", enabled=false}]' \
  'test skill visibility' | rg 'codebase-to-course'

In that case, the skill is absent from the generated prompt input.

Expected behavior

For a trusted project, [[skills.config]] in <repo>/.codex/config.toml should be able to enable or disable specific skills for that project only, using the same selectors that work in ~/.codex/config.toml and -c.

This would allow a common workflow:

  • Keep useful skills globally installed and available by default.
  • Disable unrelated/heavy skills in specific repositories.
  • Avoid disabling those skills globally for all other projects.

Actual behavior

Project-local [[skills.config]] entries are ignored for skill filtering. Globally installed skills remain visible in that project.

As a partial workaround, this project-local config does work:

[skills]
include_instructions = false

but that disables the entire skill instruction block, rather than selectively disabling a few skills.

Possible cause

From a quick source read, project config itself appears to be loaded, and project-local skills are also treated as skill roots.

But skill_config_rules_from_stack() currently only reads skills.config rules from ConfigLayerSource::User and ConfigLayerSource::SessionFlags, skipping ConfigLayerSource::Project:

if !matches!(
    layer.name,
    ConfigLayerSource::User { .. } | ConfigLayerSource::SessionFlags
) {
    continue;
}

This seems to explain the behavior:

  • ~/.codex/config.toml works because it is a User layer.
  • -c 'skills.config=...' works because it is a SessionFlags layer.
  • <repo>/.codex/config.toml does not work because it is a Project layer.

Why this matters

The docs describe project-local configuration as a configuration layer, and the skills docs describe skills.config as the mechanism for enabling/disabling skills. Users naturally expect those two features to compose.

Selective project-level skill filtering is useful for keeping prompts smaller and avoiding irrelevant automatic skill triggers without losing globally installed skills in other repositories.

extent analysis

TL;DR

The issue can be fixed by modifying the skill_config_rules_from_stack() function to include ConfigLayerSource::Project when reading skills.config rules.

Guidance

  • The problem is caused by the skill_config_rules_from_stack() function skipping ConfigLayerSource::Project when reading skills.config rules.
  • To fix this, the function should be modified to include ConfigLayerSource::Project in the match statement, allowing project-local [[skills.config]] entries to be read.
  • As a temporary workaround, users can use the include_instructions = false setting in their project-local config to disable the entire skill instruction block, although this is not a selective solution.
  • The fix can be verified by checking if project-local [[skills.config]] entries are correctly applied after modifying the skill_config_rules_from_stack() function.

Example

if !matches!(
    layer.name,
    ConfigLayerSource::User { .. } | ConfigLayerSource::SessionFlags | ConfigLayerSource::Project
) {
    continue;
}

Notes

The provided code snippet is a minimal example of how the skill_config_rules_from_stack() function could be modified to fix the issue. However, the actual implementation may vary depending on the surrounding code and requirements.

Recommendation

Apply the workaround by modifying the skill_config_rules_from_stack() function to include ConfigLayerSource::Project, as this will allow project-local [[skills.config]] entries to be correctly read and applied.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

For a trusted project, [[skills.config]] in <repo>/.codex/config.toml should be able to enable or disable specific skills for that project only, using the same selectors that work in ~/.codex/config.toml and -c.

This would allow a common workflow:

  • Keep useful skills globally installed and available by default.
  • Disable unrelated/heavy skills in specific repositories.
  • Avoid disabling those skills globally for all other projects.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING