Companion page

Practice files

All files are fictional practice material: Lantern Bay Coffee and everyone else in them are invented. Use them as the exercises describe, then repeat the exercise on your own work.

Download everything (ZIP)

Chapter 28 scripts. You need Python 3.10 or later and the Anthropic Python SDK (pip install anthropic). Set your key in the terminal as ANTHROPIC_API_KEY; never paste it into a script. Put the three practice documents in a folder named docs next to the scripts.

Chapter 4 · Working with Files, Images, and Artifacts · all files (ZIP)

lantern-bay-customer-survey.pdfSix-page spring survey: summarize it and question it (EX-04-01, EX-04-02)
lantern-bay-bean-sales.pngMonthly bean sales chart to read from an image (EX-04-03)

Chapter 5 · Projects, Memory, and Context Management · all files (ZIP)

lantern-bay-cafe-facts.txtCafé facts sheet for your first Project
lantern-bay-voice-guide.txtVoice guide for your first Project
lantern-bay-customer-survey.pdfThe survey again, for the Project's knowledge

Chapter 7 · Core Prompting Techniques: Examples, Structure, and Formatting · all files (ZIP)

subscriber-comments.txtEight first-subscriber comments to tag and sort

Chapter 16 · Data Analysis I: Spreadsheets, CSVs, and Charts · all files (ZIP)

lantern-bay-bean-sales.csv96 rows: month, coffee, channel, bags (also used in Ch 18, 21, 24)
lantern-bay-bean-sales.xlsxThe same data as an Excel file
kenji-job-log-messy.csvA messy bike-shop job log to profile and clean
fern-and-fig-weekly-orders.csvTwelve weeks of orders with one outlier

Chapter 17 · Data Analysis II: Documents, Decisions, and Strategic Analysis · all files (ZIP)

bakery-supply-agreement-v1.txtSupply agreement, original
bakery-supply-agreement-v2.txtSupply agreement, renewal: compare the two

Chapter 18 · Content Creation I: Artifacts — Interactive Tools, Apps, and Dashboards · all files (ZIP)

my-spending-jul-sep.csvThree months of a fictional person's spending, 82 rows

Chapter 21 · Workflow Automation II: Agents, Browser and Computer Use, and Claude Code · all files (ZIP)

totals.pyThe broken script for the debugging exercise (EX-21-08)
lantern-bay-bean-sales.csvThe sales file the script reads

Chapter 25 · Marketing and Content Creator Workflows · all files (ZIP)

studio-intro-campaign.csvA four-week campaign by channel, 16 rows

Chapter 26 · Knowledge Work, Management, and Team Workflows · all files (ZIP)

holiday-drive-tracker.csvTwelve-row project tracker for status reports

Chapter 28 · Building with the Claude API: A Practical Introduction · all files (ZIP)

first_call.pyYour first API call (EX-28-01)
summarize.pyDocument summarizer (EX-28-02)
summarize_system.pyThe summarizer with a system prompt (EX-28-03)
summarize_json.pyStructured JSON output (EX-28-04)
capacity_agent.pyA small agent with one tool (EX-28-05)
subscriber-comments.txtPractice document 1 for the scripts (put in a docs folder)
bakery-agreement-v1.txtPractice document 2
team-meeting-nov12.txtPractice document 3

Chapter 20 · sample skill

lantern-bay-voice.zipThe finished skill from the walkthrough, ready to upload under Customize > Skills. Build your own first; use this to compare.