Skip to content

Move trigger guard to slash command first line#19

Merged
blipinsk merged 3 commits intomainfrom
fix/slash-command-trigger-guard
Mar 26, 2026
Merged

Move trigger guard to slash command first line#19
blipinsk merged 3 commits intomainfrom
fix/slash-command-trigger-guard

Conversation

@blipinsk
Copy link
Copy Markdown
Member

The trigger guard ("Do NOT invoke unless user explicitly mentions mob or codemob") was only in the body of slash commands, which Claude reads after skill matching already happened. Move it to the first line (the description), which is visible in the skill listing and prevents false-positive matches on generic words like "new", "list", "switch".

@blipinsk blipinsk marked this pull request as ready for review March 26, 2026 09:50
The trigger guard ("Do NOT invoke unless user explicitly mentions mob
or codemob") was only in the body of slash commands, which Claude reads
after skill matching already happened. Move it to the first line
(the description), which is visible in the skill listing and prevents
false-positive matches on generic words like "new", "list", "switch".
Layer 1: short guard prefix in skill description (visible before
invocation, fits within ~97 char truncation). Layer 2: abort
instruction in skill body as fallback if agent invokes anyway.

Also reject unknown commands early in root.go.
…and switches

- Add bodyGuard (layer 2) to slash commands: aborts if agent invokes
  despite the description-level trigger guard
- Apply both guard layers to Codex prompts too
- Rename SlashCommands -> ClaudeSlashCommands for clarity
- Merge guard and upgrade-skip switches into one in root.go
- Document command registration sync requirement in CLAUDE.md
@blipinsk blipinsk force-pushed the fix/slash-command-trigger-guard branch from ffaacec to b70925b Compare March 26, 2026 10:18
@blipinsk blipinsk merged commit 4a82796 into main Mar 26, 2026
1 check passed
@blipinsk blipinsk deleted the fix/slash-command-trigger-guard branch March 26, 2026 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant