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:
- Whether the description is relevant to the query (word overlap)
- Whether the skill passes validation (metadata + structure)
- The estimated token cost
§Arguments
dir- Path to the skill directoryquery- A sample user query to test activation against
§Errors
Returns an error if the SKILL.md cannot be read or parsed.