MCPcopy
hub / github.com/agentskills/agentskills / find_skill_md

Function find_skill_md

skills-ref/src/skills_ref/parser.py:12–27  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

10
11
12def 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
30def parse_frontmatter(content: str) -> tuple[dict, str]:

Callers 6

validateFunction · 0.85
to_promptFunction · 0.85
read_propertiesFunction · 0.85

Calls

no outgoing calls