Read and print skill properties as JSON. Parses the YAML frontmatter from SKILL.md and outputs the properties as JSON. Exit codes: 0: Success 1: Parse error
(skill_path: Path)
| 53 | @main.command("read-properties") |
| 54 | @click.argument("skill_path", type=click.Path(exists=True, path_type=Path)) |
| 55 | def read_properties_cmd(skill_path: Path): |
| 56 | """Read and print skill properties as JSON. |
| 57 | |
| 58 | Parses the YAML frontmatter from SKILL.md and outputs the |
| 59 | properties as JSON. |
| 60 | |
| 61 | Exit codes: |
| 62 | 0: Success |
| 63 | 1: Parse error |
| 64 | """ |
| 65 | try: |
| 66 | if _is_skill_md_file(skill_path): |
| 67 | skill_path = skill_path.parent |
| 68 | |
| 69 | props = read_properties(skill_path) |
| 70 | click.echo(json.dumps(props.to_dict(), indent=2)) |
| 71 | except SkillError as e: |
| 72 | click.echo(f"Error: {e}", err=True) |
| 73 | sys.exit(1) |
| 74 | |
| 75 | |
| 76 | @main.command("to-prompt") |
nothing calls this directly
no test coverage detected