[{"data":1,"prerenderedAt":357},["ShallowReactive",2],{"en.code.manual-agent-skill-invocation":3,"en.code.manual-agent-skill-invocation-surround":348},{"id":4,"title":5,"body":6,"createdAt":330,"description":331,"draft":332,"extension":333,"image":334,"language":335,"meta":336,"navigation":337,"path":338,"private":332,"rawbody":339,"read":85,"seo":340,"stem":341,"topics":342,"updatedAt":346,"__hash__":347},"content\u002Fcode\u002F21.manual-agent-skill-invocation.md","How to Disable Automatic Agent Skill Invocation",{"type":7,"value":8,"toc":323},"minimark",[9,18,25,28,38,43,50,110,113,116,124,127,133,140,143,146,150,160,166,169,192,195,201,213,216,220,234,237,243,247,250,263,269,273,276,279,287,290,295,319],[10,11,12,13,17],"p",{},"By default, an AI agent can select a relevant skill based on its ",[14,15,16],"code",{},"description",". That is usually convenient: ask for a summary, and the agent finds the right instructions and follows them.",[10,19,20,21,24],{},"When I say automatic invocation, I do not mean running the skill when the application starts. I mean ",[14,22,23],{},"implicit invocation",": the agent sees the skill description and can select it in response to a matching request.",[10,26,27],{},"Some workflows, though, I want to start manually. Examples include generating a daily log, handing context off between sessions, or running a retrospective. They create files, read a lot of context, or change the state of the workflow. I do not want the agent deciding when to run them.",[29,30,31],"callout",{},[10,32,33,37],{},[34,35,36],"strong",{},"This is not a security mechanism."," The setting prevents automatic skill invocation, but it does not take away the agent's access to files, the shell, or the network. If you need a hard boundary, use the client's permissions, sandbox, or hooks.",[39,40,42],"h2",{"id":41},"claude-code-and-pi","Claude Code and Pi",[10,44,45,46,49],{},"In Claude Code and Pi, add one field to the ",[14,47,48],{},"SKILL.md"," frontmatter:",[51,52,57],"pre",{"className":53,"code":54,"language":55,"meta":56,"style":56},"language-yaml shiki shiki-themes github-light github-dark","---\nname: daily-log\ndescription: Generate a daily work log.\ndisable-model-invocation: true\n---\n","yaml","",[14,58,59,68,83,93,105],{"__ignoreMap":56},[60,61,64],"span",{"class":62,"line":63},"line",1,[60,65,67],{"class":66},"sScJk","---\n",[60,69,71,75,79],{"class":62,"line":70},2,[60,72,74],{"class":73},"s9eBZ","name",[60,76,78],{"class":77},"sVt8B",": ",[60,80,82],{"class":81},"sZZnC","daily-log\n",[60,84,86,88,90],{"class":62,"line":85},3,[60,87,16],{"class":73},[60,89,78],{"class":77},[60,91,92],{"class":81},"Generate a daily work log.\n",[60,94,96,99,101],{"class":62,"line":95},4,[60,97,98],{"class":73},"disable-model-invocation",[60,100,78],{"class":77},[60,102,104],{"class":103},"sj4cs","true\n",[60,106,108],{"class":62,"line":107},5,[60,109,67],{"class":66},[10,111,112],{},"The skill remains available for manual use, but the model can no longer select it automatically.",[10,114,115],{},"In Claude Code, invoke it with:",[51,117,122],{"className":118,"code":120,"language":121,"meta":56},[119],"language-text","\u002Fdaily-log\n","text",[14,123,120],{"__ignoreMap":56},[10,125,126],{},"In Pi:",[51,128,131],{"className":129,"code":130,"language":121,"meta":56},[119],"\u002Fskill:daily-log\n",[14,132,130],{"__ignoreMap":56},[10,134,135,136,139],{},"If the command is unavailable in Pi, make sure skill commands are enabled with ",[14,137,138],{},"enableSkillCommands: true",".",[10,141,142],{},"There is a small bonus: Claude Code and Pi do not add the description of this skill to the initial context. The description and instructions are loaded only after explicit invocation.",[10,144,145],{},"In Claude Code, this setting goes a little further. It also prevents the skill from being preloaded into a subagent's context or from running when a scheduled task uses it as the prompt. Keep that in mind if you later decide to automate a manual workflow.",[39,147,149],{"id":148},"codex","Codex",[10,151,152,153,156,157,159],{},"Codex uses a different mechanism. Create ",[14,154,155],{},"agents\u002Fopenai.yaml"," next to ",[14,158,48],{},":",[51,161,164],{"className":162,"code":163,"language":121,"meta":56},[119],"daily-log\u002F\n├── SKILL.md\n└── agents\u002F\n    └── openai.yaml\n",[14,165,163],{"__ignoreMap":56},[10,167,168],{},"Its contents:",[51,170,172],{"className":53,"code":171,"language":55,"meta":56,"style":56},"policy:\n  allow_implicit_invocation: false\n",[14,173,174,182],{"__ignoreMap":56},[60,175,176,179],{"class":62,"line":63},[60,177,178],{"class":73},"policy",[60,180,181],{"class":77},":\n",[60,183,184,187,189],{"class":62,"line":70},[60,185,186],{"class":73},"  allow_implicit_invocation",[60,188,78],{"class":77},[60,190,191],{"class":103},"false\n",[10,193,194],{},"After that, Codex will no longer select the skill automatically. To invoke it explicitly, use:",[51,196,199],{"className":197,"code":198,"language":121,"meta":56},[119],"$daily-log\n",[14,200,198],{"__ignoreMap":56},[10,202,203,204,206,207,209,210,212],{},"You can keep ",[14,205,98],{}," in ",[14,208,48],{},". Codex does not use it to control invocation. It follows the policy in ",[14,211,155],{}," instead. This lets the same skill directory work across several agents.",[10,214,215],{},"Unlike Claude Code and Pi, the Codex documentation only guarantees that implicit invocation is disabled. Do not assume that the skill description will also disappear from the initial context.",[39,217,219],{"id":218},"this-isnt-part-of-the-shared-standard","This Isn't Part of the Shared Standard",[10,221,222,223,230,231,233],{},"Invocation control is not yet unified in the ",[224,225,229],"a",{"href":226,"rel":227},"https:\u002F\u002Fagentskills.io\u002Fspecification",[228],"nofollow","Agent Skills specification",". The base standard defines the directory structure and core ",[14,232,48],{}," fields. Each environment adds its own invocation policy.",[10,235,236],{},"To make the same skill work in all three environments, I use both settings:",[51,238,241],{"className":239,"code":240,"language":121,"meta":56},[119],"my-skill\u002F\n├── SKILL.md                 # Claude Code and Pi\n└── agents\u002F\n    └── openai.yaml          # Codex\n",[14,242,240],{"__ignoreMap":56},[39,244,246],{"id":245},"how-to-verify-the-setting","How to Verify the Setting",[10,248,249],{},"After making the change, start a new session. This is especially important in Pi because it scans skill directories at startup. Then run two checks:",[251,252,253,260],"ol",{},[254,255,256,257,259],"li",{},"Give the agent a request that clearly matches the skill's ",[14,258,16],{},". The skill should not activate.",[254,261,262],{},"Invoke the same skill manually. It should work as usual.",[10,264,265,266,268],{},"Claude Code usually detects changes to ",[14,267,48],{}," without a restart. Codex also watches for changes, but restart it if the new policy does not take effect.",[39,270,272],{"id":271},"when-to-disable-automatic-invocation","When to Disable Automatic Invocation",[10,274,275],{},"Use this approach for workflows with side effects or strict timing: deployments, publishing, reports, digests, session handoffs, and memory maintenance. Cheap, reversible workflows with no external actions — documentation lookup, summaries, or Obsidian operations — can stay automatic.",[10,277,278],{},"My rule is simple: if a workflow is safe and reversible, the agent can select it automatically. If it changes external state, consumes significant resources, or must start at a specific time, keep it behind an explicit command.",[29,280,281],{},[10,282,283,286],{},[34,284,285],{},"Last checked."," These settings were verified against the documentation on July 31, 2026.",[288,289],"hr",{},[10,291,292],{},[34,293,294],{},"Links:",[296,297,298,305,312],"ul",{},[254,299,300],{},[224,301,304],{"href":302,"rel":303},"https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fskills#control-who-invokes-a-skill",[228],"Claude Code Skills",[254,306,307],{},[224,308,311],{"href":309,"rel":310},"https:\u002F\u002Fgithub.com\u002Fearendil-works\u002Fpi\u002Fblob\u002Fmain\u002Fpackages\u002Fcoding-agent\u002Fdocs\u002Fskills.md",[228],"Pi Skills",[254,313,314],{},[224,315,318],{"href":316,"rel":317},"https:\u002F\u002Fdevelopers.openai.com\u002Fcodex\u002Fskills\u002F",[228],"Codex Skills",[320,321,322],"style",{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":56,"searchDepth":70,"depth":70,"links":324},[325,326,327,328,329],{"id":41,"depth":70,"text":42},{"id":148,"depth":70,"text":149},{"id":218,"depth":70,"text":219},{"id":245,"depth":70,"text":246},{"id":271,"depth":70,"text":272},"2026-07-30","How to keep an Agent Skill available as a command while preventing automatic invocation in Claude Code, Pi, and Codex.",false,"md","manual-agent-skill-invocation.jpg","en",{},true,"\u002Fcode\u002Fmanual-agent-skill-invocation","---\nlanguage: en\ntitle: \"How to Disable Automatic Agent Skill Invocation\"\ndescription: \"How to keep an Agent Skill available as a command while preventing automatic invocation in Claude Code, Pi, and Codex.\"\nimage: manual-agent-skill-invocation.jpg\ncreatedAt: 2026-07-30\nupdatedAt: 2026-07-31\nread: 3\ntopics:\n  - AI\n  - Agent Skills\n  - Claude Code\n  - Codex\n---\n\nBy default, an AI agent can select a relevant skill based on its `description`. That is usually convenient: ask for a summary, and the agent finds the right instructions and follows them.\n\nWhen I say automatic invocation, I do not mean running the skill when the application starts. I mean `implicit invocation`: the agent sees the skill description and can select it in response to a matching request.\n\nSome workflows, though, I want to start manually. Examples include generating a daily log, handing context off between sessions, or running a retrospective. They create files, read a lot of context, or change the state of the workflow. I do not want the agent deciding when to run them.\n\n::Callout\n**This is not a security mechanism.** The setting prevents automatic skill invocation, but it does not take away the agent's access to files, the shell, or the network. If you need a hard boundary, use the client's permissions, sandbox, or hooks.\n::\n\n## Claude Code and Pi\n\nIn Claude Code and Pi, add one field to the `SKILL.md` frontmatter:\n\n```yaml\n---\nname: daily-log\ndescription: Generate a daily work log.\ndisable-model-invocation: true\n---\n```\n\nThe skill remains available for manual use, but the model can no longer select it automatically.\n\nIn Claude Code, invoke it with:\n\n```text\n\u002Fdaily-log\n```\n\nIn Pi:\n\n```text\n\u002Fskill:daily-log\n```\n\nIf the command is unavailable in Pi, make sure skill commands are enabled with `enableSkillCommands: true`.\n\nThere is a small bonus: Claude Code and Pi do not add the description of this skill to the initial context. The description and instructions are loaded only after explicit invocation.\n\nIn Claude Code, this setting goes a little further. It also prevents the skill from being preloaded into a subagent's context or from running when a scheduled task uses it as the prompt. Keep that in mind if you later decide to automate a manual workflow.\n\n## Codex\n\nCodex uses a different mechanism. Create `agents\u002Fopenai.yaml` next to `SKILL.md`:\n\n```text\ndaily-log\u002F\n├── SKILL.md\n└── agents\u002F\n    └── openai.yaml\n```\n\nIts contents:\n\n```yaml\npolicy:\n  allow_implicit_invocation: false\n```\n\nAfter that, Codex will no longer select the skill automatically. To invoke it explicitly, use:\n\n```text\n$daily-log\n```\n\nYou can keep `disable-model-invocation` in `SKILL.md`. Codex does not use it to control invocation. It follows the policy in `agents\u002Fopenai.yaml` instead. This lets the same skill directory work across several agents.\n\nUnlike Claude Code and Pi, the Codex documentation only guarantees that implicit invocation is disabled. Do not assume that the skill description will also disappear from the initial context.\n\n## This Isn't Part of the Shared Standard\n\nInvocation control is not yet unified in the [Agent Skills specification](https:\u002F\u002Fagentskills.io\u002Fspecification). The base standard defines the directory structure and core `SKILL.md` fields. Each environment adds its own invocation policy.\n\nTo make the same skill work in all three environments, I use both settings:\n\n```text\nmy-skill\u002F\n├── SKILL.md                 # Claude Code and Pi\n└── agents\u002F\n    └── openai.yaml          # Codex\n```\n\n## How to Verify the Setting\n\nAfter making the change, start a new session. This is especially important in Pi because it scans skill directories at startup. Then run two checks:\n\n1. Give the agent a request that clearly matches the skill's `description`. The skill should not activate.\n2. Invoke the same skill manually. It should work as usual.\n\nClaude Code usually detects changes to `SKILL.md` without a restart. Codex also watches for changes, but restart it if the new policy does not take effect.\n\n## When to Disable Automatic Invocation\n\nUse this approach for workflows with side effects or strict timing: deployments, publishing, reports, digests, session handoffs, and memory maintenance. Cheap, reversible workflows with no external actions — documentation lookup, summaries, or Obsidian operations — can stay automatic.\n\nMy rule is simple: if a workflow is safe and reversible, the agent can select it automatically. If it changes external state, consumes significant resources, or must start at a specific time, keep it behind an explicit command.\n\n::Callout\n**Last checked.** These settings were verified against the documentation on July 31, 2026.\n::\n\n***\n**Links:**\n\n- [Claude Code Skills](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fskills#control-who-invokes-a-skill)\n- [Pi Skills](https:\u002F\u002Fgithub.com\u002Fearendil-works\u002Fpi\u002Fblob\u002Fmain\u002Fpackages\u002Fcoding-agent\u002Fdocs\u002Fskills.md)\n- [Codex Skills](https:\u002F\u002Fdevelopers.openai.com\u002Fcodex\u002Fskills\u002F)\n",{"title":5,"description":331},"code\u002F21.manual-agent-skill-invocation",[343,344,345,149],"AI","Agent Skills","Claude Code","2026-07-31","NwBCpwN2KtMgOkNoz1EgMc96TxsMCy9AT3TyoMOOVkE",[349,353],{"title":350,"path":351,"stem":352,"draft":332,"children":-1},"Moving Back to the Terminal","\u002Fcode\u002Fmoving-to-console","code\u002F22.moving-to-console",{"title":354,"path":355,"stem":356,"draft":332,"children":-1},"Optimizing Hermes Under the Hood","\u002Fcode\u002Fhermes-auxiliary-models-optimization","code\u002F20.hermes-auxiliary-models-optimization",1787739461611]