fix: add disable-model-invocation to all generated slash commands

Prevents Claude from auto-invoking BMad skills without explicit user
request. Adds disable-model-invocation: true frontmatter to all
command templates and inline generators for Claude Code and Codex.
This commit is contained in:
Alex Verkhovsky 2026-01-31 13:44:55 -07:00
parent 542a7429ec
commit 2df8147186
9 changed files with 10 additions and 0 deletions

View File

@ -283,6 +283,7 @@ class ConfigDrivenIdeSetup extends BaseIdeSetup {
return `--- return `---
name: '{{name}}' name: '{{name}}'
description: '{{description}}' description: '{{description}}'
disable-model-invocation: true
--- ---
You must fully embody this agent's persona and follow all activation instructions exactly as specified. You must fully embody this agent's persona and follow all activation instructions exactly as specified.
@ -297,6 +298,7 @@ You must fully embody this agent's persona and follow all activation instruction
return `--- return `---
name: '{{name}}' name: '{{name}}'
description: '{{description}}' description: '{{description}}'
disable-model-invocation: true
--- ---
# {{name}} # {{name}}

View File

@ -411,6 +411,7 @@ class CodexSetup extends BaseIdeSetup {
const launcherContent = `--- const launcherContent = `---
name: '${agentName}' name: '${agentName}'
description: '${agentName} agent' description: '${agentName} agent'
disable-model-invocation: true
--- ---
You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command. You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.

View File

@ -72,6 +72,7 @@ class TaskToolCommandGenerator {
return `--- return `---
description: '${description.replaceAll("'", "''")}' description: '${description.replaceAll("'", "''")}'
disable-model-invocation: true
--- ---
# ${item.displayName || item.name} # ${item.displayName || item.name}

View File

@ -1,6 +1,7 @@
--- ---
name: '{{name}}' name: '{{name}}'
description: '{{description}}' description: '{{description}}'
disable-model-invocation: true
--- ---
You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command. You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.

View File

@ -1,6 +1,7 @@
--- ---
name: '{{name}}' name: '{{name}}'
description: '{{description}}' description: '{{description}}'
disable-model-invocation: true
--- ---
You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command. You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.

View File

@ -1,6 +1,7 @@
--- ---
name: '{{name}}' name: '{{name}}'
description: '{{description}}' description: '{{description}}'
disable-model-invocation: true
--- ---
IT IS CRITICAL THAT YOU FOLLOW THESE STEPS - while staying in character as the current agent persona you may have loaded: IT IS CRITICAL THAT YOU FOLLOW THESE STEPS - while staying in character as the current agent persona you may have loaded:

View File

@ -1,6 +1,7 @@
--- ---
name: '{{name}}' name: '{{name}}'
description: '{{description}}' description: '{{description}}'
disable-model-invocation: true
--- ---
IT IS CRITICAL THAT YOU FOLLOW THIS COMMAND: LOAD the FULL @{project-root}/{{bmadFolderName}}/{{path}}, READ its entire contents and follow its directions exactly! IT IS CRITICAL THAT YOU FOLLOW THIS COMMAND: LOAD the FULL @{project-root}/{{bmadFolderName}}/{{path}}, READ its entire contents and follow its directions exactly!

View File

@ -1,5 +1,6 @@
--- ---
description: '{{description}}' description: '{{description}}'
disable-model-invocation: true
--- ---
IT IS CRITICAL THAT YOU FOLLOW THESE STEPS - while staying in character as the current agent persona you may have loaded: IT IS CRITICAL THAT YOU FOLLOW THESE STEPS - while staying in character as the current agent persona you may have loaded:

View File

@ -1,5 +1,6 @@
--- ---
description: '{{description}}' description: '{{description}}'
disable-model-invocation: true
--- ---
IT IS CRITICAL THAT YOU FOLLOW THIS COMMAND: LOAD the FULL @{{workflow_path}}, READ its entire contents and follow its directions exactly! IT IS CRITICAL THAT YOU FOLLOW THIS COMMAND: LOAD the FULL @{{workflow_path}}, READ its entire contents and follow its directions exactly!