Module 08 — Your First Real Automation
🎯 Goal: Build a genuinely useful automation start-to-finish, so the whole toolchain clicks into place. ⏱️ Time: 1–2 hours.
The project: a "messy folder organizer"
Everyone has a chaotic Downloads folder. We'll build a tool that sorts files into subfolders by type (PDFs together, images together, spreadsheets together). It's safe, useful, and touches every skill you've learned.
This mirrors your real work: take a pile of files, apply a rule to each one, end up organized. Think of it as the training-wheels version of real document automation — the same moves (read files, apply a rule, write results), but on throwaway files so there's zero risk. Master this shape and the document workflows in Module 09 are just variations.
Step 1 — Set up a safe playground
Never test a new automation on real files. Make a sandbox with throwaway files first.
cd ~
uv init folder-organizer
cd folder-organizer
mkdir messy
code .
Now create some fake files to sort. You can do this by hand in VS Code, or just
ask Claude Code to do it (next step). Either way, we want a few .pdf, .png,
.txt, and .xlsx files inside messy/ — they can be empty; we only care about
their names.
Step 2 — Start Claude Code and describe the goal
claude
Then, building up step by step (remember Module 07's principles):
First, set up test data:
Create about 8 empty test files inside the "messy" folder with a mix of extensions: a few .pdf, a few .png, a couple .txt, and a couple .xlsx, with realistic-sounding names.
Then, plan before doing:
I want a Python program that looks at every file in the "messy" folder and moves each one into a subfolder named after its type — so PDFs go into "messy/pdf", PNGs into "messy/png", and so on. Before writing it, explain your plan in plain English and tell me if there are any edge cases I should think about.
Read its plan. It might raise good questions ("what about files with no extension?"). Answer them. This conversation is the work — you're designing the tool together.
Then, build and run:
Good, build it and run it on the messy folder. Show me the folder structure before and after.
Step 3 — Verify the result yourself
Don't just trust it — look:
- In VS Code's Explorer, expand the
messyfolder. Are there nowpdf,png, etc. subfolders with the right files inside? - In the terminal, you can also check: ask Claude Code "show me the contents of each subfolder."
If something's wrong, give specific feedback:
The .xlsx files went into a folder called "xlsx" but I'd rather call that folder "spreadsheets". Can you adjust and re-run on a fresh copy?
Step 4 — Make it reusable and safe
Now harden it into something you'd actually trust on real files:
Make two improvements: (1) if a destination subfolder already has a file with the same name, don't overwrite it — add a number instead. (2) Add a "dry run" mode that just prints what would be moved without actually moving anything, so I can preview before committing. Show me how to run each mode.
This teaches a habit you'll want forever: preview, then execute. Always dry-run on real data first.
Step 5 — Save your work with Git
You learned this in Module 05 — now use it for real:
Commit all of this with a sensible message.
Or do it yourself:
git add -A
git commit -m "Add folder organizer with dry-run mode"
Now this tool is saved. You could come back in a month, copy it, and point it at a real folder.
Step 6 — Reflect on what just happened
You used every tool in the course:
- Ghostty — to run everything
- uv — created the project, ran the code
- VS Code — watched files appear and verified results
- Git — saved the working version
- Claude Code — designed and wrote it with you
And you never wrote a line of Python yourself. You directed. That's the model for everything ahead.
Practice variations (pick one or two)
To cement the skill, ask Claude Code to extend the project:
- "Instead of by file type, sort the files into folders by the month they were last modified."
- "Add a summary at the end: how many files were moved into each folder."
- "Make a version that finds duplicate files (same name) and lists them instead of moving anything."
Each one is the same shape of problem with a twist — exactly how real work varies day to day.
✅ You're done with this module when
- You built, ran, and verified the organizer on test files.
- You added a dry-run/preview mode and understand why that's a good habit.
- You committed it with Git.
- You feel the rhythm: describe → plan → build → verify → refine → save.