Skip to content

Skills with implicit invocation disabled while only allowing explicit invocation #10585

Closed
fishstoryyy/agent-tools
#2

Description

@your-diary

What variant of Codex are you using?

CLI

What feature would you like to see?

This issue is preceded by this question:


Currently, there is no way to disable implicit invocation of skills while allowing explicit invocation via $<name>; we can only instruct codex in natural languages not to invoke skills implicitly, which may or may not be respected by codex.

Given that custom prompts, which is similar to skills but can only be invoked explicitly (via /prompts:<name>), is deprecated in favor of skills, there should be a way to define skills with implicit invocations disabled; otherwise skills cannot be a complete alternative to custom prompts.

Additional information

No response

Activity

  1. added
    enhancement
    on Feb 4, 2026
  2. added
    CLI
    on Feb 4, 2026
  3. github-actions commented on Feb 4, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  4. added
    agent
    and removed
    CLI
    on Feb 4, 2026
  5. your-diary commented on Feb 4, 2026

    @your-diary
    Author

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    #10573

    No, it's not.
    This is a question issue asked by me in the past.

    #8713

    Similar but not the same. I believe my issue is valid because:

  6. etraut-openai commented on Feb 4, 2026

    @etraut-openai
    Contributor

    Out of curiosity, are you seeing situations where a skill is invoked implicitly when you don't want it to be? Or is this more of a theoretical concern?

    If you're seeing cases where it's being invoked implicitly when that's not desired, we'd be interested in hearing about that.

  7. your-diary commented on Feb 4, 2026

    @your-diary
    Author

    @etraut-openai
    It's a theoretical concern.

    I have many custom prompts which perform destructive operations such as deleting AWS resources, so I want to be 100% (not 99%) sure they are invoked only when I explicitly request so.

    A workaround I come up with (but haven't tried) is to bind-mount the skills directories only when I want to use them. This would work only when, for example, codex CLI is running inside a Docker container. (Actually I do wrap codex inside a docker container and implement many safeguards (e.g. bind-mounting an empty file onto an existing .env for extra safety).)

  8. EricGT commented on Feb 4, 2026

    @EricGT

    For what it's worth, similar skill invocation/activation concerns are also noted at

    https://github.com/agentskills/agentskills/issues

  9. wsmoak commented on Feb 14, 2026

    @wsmoak

    Some tools use disable-model-invocation: true in the frontmatter for this -- then the skill will not be auto-invoked, only if you specifically ask for it. I thought it was in the agent skills spec but apparently not.

    Cursor defines it like this:

    By default, skills are automatically applied when the agent determines they are relevant. Set disable-model-invocation: true to make a skill behave like a traditional slash command, where it is only included in context when you explicitly type /skill-name in chat.

  10. lattwood commented on Mar 23, 2026

    @lattwood

    One potential use-case for this functionality are skills that the agent might not be able to invoke in all environments the repository is being modified in.

    For instance, an infrastructure type repo could have a skill for planning/previewing the changes (ie Terraform Plan), but it requires SRE type credentials to be discoverable in the environment. This is not a skill you would want the model to automatically try to invoke if it's running somewhere like Codex Cloud, but it is a skill you would want to manually invoke from Codex CLI running on your laptop.

  11. added
    skills
    and removed
    agent
    on Mar 26, 2026
  12. etraut-openai commented on Mar 30, 2026

    @etraut-openai
    Contributor

    This feature is already supported. See this documentation for details.

  13. ignatremizov commented on Apr 3, 2026

    @ignatremizov

    For anyone landing here from search: this is configured in the skill metadata file agents/openai.yaml, not in SKILL.md.

    Example:

    policy:
      allow_implicit_invocation: false

    Typical layout:

    my-skill/
    ├── SKILL.md
    └── agents/
        └── openai.yaml
    

    With that setting, the skill is not injected implicitly, but it can still be invoked explicitly via $skill-name.

  14. MichaelYochpaz commented on May 15, 2026

    @MichaelYochpaz

    I'd love it if Codex just supported the disable-model-invocation Frontmatter flag, as it's somewhat conventional and would work across other harnesses (from what I've found, this flag is currently supported on Claude Code, Gemini CLI, Cursor and Pi).

    Forcing a custom openai.yaml file convention and making it Codex-specific is as-annoying as Anthropic not adopting the AGENTS.md file convention on Claude Code and forcing everyone to symlink CLAUDE.md.

  15. backnotprop commented on Jun 13, 2026

    @backnotprop

    codex needs to support disable-model-invocation

    and also bash

  16. StudentWeis commented on Oct 17, 2026

    @StudentWeis

    Could Codex also support disable-model-invocation: true in SKILL.md frontmatter as a compatibility alias for policy.allow_implicit_invocation: false?

    Pi already supports this frontmatter field. When sharing the same skills between Pi and Codex, authors currently need an additional agents/openai.yaml file just to express the same invocation policy. Keeping the setting alongside name and description would make these skills easier to maintain and reuse across agents.

    For example:

    ---
    name: my-skill
    description: A workflow intended for explicit user invocation.
    disable-model-invocation: true
    ---

    The existing agents/openai.yaml configuration could remain supported. If both settings are present, Codex could give an explicitly configured policy.allow_implicit_invocation precedence and document that behavior. Explicit $my-skill invocation should remain available.

    I understand this issue was closed because explicit-only invocation is already supported; this request is specifically about accepting the existing frontmatter convention for interoperability, rather than adding a new invocation capability.

    Pi documentation: https://pi.dev/docs/latest/skills#understand-how-skills-load

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementskills

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions