이 튜토리얼에서는 Agent Skills를 사용하여 PowerPoint 프레젠테이션을 만드는 방법을 보여줍니다. Skills를 활성화하고, 요청을 만들고, 생성된 파일에 접근하는 방법을 배우게 됩니다.
curl과 jq사전 구축된 Agent Skills는 문서 생성, 데이터 분석, 파일 처리와 같은 작업을 위한 전문 지식으로 Claude의 기능을 확장합니다. Anthropic은 API에서 다음과 같은 사전 구축된 Agent Skills를 제공합니다:
커스텀 Skills를 만들려면, 도메인별 전문 지식을 갖춘 자신만의 Skills를 구축하는 예제를 보여주는 Agent Skills Cookbook을 참조하세요.
먼저, 어떤 Skills를 사용할 수 있는지 확인합니다. Skills API를 사용하여 Anthropic이 관리하는 모든 Skills를 나열하세요. 각 언어 탭은 하나의 연속된 스크립트에서 발췌한 것이며, import와 클라이언트 설정은 상단에 있습니다:
# Anthropic 관리 Skills 목록 조회
ant beta:skills list --source anthropic다음과 같은 Skills를 볼 수 있습니다: pptx, xlsx, docx, pdf.
이 API는 각 Skill의 메타데이터, 즉 이름과 설명을 반환합니다. Claude는 시작 시 이 메타데이터를 로드하여 어떤 Skills를 사용할 수 있는지 판단합니다. 이것이 progressive disclosure(점진적 공개)의 첫 번째 단계로, Claude가 전체 지침을 아직 로드하지 않은 상태에서 Skills를 발견하는 단계입니다.
PowerPoint Skill을 사용하여 재생 가능 에너지에 관한 프레젠테이션을 만듭니다. Messages API의 container 매개변수를 사용하여 Skills를 지정하세요:
# PowerPoint Skill을 사용하여 메시지 생성
response = client.beta.messages.create(
model="claude-opus-5",
max_tokens=16000,
betas=["skills-2025-10-02"],
container={
"skills": [{"type": "anthropic", "skill_id": "pptx", "version": "latest"}]
},
messages=[
{
"role": "user",
"content": "Create a presentation about renewable energy with 5 slides",
}
],
tools=[{"type": "code_execution_20260521", "name": "code_execution"}],
)
print(f"stop_reason={response.stop_reason}, blocks={len(response.content)}")요청에는 다음과 같은 부분이 포함됩니다:
model: 코드 실행 도구를 지원하는 모델container.skills: Claude가 사용할 수 있는 Skills를 지정type: "anthropic": Anthropic이 관리하는 Skill임을 나타냄skill_id: "pptx": PowerPoint Skill 식별자version: "latest": 가장 최근에 게시된 버전으로 설정된 Skill 버전tools: 코드 실행 활성화 (Skills에 필수)skills-2025-10-02이 페이지의 예제는 code_execution_20260521 도구 버전을 사용하며, 이는 정식 출시되어 skills-2025-10-02 베타 헤더만 필요합니다. 3단계 코드는 현재 도구 버전이 반환하는 결과 타입을 파싱합니다. Skills는 code_execution_20250825와 같은 이전 코드 실행 도구 버전에서도 작동합니다. 현재의 모든 코드 실행 도구 버전은 Skills 요구 사항을 충족합니다. 다른 버전을 사용하는 경우, 해당 도구의 type과 베타 헤더를 코드 실행 도구 페이지와 일치하도록 유지하고, 항상 skills-2025-10-02를 포함하세요.
이 요청을 만들면 Claude가 자동으로 작업을 관련 Skill과 매칭합니다. 프레젠테이션을 요청했기 때문에 Claude는 PowerPoint Skill이 관련이 있다고 판단하고 전체 지침을 로드합니다. 이것이 점진적 공개의 두 번째 단계입니다. 그런 다음 Claude는 Skill의 코드를 실행하여 프레젠테이션을 만듭니다.
프레젠테이션은 코드 실행 컨테이너에서 생성되어 파일로 저장되었습니다. 2단계의 response에는 파일 ID가 포함된 파일 참조가 들어 있습니다. 파일 ID를 추출하고 Files API로 파일을 다운로드하세요. 이 예제는 시스템 임시 디렉터리에 파일을 저장합니다:
# 파일 ID를 추출합니다. 코드 실행 도구는 Bash 하위 도구를 통해
# Skill의 코드를 실행하며, 생성된 파일은 bash_code_execution_tool_result
# 블록 내부에 bash_code_execution_output 항목으로 나타납니다.
file_id = None
for block in response.content:
if block.type == "bash_code_execution_tool_result":
if block.content.type == "bash_code_execution_result":
for output in block.content.content:
file_id = output.file_id
if file_id:
# 파일을 다운로드하고 저장
output_path = Path(tempfile.gettempdir()) / "renewable_energy.pptx"
file_content = client.beta.files.download(file_id=file_id)
file_content.write_to_file(output_path)
print(f"Presentation saved to {output_path}")생성된 파일 작업에 대한 자세한 내용은 코드 실행 도구 문서의 생성된 파일 가져오기를 참조하세요.
다음과 같은 변형을 시도해 보세요:
response = client.beta.messages.create(
model="claude-opus-5",
max_tokens=16000,
betas=["skills-2025-10-02"],
container={
"skills": [{"type": "anthropic", "skill_id": "xlsx", "version": "latest"}]
},
messages=[
{
"role": "user",
"content": "Create a quarterly sales tracking spreadsheet with sample data",
}
],
tools=[{"type": "code_execution_20260521", "name": "code_execution"}],
)response = client.beta.messages.create(
model="claude-opus-5",
max_tokens=16000,
betas=["skills-2025-10-02"],
container={
"skills": [{"type": "anthropic", "skill_id": "docx", "version": "latest"}]
},
messages=[
{
"role": "user",
"content": "Write a 2-page report on the benefits of renewable energy",
}
],
tools=[{"type": "code_execution_20260521", "name": "code_execution"}],
)response = client.beta.messages.create(
model="claude-opus-5",
max_tokens=16000,
betas=["skills-2025-10-02"],
container={
"skills": [{"type": "anthropic", "skill_id": "pdf", "version": "latest"}]
},
messages=[
{
"role": "user",
"content": "Generate a PDF invoice template",
}
],
tools=[{"type": "code_execution_20260521", "name": "code_execution"}],
)Claude가 성공적으로 발견하고 사용할 수 있는 효과적인 Skills를 작성하는 방법을 알아보세요.
API를 통해 Claude의 기능을 확장하기 위해 Agent Skills를 사용하는 방법을 알아보세요.
전문화된 작업을 위해 자신만의 Skills를 업로드하세요.
Claude Code의 Skills에 대해 알아보세요.
예제 Skills와 구현 패턴을 살펴보세요.
Was this page helpful?