스킬 · 기타

스킬 만들기 도우미 (Anthropic)

새 스킬을 만들고 시험해 고쳐 가는 과정을 돕는 Anthropic 공식 스킬. 라이브러리에 올릴 스킬을 직접 만들 때 씁니다. Apache 2.0.

0번 설치됨
스킬스크립트 포함승인됨원작 Anthropic · Apache-2.0 · 올림 feeeldstudy · 판 1Claude · ChatGPT · Codex · Cursor
skill-creator/scripts/utils.py
"""Shared utilities for skill-creator scripts."""from pathlib import Pathdef parse_skill_md(skill_path: Path) -> tuple[str, str, str]:    """Parse a SKILL.md file, returning (name, description, full_content)."""    content = (skill_path / "SKILL.md").read_text()    lines = content.split("\n")    if lines[0].strip() != "---":        raise ValueError("SKILL.md missing frontmatter (no opening ---)")    end_idx = None    for i, line in enumerate(lines[1:], start=1):        if line.strip() == "---":            end_idx = i            break    if end_idx is None:        raise ValueError("SKILL.md missing frontmatter (no closing ---)")    name = ""    description = ""    frontmatter_lines = lines[1:end_idx]    i = 0    while i < len(frontmatter_lines):        line = frontmatter_lines[i]        if line.startswith("name:"):            name = line[len("name:"):].strip().strip('"').strip("'")        elif line.startswith("description:"):            value = line[len("description:"):].strip()            # Handle YAML multiline indicators (>, |, >-, |-)            if value in (">", "|", ">-", "|-"):                continuation_lines: list[str] = []                i += 1                while i < len(frontmatter_lines) and (frontmatter_lines[i].startswith("  ") or frontmatter_lines[i].startswith("\t")):                    continuation_lines.append(frontmatter_lines[i].strip())                    i += 1                description = " ".join(continuation_lines)                continue            else:                description = value.strip('"').strip("'")        i += 1    return name, description, content