Skip to content

feat(skills): trigger set indexing in SKILL.md frontmatter (AutoSkill A5) #4451

@bug-ops

Description

@bug-ops

Description

Add an optional triggers: list to SKILL.md frontmatter — a few example queries that should activate the skill. The matcher computes embeddings for each trigger at startup and includes them as additional vectors pointing to the same skill. This improves recall for skills whose description is abstract but whose trigger examples are concrete.

---
name: code-review
description: Perform structured code review with actionable feedback
triggers:
  - "review this code"
  - "what's wrong with my implementation"
  - "check my PR for issues"
---

Motivation

AutoSkill's trigger_set field enables retrieval via example-query matching in addition to description matching. Most useful at scale (>200 skills) where description ambiguity increases. Backward compatible — existing skills without triggers work unchanged.

Acceptance Criteria

  • triggers: Vec<String> optional field in SKILL.md frontmatter (empty = no change to current behavior)
  • Matcher embeds each trigger at construction time; stores as additional vectors mapped to the parent skill
  • Trigger vectors included in cosine similarity search; best-of-triggers score used for the skill
  • Triggers included in hot-reload rebuild
  • Documentation: SKILL.md format reference updated with triggers field

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4Long-term / exploratoryenhancementNew feature or requestskillszeph-skills crate

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions