Validate a skill directory. Checks that the skill has a valid SKILL.md with proper frontmatter, correct naming conventions, and required fields. Exit codes: 0: Valid skill 1: Validation errors found
(skill_path: Path)
| 27 | @main.command("validate") |
| 28 | @click.argument("skill_path", type=click.Path(exists=True, path_type=Path)) |
| 29 | def validate_cmd(skill_path: Path): |
| 30 | """Validate a skill directory. |
| 31 | |
| 32 | Checks that the skill has a valid SKILL.md with proper frontmatter, |
| 33 | correct naming conventions, and required fields. |
| 34 | |
| 35 | Exit codes: |
| 36 | 0: Valid skill |
| 37 | 1: Validation errors found |
| 38 | """ |
| 39 | if _is_skill_md_file(skill_path): |
| 40 | skill_path = skill_path.parent |
| 41 | |
| 42 | errors = validate(skill_path) |
| 43 | |
| 44 | if errors: |
| 45 | click.echo(f"Validation failed for {skill_path}:", err=True) |
| 46 | for error in errors: |
| 47 | click.echo(f" - {error}", err=True) |
| 48 | sys.exit(1) |
| 49 | else: |
| 50 | click.echo(f"Valid skill: {skill_path}") |
| 51 | |
| 52 | |
| 53 | @main.command("read-properties") |
nothing calls this directly
no test coverage detected