Skill with tests
Example skill demonstrating the test scenario format from the extended specification. Use when learning how to write and evaluate skill test cases.From its SKILL.md
npx -y skills add Pratiyush/skill-sdk --skill skill-with-testsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its file declares
Copied from the file, not written here
The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
1.5 KB, 320 tokens by cl100k_base, as published. Nobody here has run it
Skill with Tests
When to use this skill
Use this as a reference when adding test scenarios to your own skills. The tests/ directory contains structured test cases that follow the TestScenario format from @skillscraft/spec.
Instructions
- Read
tests/scenarios.jsonto see the test format - Each scenario has a
name,description, and array ofcases - Each case provides an
inputprompt andassertionsto check the output - Assertion types:
contains,not-contains,matches-regex,file-created,file-modified,command-executed,custom - Use this pattern in your own skills to make them testable
Test scenario structure
{
"name": "scenario-name",
"description": "What this scenario tests",
"cases": [
{
"name": "case-name",
"input": "User prompt to test with",
"assertions": [
{ "type": "contains", "value": "expected output text" }
],
"expectedBehavior": "Human-readable description"
}
]
}
Gotchas
- Assertions check the agent's text output, not internal state
- The
matches-regextype uses JavaScript regex syntax file-createdandfile-modifiedassertions check the filesystem after the skill runs- Test scenarios are declarative — you need a test runner to execute them
What ships with it: 1 file
1.9 KB alongside SKILL.md
tests/
- scenarios.json1.9 KB