AGENT SKILL

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

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

  1. Read tests/scenarios.json to see the test format
  2. Each scenario has a name, description, and array of cases
  3. Each case provides an input prompt and assertions to check the output
  4. Assertion types: contains, not-contains, matches-regex, file-created, file-modified, command-executed, custom
  5. 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-regex type uses JavaScript regex syntax
  • file-created and file-modified assertions check the filesystem after the skill runs
  • Test scenarios are declarative — you need a test runner to execute them

04 同仓库更多 Skills

Pratiyush
Pratiyush/skill-sdk

valid-skill

A valid test skill for unit testing. Use when running automated tests.

测试与质量Skill与智能体开发
★ 0
Pratiyush
Pratiyush/skill-sdk

unicode-name

Unicode test skill ? with Chinese 你好 and Arabic مرحبا characters. Use when testing unicode handling.

测试与质量Skill与智能体开发
★ 0
Pratiyush
Pratiyush/skill-sdk

skill-with-ignore

A test skill with a .skillignore file. Use when testing filterFiles behavior.

测试与质量Skill与智能体开发
★ 0
Pratiyush
Pratiyush/skill-sdk

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

Max length name test.

★ 0
Pratiyush
Pratiyush/skill-sdk

max-length-desc

a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