Problem
Agents with many skills face a routing problem: given a user's natural language input, which skill should handle it? Solutions like embedding-based similarity or LLM classification work but are opaque—users don't know what phrases will activate which capabilities.
Additionally, agents may have skills that should activate proactively (without explicit request) when certain topics arise, but without explicit trigger lists, the agent may miss opportunities or activate inappropriately.
Solution
Define an explicit trigger vocabulary for each skill: a list of phrases, keywords, and patterns that should activate that skill. Document these triggers visibly so both humans and agents know the activation criteria.
# Skill definition with explicit triggers
skill: priority-report
description: Generate prioritized task report
triggers:
exact: ["sup", "priority report", "standup prep"]
contains: ["what should I work on", "what's pending", "my tasks"]
patterns: ["what.*on my plate", "action items"]
proactive: true # Activate without explicit request when triggers match
Key components:
- Trigger lists: Explicit phrases per skill, documented in skill definitions
- Proactive flag: Whether skill should auto-activate on trigger match
- Priority ordering: When multiple skills match, which takes precedence
- User visibility: Triggers documented so users learn the vocabulary
Proactive activation categories:
- Information offering: Providing relevant information unprompted
- Suggestion: Recommending actions or content
- Clarification: Asking for missing information
- Correction: Fixing user errors or misunderstandings
User acceptance of proactive activation depends on relevance (contextually appropriate), timing (not interrupting flow), and transparency (explaining why the action was taken).
How to use it
Skill documentation format:
Trade-offs
Pros:
- Transparent: Users can learn trigger phrases, feel in control
- Predictable: Same input always routes to same skill
- Debuggable: Easy to see why a skill activated (or didn't)
- Fast: String matching faster than embedding lookup
- Documentable: Triggers become part of user-facing docs
- Proactive: Agent can jump in when relevant topics arise
Cons:
- Rigid: Misses paraphrases not in trigger list
- Maintenance: Must update triggers as vocabulary evolves
- Conflicts: Multiple skills may want same triggers
- Cultural/language bias: Triggers may not translate
- Discovery: Users must learn the vocabulary (or read docs)
Hybrid approach:
Combine explicit triggers with semantic fallback:
- Check explicit trigger matches first (fast, predictable)
- If no match, use embedding similarity (flexible, slower)
- Log unmatched inputs to discover new trigger candidates
This hybrid approach (exact match before semantic) is an industry best practice across chatbot platforms, combining predictability with flexibility.
References
- Claude Code CLAUDE.md skill documentation pattern
- Intent classification in conversational AI
- Chatbot trigger/response pattern matching
- Slack workflow triggers
- Pradhan et al. "Proactive Behavior in Conversational AI: A Survey." ACL 2022
- Yang, Shuo, et al. "Should I Interrupt? Proactive Assistance in Human-AI Collaboration." CHI 2021
- Primary source: https://github.com/anthropics/claude-code