Feature request: add path globs to control when skills are considered
What variant of Codex are you using?
CLI
What feature would you like to see?
Add a path-matching field to Codex skill metadata so a skill can be automatically considered only when the current work involves matching files.
For example, a skill could declare path globs like:
---
name: iconify
description: Search Iconify and turn results into code-ready icon imports or usage.
paths:
- "apps/web-*/**/*"
- "packages/ui/**/*"
---
Requested behavior:
- Codex should only automatically surface or activate the skill when work involves files matching those globs.
- The skill should not be considered for unrelated files.
- Manual invocation could still be allowed, depending on the existing skill invocation model.
- Path matching should work for monorepo package boundaries and common glob patterns.
This is different from broad semantic skill matching. Some skills are only correct in specific parts of a repository even if their descriptions sound generally relevant.
Examples:
- A React icon skill should apply under
apps/web-*andpackages/ui, but not backend services. - A database migration skill should apply under
packages/api/migrations, but not frontend code. - A generated-client workflow should apply under
packages/sdk, but not the app that consumes it. - A design-system component checklist should apply under
packages/ui, but not arbitrary React apps.
Additional information
Claude Code documents a paths field for skills:
<img width="1107" height="192" alt="Image" src="https://github.com/user-attachments/assets/64dc1705-129a-4a36-b7fc-ffe636eb8b94" />
Its documented behavior is that paths contains glob patterns limiting when a skill is activated: Claude loads the skill automatically only when working with files matching the patterns.
This matters for both correctness and context hygiene:
- Correctness: the model should not apply package-specific workflows to the wrong part of a repo.
- Context hygiene: path scoping avoids surfacing irrelevant skill metadata during unrelated work.
- DX: users can encode “this workflow belongs here” once, instead of repeatedly telling the agent.
This pairs especially well with nested skill discovery, but it is useful independently: even repo-level skills often need file/path-specific applicability.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗