Move trigger guard to slash command first line#19
Merged
Conversation
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
ffaacec to
b70925b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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".