From 53220420a5c382fa0822f28975e216bc15443c70 Mon Sep 17 00:00:00 2001 From: Alex Verkhovsky Date: Sat, 31 Jan 2026 16:25:31 -0700 Subject: [PATCH] fix: add disable-model-invocation to all generated slash commands (#1501) 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. Co-authored-by: Brian --- tools/cli/installers/lib/ide/_config-driven.js | 2 ++ tools/cli/installers/lib/ide/codex.js | 1 + .../installers/lib/ide/shared/task-tool-command-generator.js | 1 + .../cli/installers/lib/ide/templates/agent-command-template.md | 1 + .../cli/installers/lib/ide/templates/combined/default-agent.md | 1 + .../lib/ide/templates/combined/default-workflow-yaml.md | 1 + .../installers/lib/ide/templates/combined/default-workflow.md | 1 + .../installers/lib/ide/templates/workflow-command-template.md | 1 + tools/cli/installers/lib/ide/templates/workflow-commander.md | 1 + 9 files changed, 10 insertions(+) diff --git a/tools/cli/installers/lib/ide/_config-driven.js b/tools/cli/installers/lib/ide/_config-driven.js index 022bff7b..87be7300 100644 --- a/tools/cli/installers/lib/ide/_config-driven.js +++ b/tools/cli/installers/lib/ide/_config-driven.js @@ -283,6 +283,7 @@ class ConfigDrivenIdeSetup extends BaseIdeSetup { return `--- name: '{{name}}' description: '{{description}}' +disable-model-invocation: true --- 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 `--- name: '{{name}}' description: '{{description}}' +disable-model-invocation: true --- # {{name}} diff --git a/tools/cli/installers/lib/ide/codex.js b/tools/cli/installers/lib/ide/codex.js index 60250a39..5cd503e2 100644 --- a/tools/cli/installers/lib/ide/codex.js +++ b/tools/cli/installers/lib/ide/codex.js @@ -411,6 +411,7 @@ class CodexSetup extends BaseIdeSetup { const launcherContent = `--- name: '${agentName}' 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. diff --git a/tools/cli/installers/lib/ide/shared/task-tool-command-generator.js b/tools/cli/installers/lib/ide/shared/task-tool-command-generator.js index 6b90de9f..a0c4bcf8 100644 --- a/tools/cli/installers/lib/ide/shared/task-tool-command-generator.js +++ b/tools/cli/installers/lib/ide/shared/task-tool-command-generator.js @@ -72,6 +72,7 @@ class TaskToolCommandGenerator { return `--- description: '${description.replaceAll("'", "''")}' +disable-model-invocation: true --- # ${item.displayName || item.name} diff --git a/tools/cli/installers/lib/ide/templates/agent-command-template.md b/tools/cli/installers/lib/ide/templates/agent-command-template.md index 89713631..90e176a0 100644 --- a/tools/cli/installers/lib/ide/templates/agent-command-template.md +++ b/tools/cli/installers/lib/ide/templates/agent-command-template.md @@ -1,6 +1,7 @@ --- name: '{{name}}' 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. diff --git a/tools/cli/installers/lib/ide/templates/combined/default-agent.md b/tools/cli/installers/lib/ide/templates/combined/default-agent.md index f8ad9380..17a0be4b 100644 --- a/tools/cli/installers/lib/ide/templates/combined/default-agent.md +++ b/tools/cli/installers/lib/ide/templates/combined/default-agent.md @@ -1,6 +1,7 @@ --- name: '{{name}}' 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. diff --git a/tools/cli/installers/lib/ide/templates/combined/default-workflow-yaml.md b/tools/cli/installers/lib/ide/templates/combined/default-workflow-yaml.md index eca90437..2a5e49b8 100644 --- a/tools/cli/installers/lib/ide/templates/combined/default-workflow-yaml.md +++ b/tools/cli/installers/lib/ide/templates/combined/default-workflow-yaml.md @@ -1,6 +1,7 @@ --- name: '{{name}}' 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: diff --git a/tools/cli/installers/lib/ide/templates/combined/default-workflow.md b/tools/cli/installers/lib/ide/templates/combined/default-workflow.md index afb0dea5..8c4fa818 100644 --- a/tools/cli/installers/lib/ide/templates/combined/default-workflow.md +++ b/tools/cli/installers/lib/ide/templates/combined/default-workflow.md @@ -1,6 +1,7 @@ --- name: '{{name}}' 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! diff --git a/tools/cli/installers/lib/ide/templates/workflow-command-template.md b/tools/cli/installers/lib/ide/templates/workflow-command-template.md index 5c9e436c..472c1553 100644 --- a/tools/cli/installers/lib/ide/templates/workflow-command-template.md +++ b/tools/cli/installers/lib/ide/templates/workflow-command-template.md @@ -1,5 +1,6 @@ --- 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: diff --git a/tools/cli/installers/lib/ide/templates/workflow-commander.md b/tools/cli/installers/lib/ide/templates/workflow-commander.md index 3645c1a2..d49c8319 100644 --- a/tools/cli/installers/lib/ide/templates/workflow-commander.md +++ b/tools/cli/installers/lib/ide/templates/workflow-commander.md @@ -1,5 +1,6 @@ --- 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!