Skip to main content

test_skill

Function test_skill 

Source
pub fn test_skill(dir: &Path, query: &str) -> Result<TestResult>
Expand description

Test a skill against a sample user query.

Simulates skill discovery by checking:

  1. Whether the description is relevant to the query (word overlap)
  2. Whether the skill passes validation (metadata + structure)
  3. The estimated token cost

§Arguments

  • dir - Path to the skill directory
  • query - A sample user query to test activation against

§Errors

Returns an error if the SKILL.md cannot be read or parsed.