Testing Skills
Testing Skills
Section titled “Testing Skills”Prefer pytest against your tool functions and hub validation against the package path.
Native tools skill
Section titled “Native tools skill”my_skill/ skill_manifest.yaml tools.py tests/ test_tools.pyimport pytestfrom tools import example_echo # or import path under kazma_skills.native…
@pytest.mark.asyncioasync def test_example_echo(): out = await example_echo(message="Hello") assert "Hello" in outHub package validation
Section titled “Hub package validation”kazma hub validate ./my_skillkazma hub check-certification ./my_skillManifest unit test:
import yamlfrom pathlib import Path
def test_manifest_loads(): data = yaml.safe_load(Path("skill_manifest.yaml").read_text(encoding="utf-8")) assert data.get("name") assert "tools" in data or data.get("entry_point")Danger / HITL
Section titled “Danger / HITL”If a tool is on the danger list, integration tests should either:
- Mock the safety bus, or
- Pass the graph’s approved path only in controlled fixtures
Do not disable HITL in production-like tests without an explicit escape hatch flag.