Lesson 4 - Working with Code and Artifacts
Learn to work with Claude's code artifacts: understanding what's generated, running code locally, making modifications, and building runnable projects without deep programming knowledge.
Duration: 2-3 hours
Learning Objectives
By the end of this lesson, you will be able to:
- ✓Understand what artifacts are and how to use them effectively
- ✓Set up a basic local environment to run Claude-generated code
- ✓Read and modify code artifacts without deep programming knowledge
- ✓Test and troubleshoot Claude-generated code independently
Videos
Artifacts Explained: Your Code Workspace
What artifacts are, how they work, and how to think about code Claude generates for you.
Duration: 6 minutes
Setting Up Your Dev Environment (The Minimum)
What tools you actually need to run code locally — no fancy IDE required.
Duration: 6 minutes
Reading Code for Non-Programmers
How to navigate code files, understand structure, and make simple changes without breaking things.
Duration: 7 minutes
Key Concepts
Types of Artifacts and When to Use Each
The Basic Dev Environment Checklist
Running Claude's Code: Step-by-Step
What You Can Safely Change in Code
Troubleshooting Common Issues
Key Definitions
Common Mistakes & Pitfalls
❌ Not running 'npm install' before 'npm start'
Dependencies must be downloaded first. Always run npm install after getting new code.
❌ Editing code in the browser instead of VS Code
Browser changes are temporary. Edit the actual files in VS Code, then refresh.
❌ Deleting brackets or quotes while changing text
Keep the syntax intact. Only change what's inside quotes, not the quotes themselves.
❌ Not checking the terminal for errors
Terminal shows errors first. If something breaks, look there before Googling.
❌ Running random commands without understanding
If Claude says 'run X', ask 'What does this command do?' before running it.
Exercises
Exercise 1: Setup and Run Your First Artifact
60 minutesSet up your dev environment and successfully run a Claude-generated code artifact.
Expected Output:
A running local project (screenshot of it in your browser at localhost:3000) plus documentation of setup steps you followed
Success Criteria:
- •Installed VS Code and Node.js
- •Generated a simple web project with Claude (HTML or React)
- •Successfully ran npm install (if needed)
- •Got the project running in browser
- •Screenshot shows working project
- •Documented any issues encountered and how you solved them
Exercise 2: Customize an Artifact
45 minutesTake a Claude-generated artifact and make 5 meaningful changes without breaking it.
Expected Output:
Before/after screenshots showing your changes, plus the modified code and a list of what you changed
Success Criteria:
- •Made at least 5 distinct changes (text, colors, sizes, etc.)
- •Project still runs after changes
- •Changes are visible and intentional (not random)
- •Can explain what each change does
- •Tested after each change to catch breaks early
Exercise 3: Debug and Fix
30 minutesIntentionally break a working artifact, then use Claude to help you fix it.
Expected Output:
Debug log showing: (1) What you broke, (2) Error message, (3) Prompt you used to ask Claude for help, (4) Claude's fix, (5) Proof it works again
Success Criteria:
- •Intentionally introduced a clear break (deleted a bracket, typo'd a variable, etc.)
- •Captured the full error message from terminal/browser
- •Asked Claude a good debugging question (included error + context)
- •Applied Claude's fix successfully
- •Project works again (screenshot proof)
- •Learned one lesson about what NOT to do
Lesson Reflection
Take a moment to reflect on what you've learned:
- 1. What feels more intimidating: writing code from scratch or modifying Claude's code? Why?
- 2. Think of a simple change you'd want to make to a website you use. Could you make that change in Claude's code?
- 3. How confident do you feel running terminal commands? What would help you feel more comfortable?