Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

skill-testing-framework

БесплатноЗапускает вложенные скриптыНе проверен

Provides test cases and validation tools for skills. Use when creating tests for a new skill, adding regression tests after skill updates, running test suites…

Exploration-labsот Exploration-labs★ 55 звёзд на GitHub16 установок в других каталогах

Об этом скилле

Skill Testing Framework

Overview

This skill provides a comprehensive framework for testing skills at multiple levels: unit tests for individual components, integration tests for complete workflows, and regression tests to catch breaking changes. It includes scripts for generating test templates, running test suites, and validating outputs against baselines.

When to Use This Skill

Use this skill when:

  • Building a new skill and want to add tests from the start
  • Updating an existing skill and need to verify it still works correctly
  • Running regression tests to ensure changes don't break existing functionality
  • Validating that skill outputs match expected results
  • Creating a test suite for a skill

Quick Start

1. Generate a Test Template

Start by generating a test template for your skill:

scripts/generate_test_template.py /path/to/your-skill --output your-skill-tests.json

This analyzes your skill structure and creates a template with unit, integration, and regression test sections.

2. Customize the Test Cases

Edit the generated test file to add specific test cases. Use assets/test_template.json as a reference for test case structure.

3. Run Tests

Execute the test suite:

scripts/run_tests.py your-skill-tests.json --skill-path /path/to/your-skill

Add --verbose flag for detailed output.

Test Types

Unit Tests

Test individual components in isolation (scripts, functions, modules).

Example:

{
  "name": "Test PDF rotation script",
  "type": "script",
  "script": "rotate_pdf.py",
  "args": ["input.pdf", "output.pdf", "90"],
  "expected_exit_code": 0,
  "description": "Verify PDF rotation executes without errors"
}

Integration Tests

Test complete workflows from start to finish.

Example:

{
  "name": "Test document creation workflow",
  "type": "workflow",
  "description": "End-to-end test of document generation",
  "input": {
    "user_query": "Create a report with sections and formatting",
    "files": []
  },
  "expected_output": {
    "type": "docx",
    "validation": "Contains title, sections, and proper formatting"
  }
}

Regression Tests

Compare outputs against known baselines to catch unintended changes.

Example:

{
  "name": "Regression: Output format consistency",
  "description": "Ensure output format hasn't changed",
  "input": {
    "user_query": "Process sample data",
    "files": ["sample.csv"]
  },
  "baseline_file": "baselines/sample_output_v1.txt",
  "validation_method": "exact_match"
}

Creating Test Cases

Input/Output Pair Format

Test cases use input/output pairs to define expected behavior:

Input:

  • User query or prompt that triggers the skill
  • Input files or data
  • Configuration parameters

Expected Output:

  • Exit code (for scripts)
  • Output content or patterns
  • File existence and properties
  • Validation criteria

Validation Methods

Choose the appropriate validation method:

  1. exact_match - Output must match exactly (for deterministic outputs)
  2. contains - Output must contain specific content (for error messages)
  3. pattern - Output must match regex pattern (for formatted data with variable values)
  4. structural_match - Structure must match (for documents with dynamic content)

Managing Baselines

Creating Baselines

For regression tests, create baseline files from known good outputs:

# Run skill and capture output
./skill-script.py input.txt > output.txt

# Create baseline from output
scripts/validate_test_results.py --create-baseline output.txt baselines/

Validating Against Baselines

Compare current output with baseline:

scripts/validate_test_results.py actual.txt baseline.txt --mode exact

Updating Baselines

When skill behavior intentionally changes:

  1. Review the changes carefully
  2. Verify the changes are correct and intended
  3. Update the baseline file
  4. Document why the baseline changed (update notes in test case)

Important: Don't automatically update baselines when tests fail. Investigate first to ensure it's not a regression.

Test Organization

Organize test files and data using this structure:

tests/
├── your-skill-tests.json          # Main test suite
├── fixtures/                      # Test input files
│   ├── sample_input.pdf
│   ├── test_data.csv
│   └── edge_case_data.txt
├── baselines/                     # Expected outputs for regression tests
│   ├── baseline_v1.txt
│   └── baseline_v2.json
└── outputs/                       # Actual test outputs (gitignored)
    └── test_run_*.txt

Workflow Decision Tree

Am I building a new skill? → Generate test template → Customize tests → Run tests

Am I updating an existing skill? → Run existing tests → Add new test cases for new functionality → Update baselines if needed

Am I debugging a failing test? → Run with --verbose → Compare outputs using validate_test_results.py → Fix issue or

Полный SKILL.md на GitHub

Установить skill-testing-framework в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

assets/test_template.jsonreferences/test_patterns.mdreferences/writing_tests.mdscripts/generate_test_template.pyscripts/run_tests.pyscripts/validate_test_results.py

FAQ

Что делает скилл skill-testing-framework?

Provides test cases and validation tools for skills. Use when creating tests for a new skill, adding regression tests after skill updates, running test suites to verify skill functionality, or validating that skill outputs match expected results. Supports unit tests, integration tests, and regression tests with input/output pair validation.

Как установить скилл skill-testing-framework?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл skill-testing-framework запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить skill-testing-framework с