New to Skills? Read my earlier post first: What are Agent Skills? Learn with a real example.
Add disable-model-invocation: true to the YAML frontmatter of your SKILL.md to prevent the AI coding agent (Claude Code, GitHub Copilot CLI, etc.) from triggering the Skill automatically. The agent still loads the skill and knows it exists. It just will not pick it up on its own based on intent matching. The user has to ask for it by name.

I am using GitHub Copilot CLI as the example agent throughout this post. The flag is part of the Agent Skills spec, so other agents that support Skills (Claude Code, and others) should behave the same way.
Demo – Create Skills :
Lets create two Skills that are identical except the disable-model-invocation: true flag.
Skill 1 (No disable-model-invocation flag):
---name: my-skill-1description: A demo skill. Use whenever the user refers to MySkill1.---When invoked, reply with exactly this line:Hello from MySkill1 (auto-invocable).
Skill 2 (With disable-model-invocation flag set to ‘true’):
---name: my-skill-2description: A demo skill. Use whenever the user refers to MySkill2.disable-model-invocation: true---When invoked, reply with exactly this line:Hello from MySkill2 (explicit-only).
- Save the files as following folder structure (GitHub CLI compatible)

Test it:
- Either start a new session or trigger /skill reload

- Trigger following command to confirm both Skills are loaded:
/skills list

Prompt A:
- Use following prompt which auto-invokes
my-skill-1.
say hello from my skill 1

Prompt B:
- Use following prompt. Agent does NOT auto-invoke
my-skill-2, because of the flag:
say hello from my skill 2

Prompt C:
- Use following prompt by explicitly invoking
my-skill-2:
Use the /my-skill-2 skill and follow its instructions.

- The
/skill-namemention inside a prompt is the documented explicit-invocation syntax, and it works even whendisable-model-invocation: true
Summary
disable-model-invocation: true is the simplest way to keep a Skill available without letting your coding agent trigger it automatically. Use it for Skills that should run only when the user explicitly asks, such as deploys, publishes, sends, or anything with side effects.
Official docs (Copilot CLI example): Adding agent skills for GitHub Copilot CLI
🙂



Leave a Reply