Find the SKILL.md file in a skill directory. Prefers SKILL.md (uppercase) but accepts skill.md (lowercase). Args: skill_dir: Path to the skill directory Returns: Path to the SKILL.md file, or None if not found
(skill_dir: Path)
| 10 | |
| 11 | |
| 12 | def find_skill_md(skill_dir: Path) -> Optional[Path]: |
| 13 | """Find the SKILL.md file in a skill directory. |
| 14 | |
| 15 | Prefers SKILL.md (uppercase) but accepts skill.md (lowercase). |
| 16 | |
| 17 | Args: |
| 18 | skill_dir: Path to the skill directory |
| 19 | |
| 20 | Returns: |
| 21 | Path to the SKILL.md file, or None if not found |
| 22 | """ |
| 23 | for name in ("SKILL.md", "skill.md"): |
| 24 | path = skill_dir / name |
| 25 | if path.exists(): |
| 26 | return path |
| 27 | return None |
| 28 | |
| 29 | |
| 30 | def parse_frontmatter(content: str) -> tuple[dict, str]: |
no outgoing calls