SkillKit

Testing

Test skills with multiple assertion types

Testing

SkillKit includes a testing framework with multiple assertion types.

Run Tests

skillkit test              # All tests
skillkit test ./my-skill   # Specific skill
skillkit test --tags unit  # By tag
skillkit test --json       # CI output

Test File

Create test.yaml alongside your skill:

name: my-skill-tests
skill: my-skill

tests:
  - name: validates input
    input: |
      Process this file
    assertions:
      - contains: "processed"
      - not_contains: "error"

Assertion Types

AssertionDescription
containsText present
not_containsText absent
matchesRegex match
starts_withPrefix check
ends_withSuffix check
has_sectionMarkdown section
has_code_blockCode block with lang
word_count_minMinimum words
word_count_maxMaximum words
no_todosNo TODO comments
has_frontmatterYAML present

CI Integration

- name: Test Skills
  run: skillkit test --json > results.json

Programmatic API

import { SkillTestRunner } from '@skillkit/core'

const runner = new SkillTestRunner()
const results = await runner.run('./my-skill')

On this page