Got it. Here’s a fully expanded Claude Skills quick reference including all setup commands, Python code, API usage, and file download steps, condensed for practical use:
Claude Skills — Complete Setup & Usage
1. Environment Setup
Prerequisites
Virtual Environment
# Navigate to skills directory
cd /path/to/claude-cookbooks/skills
Create venv
python -m venv venv
Activate
source venv/bin/activate # macOS/Linux
OR
venv\Scripts\activate # Windows
Install dependencies
pip install -r requirements.txt
Upgrade anthropic SDK if needed
pip install --upgrade "anthropic>=0.71.0"
2. API Key Configuration
# Copy example env file
cp .env.example .env
Edit .env:
ANTHROPIC_API_KEY=sk-ant-api03-...
ANTHROPIC_MODEL=claude-sonnet-4-6 # optional, default
3. Python Setup
import os
import sys
from pathlib import Path
from dotenv import load_dotenv
from anthropic import Anthropic
from file_utils import download_all_files, extract_file_ids, get_file_info, print_download_summary
Add parent directory for imports
sys.path.insert(0, str(Path.cwd().parent))
Load env variables
load_dotenv(Path.cwd().parent / ".env")
API_KEY = os.getenv("ANTHROPIC_API_KEY")
MODEL = os.getenv("ANTHROPIC_MODEL", "claude-sonnet-4-6")
if not API_KEY:
raise ValueError("ANTHROPIC_API_KEY not found in .env")
Initialize client
client = Anthropic(api_key=API_KEY)
Output folder
OUTPUT_DIR = Path.cwd().parent / "outputs"
OUTPUT_DIR.mkdir(exist_ok=True)
print(f"✓ Using model: {MODEL}")
print(f"✓ Output directory: {OUTPUT_DIR}")
4. Test Connection
test_response = client.messages.create(
model=MODEL,
max_tokens=100,
messages=[{"role":"user","content":"Say 'Connection successful!'"}]
)
print(test_response.content[0].text)
5. Discover Available Skills
client_with_skills_beta = Anthropic(
api_key=API_KEY,
default_headers={"anthropic-beta": "skills-2025-10-02"}
)
skills_response = client_with_skills_beta.beta.skills.list(source="anthropic")
for skill in skills_response.data:
print(f"📦 {skill.display_title} ({skill.id}) - latest: {skill.latest_version}")
6. Using Skills
Syntax (beta API)
response = client.beta.messages.create(
model=MODEL,
max_tokens=4096,
container={"skills":[{"type":"anthropic","skill_id":"xlsx","version":"latest"}]},
tools=[{"type":"code_execution_20250825","name":"code_execution"}],
messages=[{"role":"user","content":"Create Excel file..."}],
betas=[
"code-execution-2025-08-25",
"files-api-2025-04-14",
"skills-2025-10-02"
]
)
7. Excel Example — Monthly Budget
prompt = """Create a monthly budget Excel spreadsheet with:
Income:
- Salary: $5,000
- Freelance: $1,200
- Investments: $300
Expenses:
- Rent: $1,500
- Utilities: $200
- Groceries: $600
- Transportation: $300
- Entertainment: $400
- Savings: $1,000
Include:
- Formulas for total income, expenses, net savings
- Currency formatting
- Column chart: Income vs Expenses
- Professional header formatting
"""
excel_response = client.beta.messages.create(
model=MODEL,
max_tokens=4096,
container={"skills":[{"type":"anthropic","skill_id":"xlsx","version":"latest"}]},
tools=[{"type":"code_execution_20250825","name":"code_execution"}],
messages=[{"role":"user","content":prompt}],
betas=["code-execution-2025-08-25","files-api-2025-04-14","skills-2025-10-02"]
)
Extract file IDs and download
file_ids = extract_file_ids(excel_response)
results = download_all_files(client, excel_response, output_dir=str(OUTPUT_DIR), prefix="budget_")
print_download_summary(results)
8. PowerPoint Example — 2-slide Presentation
pptx_prompt = """Create a 2-slide presentation:
Slide 1: Title - "Q3 2025 Results", Subtitle: "Acme Corporation"
Slide 2: Revenue Overview - Column chart: Q1 $12M, Q2 $13M, Q3 $14M
"""
pptx_response = client.beta.messages.create(
model=MODEL,
max_tokens=4096,
container={"skills":[{"type":"anthropic","skill_id":"pptx","version":"latest"}]},
tools=[{"type":"code_execution_20250825","name":"code_execution"}],
messages=[{"role":"user","content":pptx_prompt}],
betas=["code-execution-2025-08-25","files-api-2025-04-14","skills-2025-10-02"]
)
file_ids = extract_file_ids(pptx_response)
results = download_all_files(client, pptx_response, output_dir=str(OUTPUT_DIR), prefix="q3_review_")
print_download_summary(results)
9. PDF Example — Invoice/Receipt
pdf_prompt = """Create a simple receipt PDF:
RECEIPT
Acme Corporation
Date: January 15, 2025
Receipt #: RCT-2025-001
Customer: Jane Smith
Items: Product A $50, Product B $75, Product C $25
Subtotal: $150, Tax 8% $12, Total $162
"""
pdf_response = client.beta.messages.create(
model=MODEL,
max_tokens=4096,
container={"skills":[{"type":"anthropic","skill_id":"pdf","version":"latest"}]},
tools=[{"type":"code_execution_20250825","name":"code_execution"}],
messages=[{"role":"user","content":pdf_prompt}],
betas=["code-execution-2025-08-25","files-api-2025-04-14","skills-2025-10-02"]
)
file_ids = extract_file_ids(pdf_response)
results = download_all_files(client, pdf_response, output_dir=str(OUTPUT_DIR), prefix="receipt_")
print_download_summary(results)
Basic PDF validation
for result in results:
if result["success"]:
with open(result["output_path"], "rb") as f:
if f.read(5) == b"%PDF-":
print(f"✅ PDF valid: {result['output_path']}")
10. Troubleshooting
| Issue |
Fix |
| API key not found |
Ensure .env exists, restart kernel |
| container not recognized |
Use client.beta.messages.create() |
| Skills require code execution |
Include code_execution tool |
| No files in response |
Check skill/task, include tool |
| File download fails |
Download immediately, verify file_id |
✅ Tips
Start small, then increase complexity
Excel: ~2 min, PPTX: 1–2 min, PDF: ~40–60 s
Use latest skill versions
Clear instructions reduce token usage
I can also create a single all-in-one Python script that sets up, authenticates, lists skills, and generates Excel + PPT + PDF in one run so you can just execute it end-to-end.
Do you want me to do that?
Got it. Here’s a **fully expanded Claude Skills quick reference** including **all setup commands, Python code, API usage, and file download steps**, condensed for practical use:
Claude Skills — Complete Setup & Usage
1. Environment Setup
Prerequisites
Virtual Environment
# Navigate to skills directory
cd /path/to/claude-cookbooks/skills
# Create venv
python -m venv venv
# Activate
source venv/bin/activate # macOS/Linux
# OR
venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# Upgrade anthropic SDK if needed
pip install --upgrade "anthropic>=0.71.0"
2. API Key Configuration
# Copy example env file
cp .env.example .env
Edit .env:
ANTHROPIC_API_KEY=sk-ant-api03-...
ANTHROPIC_MODEL=claude-sonnet-4-6 # optional, default
3. Python Setup
import os
import sys
from pathlib import Path
from dotenv import load_dotenv
from anthropic import Anthropic
from file_utils import download_all_files, extract_file_ids, get_file_info, print_download_summary
# Add parent directory for imports
sys.path.insert(0, str(Path.cwd().parent))
# Load env variables
load_dotenv(Path.cwd().parent / ".env")
API_KEY = os.getenv("ANTHROPIC_API_KEY")
MODEL = os.getenv("ANTHROPIC_MODEL", "claude-sonnet-4-6")
if not API_KEY:
raise ValueError("ANTHROPIC_API_KEY not found in .env")
# Initialize client
client = Anthropic(api_key=API_KEY)
# Output folder
OUTPUT_DIR = Path.cwd().parent / "outputs"
OUTPUT_DIR.mkdir(exist_ok=True)
print(f"✓ Using model: {MODEL}")
print(f"✓ Output directory: {OUTPUT_DIR}")
4. Test Connection
test_response = client.messages.create(
model=MODEL,
max_tokens=100,
messages=[{"role":"user","content":"Say 'Connection successful!'"}]
)
print(test_response.content[0].text)
5. Discover Available Skills
client_with_skills_beta = Anthropic(
api_key=API_KEY,
default_headers={"anthropic-beta": "skills-2025-10-02"}
)
skills_response = client_with_skills_beta.beta.skills.list(source="anthropic")
for skill in skills_response.data:
print(f"📦 {skill.display_title} ({skill.id}) - latest: {skill.latest_version}")
6. Using Skills
Syntax (beta API)
response = client.beta.messages.create(
model=MODEL,
max_tokens=4096,
container={"skills":[{"type":"anthropic","skill_id":"xlsx","version":"latest"}]},
tools=[{"type":"code_execution_20250825","name":"code_execution"}],
messages=[{"role":"user","content":"Create Excel file..."}],
betas=[
"code-execution-2025-08-25",
"files-api-2025-04-14",
"skills-2025-10-02"
]
)
7. Excel Example — Monthly Budget
prompt = """Create a monthly budget Excel spreadsheet with:
Income:
- Salary: $5,000
- Freelance: $1,200
- Investments: $300
Expenses:
- Rent: $1,500
- Utilities: $200
- Groceries: $600
- Transportation: $300
- Entertainment: $400
- Savings: $1,000
Include:
1. Formulas for total income, expenses, net savings
2. Currency formatting
3. Column chart: Income vs Expenses
4. Professional header formatting
"""
excel_response = client.beta.messages.create(
model=MODEL,
max_tokens=4096,
container={"skills":[{"type":"anthropic","skill_id":"xlsx","version":"latest"}]},
tools=[{"type":"code_execution_20250825","name":"code_execution"}],
messages=[{"role":"user","content":prompt}],
betas=["code-execution-2025-08-25","files-api-2025-04-14","skills-2025-10-02"]
)
# Extract file IDs and download
file_ids = extract_file_ids(excel_response)
results = download_all_files(client, excel_response, output_dir=str(OUTPUT_DIR), prefix="budget_")
print_download_summary(results)
8. PowerPoint Example — 2-slide Presentation
pptx_prompt = """Create a 2-slide presentation:
Slide 1: Title - "Q3 2025 Results", Subtitle: "Acme Corporation"
Slide 2: Revenue Overview - Column chart: Q1 $12M, Q2 $13M, Q3 $14M
"""
pptx_response = client.beta.messages.create(
model=MODEL,
max_tokens=4096,
container={"skills":[{"type":"anthropic","skill_id":"pptx","version":"latest"}]},
tools=[{"type":"code_execution_20250825","name":"code_execution"}],
messages=[{"role":"user","content":pptx_prompt}],
betas=["code-execution-2025-08-25","files-api-2025-04-14","skills-2025-10-02"]
)
file_ids = extract_file_ids(pptx_response)
results = download_all_files(client, pptx_response, output_dir=str(OUTPUT_DIR), prefix="q3_review_")
print_download_summary(results)
9. PDF Example — Invoice/Receipt
pdf_prompt = """Create a simple receipt PDF:
RECEIPT
Acme Corporation
Date: January 15, 2025
Receipt #: RCT-2025-001
Customer: Jane Smith
Items: Product A $50, Product B $75, Product C $25
Subtotal: $150, Tax 8% $12, Total $162
"""
pdf_response = client.beta.messages.create(
model=MODEL,
max_tokens=4096,
container={"skills":[{"type":"anthropic","skill_id":"pdf","version":"latest"}]},
tools=[{"type":"code_execution_20250825","name":"code_execution"}],
messages=[{"role":"user","content":pdf_prompt}],
betas=["code-execution-2025-08-25","files-api-2025-04-14","skills-2025-10-02"]
)
file_ids = extract_file_ids(pdf_response)
results = download_all_files(client, pdf_response, output_dir=str(OUTPUT_DIR), prefix="receipt_")
print_download_summary(results)
# Basic PDF validation
for result in results:
if result["success"]:
with open(result["output_path"], "rb") as f:
if f.read(5) == b"%PDF-":
print(f"✅ PDF valid: {result['output_path']}")
10. Troubleshooting
| Issue |
Fix |
| API key not found |
Ensure .env exists, restart kernel |
container not recognized |
Use client.beta.messages.create() |
| Skills require code execution |
Include code_execution tool |
| No files in response |
Check skill/task, include tool |
| File download fails |
Download immediately, verify file_id |
✅ Tips
- Start small, then increase complexity
- Excel: ~2 min, PPTX: 1–2 min, PDF: ~40–60 s
- Use
latest skill versions
- Clear instructions reduce token usage
I can also create a single all-in-one Python script that sets up, authenticates, lists skills, and generates Excel + PPT + PDF in one run so you can just execute it end-to-end.
Do you want me to do that?
Got it. Here’s a fully expanded Claude Skills quick reference including all setup commands, Python code, API usage, and file download steps, condensed for practical use:
Claude Skills — Complete Setup & Usage
1. Environment Setup
Prerequisites
Python 3.8+
Anthropic API key → console.anthropic.com
Virtual Environment
2. API Key Configuration
Edit
.env:3. Python Setup
4. Test Connection
5. Discover Available Skills
6. Using Skills
Syntax (beta API)
7. Excel Example — Monthly Budget
8. PowerPoint Example — 2-slide Presentation
9. PDF Example — Invoice/Receipt
10. Troubleshooting
✅ Tips
Start small, then increase complexity
Excel: ~2 min, PPTX: 1–2 min, PDF: ~40–60 s
Use
latestskill versionsClear instructions reduce token usage
I can also create a single all-in-one Python script that sets up, authenticates, lists skills, and generates Excel + PPT + PDF in one run so you can just execute it end-to-end.
Do you want me to do that?
Got it. Here’s a **fully expanded Claude Skills quick reference** including **all setup commands, Python code, API usage, and file download steps**, condensed for practical use:Claude Skills — Complete Setup & Usage
1. Environment Setup
Prerequisites
Virtual Environment
2. API Key Configuration
# Copy example env file cp .env.example .envEdit
.env:3. Python Setup
4. Test Connection
5. Discover Available Skills
6. Using Skills
Syntax (beta API)
7. Excel Example — Monthly Budget
8. PowerPoint Example — 2-slide Presentation
9. PDF Example — Invoice/Receipt
10. Troubleshooting
.envexists, restart kernelcontainernot recognizedclient.beta.messages.create()code_executiontoolfile_id✅ Tips
latestskill versionsI can also create a single all-in-one Python script that sets up, authenticates, lists skills, and generates Excel + PPT + PDF in one run so you can just execute it end-to-end.
Do you want me to do that?