| name | metaskill-triggering |
| description | Optimize skill triggers and descriptions for reliable activation. Use when skill is not triggering, optimizing trigger keywords, writing frontmatter, debugging activation, or when user mentions "trigger", "frontmatter", "description", "skill not triggering", "optimize trigger", "skill won't fire", "skill activation", "trigger keywords". |
Skill Trigger Optimization
Critical Insight
ONLY the description field affects triggering. All other frontmatter fields affect execution, not discovery.
At startup, Claude loads ONLY name + description (not full SKILL.md body). Matching is keyword-based, not deeply semantic.
The Trigger Formula
description: <What it does> + <Specific actions> + <When to use it> + <Trigger keywords>
Example Breakdown
description: Write and review tests following TDD and best practices. ALWAYS use this skill BEFORE writing or modifying any test code. Triggers on "test", "tests", "testing", "TDD", "test-driven", "pytest", "add tests", "write tests", "test this", "unit test", "integration test", "test coverage", "bug fix", "fix bug", "verify", "edge case", or when about to create/edit files in tests/ directory.
| Part | Example Content |
|---|
| What it does | "Write and review tests following TDD and best practices" |
| Specific actions | "BEFORE writing or modifying any test code" |
| When to use | "when about to create/edit files in tests/ directory" |
| Trigger keywords | "test", "tests", "testing", "TDD", "pytest"... |
Keyword Best Practices
Include Variants
"test", "tests", "testing", "test-driven"
"testing"
Include User Phrases
"add tests", "write tests", "test this", "TDD this"
"implement unit tests"
Include Action Verbs
"write", "create", "fix", "review", "optimize"
"tests", "code", "documentation"
Include Slang and Abbreviations
"TDD", "mf" (if appropriate), common abbreviations
"test-driven development methodology"
Common Trigger Failures
1. Description Too Vague
description: Helps with testing stuff.
description: Write and run pytest tests. Use when creating tests, fixing test failures, or when user mentions "test", "pytest", "fixture", "mock".
2. Missing Keyword Variants
description: Write test code...
description: ...triggers on "test", "tests", "testing"...
3. No "Use When" Clause
description: Handles test code.
description: ...Use when writing tests, reviewing test code, or debugging test failures.
4. Missing User Phrases
description: Implements unit test suites.
description: ...triggers on "add tests", "write tests", "test this", "TDD this mf"...
Frontmatter Fields Reference
Triggering-Related
| Field | Effect on Triggering |
|---|
name | Used with /skill-name invocation |
description | ONLY field that affects auto-triggering |
disable-model-invocation | true = blocks ALL auto-discovery |
Execution-Related (No Trigger Effect)
| Field | Purpose |
|---|
allowed-tools | Restricts tools available during skill |
skills | Makes other skills available (for groups) |
Pro Tips
1. Self-Recognition
Claude should trigger skills when IT plans actions, not just when user says keywords:
description: ...or when about to create/edit files in tests/ directory.
2. Negative Keywords (What NOT to Trigger On)
Can't specify directly, but make description specific enough:
description: Write PYTEST tests for Python code...
3. Maximum Description Length
~1024 characters. Prioritize keywords over prose.
4. Test Your Triggers
Use the metaskill-trigger-tester agent to probe skill triggering.
Debugging Non-Triggering Skills
- Check description exists - Missing = never triggers
- Check
disable-model-invocation - true blocks auto-discovery
- Grep for keywords - Are user's words in description?
- Check variants - "testing" present but not "test"?
- Add explicit "Use when" clause - Often missing
- Add user phrases - Include how users actually talk
Related Skills
- For naming conventions, see
/metaskill-naming
- For skill structure and writing, see
/metaskill-authoring
- For skill group pattern, see
/metaskill-grouping
- For plugin packaging and placement, see
/metaskill-packaging
- To test triggers, use the
metaskill-trigger-tester agent
Reference Files