This tutorial shows you how to use Agent Skills to create a PowerPoint presentation. You'll learn how to enable Skills, make a simple request, and access the generated file.
Pre-built Agent Skills extend Claude's capabilities with specialized expertise for tasks like creating documents, analyzing data, and processing files. Anthropic provides the following pre-built Agent Skills in the API:
Want to create custom Skills? See the Agent Skills Cookbook for examples of building your own Skills with domain-specific expertise.
First, check what Skills are available. Use the Skills API to list all Anthropic-managed Skills:
# List Anthropic-managed Skills
ant beta:skills list --source anthropicYou see the following Skills: pptx, xlsx, docx, and pdf.
This API returns each Skill's metadata: its name and description. Claude loads this metadata at startup to know what Skills are available. This is the first level of progressive disclosure, where Claude discovers Skills without loading their full instructions yet.
Now use the PowerPoint Skill to create a presentation about renewable energy. Specify Skills using the container parameter in the Messages API:
# Create a message with the PowerPoint Skill
response = client.beta.messages.create(
model="claude-opus-4-8",
max_tokens=16000,
betas=["code-execution-2025-08-25", "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_20250825", "name": "code_execution"}],
)
print(f"stop_reason={response.stop_reason}, blocks={len(response.content)}")Let's break down what each part does:
container.skills: Specifies which Skills Claude can usetype: "anthropic": Indicates this is an Anthropic-managed Skillskill_id: "pptx": The PowerPoint Skill identifierversion: "latest": The Skill version set to the most recently publishedtools: Enables code execution (required for Skills)code-execution-2025-08-25 and skills-2025-10-02The examples here use the code_execution_20250825 tool version with its matching code-execution-2025-08-25 beta header. Skills also work with the newer code execution tool revisions (code_execution_20260120 and later); any code execution tool version satisfies the Skills requirement. Whichever version you use, keep its tool type and beta header consistent with the code execution tool page, and always include skills-2025-10-02.
When you make this request, Claude automatically matches your task to the relevant Skill. Since you asked for a presentation, Claude determines the PowerPoint Skill is relevant and loads its full instructions: the second level of progressive disclosure. Then Claude executes the Skill's code to create your presentation.
The presentation was created in the code execution container and saved as a file. The response includes a file reference with a file ID. Extract the file ID and download it using the Files API:
# Extract file ID from the code-execution tool result. The Skill might run
# its work through either the Python or bash code-execution tool, so check
# both result types.
file_id = None
for block in response.content:
if block.type == "code_execution_tool_result":
if block.content.type == "code_execution_result":
for output in block.content.content:
file_id = output.file_id
elif 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:
# Download the file and save it
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}")For complete details on working with generated files, see the code execution tool documentation.
Now that you've created your first document with Skills, try these variations:
response = client.beta.messages.create(
model="claude-opus-4-8",
max_tokens=16000,
betas=["code-execution-2025-08-25", "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_20250825", "name": "code_execution"}],
)response = client.beta.messages.create(
model="claude-opus-4-8",
max_tokens=16000,
betas=["code-execution-2025-08-25", "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_20250825", "name": "code_execution"}],
)response = client.beta.messages.create(
model="claude-opus-4-8",
max_tokens=16000,
betas=["code-execution-2025-08-25", "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_20250825", "name": "code_execution"}],
)Now that you've used pre-built Agent Skills, you can:
Use Skills with the Claude API
Upload your own Skills for specialized tasks
Learn best practices for writing effective Skills
Learn about Skills in Claude Code
Explore example Skills and implementation patterns
Was this page helpful?