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.
- License 许可
- Apache-2.0
- 最近更新
- 2026-08-16
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- skill-with-tests
- license
- Apache-2.0
- metadata
- { "author": "skillscraft", "version": "1.0" }
- description
- Example skill demonstrating the test scenario format from the extended specification. Use when learning how to write and evaluate skill test cases.
02 资源文件 1
- 参考文档tests/scenarios.json1.9 KB
03 SKILL.md 正文
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
04 同仓库更多 Skills
valid-skill
A valid test skill for unit testing. Use when running automated tests.
unicode-name
Unicode test skill ? with Chinese 你好 and Arabic مرحبا characters. Use when testing unicode handling.
skill-with-ignore
A test skill with a .skillignore file. Use when testing filterFiles behavior.
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Max length name test.
max-length-desc
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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