diff --git a/cowork-plugin-management/skills/create-cowork-plugin/references/component-schemas.md b/cowork-plugin-management/skills/create-cowork-plugin/references/component-schemas.md index c8eec4e0..dfb37240 100644 --- a/cowork-plugin-management/skills/create-cowork-plugin/references/component-schemas.md +++ b/cowork-plugin-management/skills/create-cowork-plugin/references/component-schemas.md @@ -13,6 +13,7 @@ Detailed format specifications for every plugin component type. Reference this w | ------------- | -------- | ------ | ------------------------------------------------------- | | `name` | Yes | String | Skill identifier (lowercase, hyphens; matches dir name) | | `description` | Yes | String | Third-person description with trigger phrases | +| `stability` | No | String | `experimental`, `stable`, or `deprecated` | | `metadata` | No | Map | Arbitrary key-value pairs (e.g., `version`, `author`) | ### Example Skill @@ -24,6 +25,7 @@ description: > This skill should be used when the user asks to "design an API", "create API endpoints", "review API structure", or needs guidance on REST API best practices, endpoint naming, or request/response design. +stability: stable metadata: version: "0.1.0" --- diff --git a/data/skills/data-context-extractor/scripts/package_data_skill.py b/data/skills/data-context-extractor/scripts/package_data_skill.py index c71f583b..3e7f692f 100644 --- a/data/skills/data-context-extractor/scripts/package_data_skill.py +++ b/data/skills/data-context-extractor/scripts/package_data_skill.py @@ -13,6 +13,7 @@ import sys import zipfile from pathlib import Path +from typing import Optional def validate_skill(skill_path: Path) -> tuple[bool, str]: @@ -38,10 +39,24 @@ def validate_skill(skill_path: Path) -> tuple[bool, str]: if "[PLACEHOLDER]" in content or "[COMPANY]" in content: return False, "SKILL.md contains unfilled placeholder text" + # Validate stability field if present + allowed_stability_values = ["experimental", "stable", "deprecated"] + + for line in content.splitlines(): + if line.strip().startswith("stability:"): + stability_value = line.split(":", 1)[1].strip() + + if stability_value not in allowed_stability_values: + return ( + False, + f"Invalid stability value: '{stability_value}'. " + f"Allowed values are: {', '.join(allowed_stability_values)}" + ) + return True, "Validation passed" -def package_skill(skill_path: str, output_dir: str = None) -> Path | None: +def package_skill(skill_path: str, output_dir: str = None) -> Optional[Path]: """ Package a skill folder into a .skill file.