···5454 style=CUSTOM_STYLE,
5555 qmark="◆",
5656 pointer=">",
5757- instruction="(↑↓ move, space select, a toggle all, enter confirm)",
5757+ instruction="(space select, enter confirm, ↑↓ move, a toggle all)",
5858 ).ask()
59596060 return selected
+10-21
pixi_skills/skill.py
···55from enum import StrEnum
66from pathlib import Path
7788+import yaml
99+810911class Scope(StrEnum):
1012 """Scope of a skill - local or global.
···81838284 frontmatter = content[3 : 3 + end_match.start()]
83858484- # Simple YAML parsing for name and description
8585- name = None
8686- description = None
8686+ data = yaml.safe_load(frontmatter)
8787+ if not isinstance(data, dict):
8888+ raise ValueError(f"Invalid YAML frontmatter in {skill_md}")
87898888- for line in frontmatter.split("\n"):
8989- line = line.strip()
9090- if line.startswith("name:"):
9191- name = line[5:].strip().strip("\"'")
9292- elif line.startswith("description:"):
9393- # Handle multiline or quoted descriptions
9494- desc_value = line[12:].strip()
9595- if desc_value.startswith('"'):
9696- # Quoted description
9797- description = desc_value.strip('"')
9898- elif desc_value.startswith("'"):
9999- description = desc_value.strip("'")
100100- elif desc_value.startswith("|") or desc_value.startswith(">"):
101101- # Multiline - for now just use the directory name
102102- description = ""
103103- else:
104104- description = desc_value
9090+ name = data.get("name")
9191+ if name is not None:
9292+ name = str(name)
105939494+ description = data.get("description")
10695 if description is None:
10796 raise ValueError(f"Missing 'description' in SKILL.md frontmatter: {skill_md}")
10897109109- return name, description
9898+ return name, str(description)
11099111100112101def discover_local_skills(env: str) -> list[Skill]: