Skip to main content
Updated Feb 16, 2026

Capstone: Your File Processing Toolkit

Your accountant just called. They need a 1099-DIV from 2025. You have 300 files on your Desktop. Clock's ticking. Which workflow do you reach for?

That's the real test. Not whether you know six workflows — but whether you know which one to grab when your files are on fire and someone is waiting. Different scenarios require different workflow orders. There's no single correct sequence.

Before we build your permanent prompt toolkit, let's test your judgment.


Triage Under Pressure

For each scenario, decide which workflow(s) to use and in what order BEFORE reading the insight. Then open Claude Code and try your approach.

Your Desktop has 300+ files. You need one specific tax document. Your accountant is waiting on the phone.

You: I need to find a 1099-DIV document from 2025. It's somewhere on
my Desktop. I need it RIGHT NOW.

Before you run this — think: Do you survey first (Lesson 1), or go straight to search (Lesson 6)?

Insight: Urgency overrides the normal sequence. Search first, organize later. When someone is waiting, you don't map the territory — you find the one thing you need. The survey-first pattern is for when you have time to be systematic.

Scenario 2: The Fresh Start

You want to reorganize your Desktop, but you've never looked at what's there. No backup exists.

You: I want to completely reorganize my Desktop. What should I do first?

Before you run this — think: What's your workflow and in what order?

Insight: Survey → Backup → Organize. The order matters. If you skip the survey, your categories won't match your actual files. If you skip the backup, one wrong move and you're panicking. The safety-first pattern from Lesson 2 isn't optional — it's what makes everything else safe to attempt.

Scenario 3: The Botched Script

You ran a batch rename script on your Desktop and now 40 files have garbled names. Some files seem missing entirely.

You: I ran a rename script and it went wrong. Some files have garbled
names and I think some are missing. What do I do?

Before you run this — think: What do you do FIRST — try to fix the names, or something else?

Insight: Compare against backup first. Don't start fixing individual files until you know the full extent of the damage. The recovery workflow from Lesson 5 starts with diagnosis (compare current state vs backup), not treatment. Files that "seem missing" might just be renamed — the backup comparison will tell you.

Scenario 4: The Recurring Problem

You have 150 screenshots on your Desktop. You want them organized by month. You'll get 20+ more next week.

You: I have 150 screenshots cluttering my Desktop. I want them organized
by month. But I'll get more screenshots next week. What's my best approach?

Before you run this — think: One-time organization or script generation?

Insight: Recurring problems need scripts, not one-time commands. The batch operations pattern from Lesson 4 taught you to ask for reusable scripts. If you just organize these 150 files manually, you'll be back here next month. Ask for a script that handles the current backlog AND future screenshots.


The Real Test: Your Desktop in 15 Minutes

Close the book. Open Claude Code. Point it at a folder you haven't touched yet — your Desktop, your Documents, an old project folder. Set a timer for 15 minutes.

Your goal: survey it, back it up, organize it, and verify the results. Use the workflows you've learned, in whatever order the situation demands.

I need to get my [Desktop / Documents / other folder] under control.
I have 15 minutes. Let's start with a survey so I know what I'm
working with, then create a backup of anything important, then
organize what's left. Go.

What makes this different from the exercises: Nobody is telling you which workflow to use or in what order. You have to assess the situation and choose. That's the skill — not knowing six workflows, but knowing which one to reach for.

After 15 minutes, check your work:

  • Did you survey before organizing? (Or did urgency make you skip it?)
  • Did you back up before making changes? (Or did you forget?)
  • Did you verify the results? (Or did you assume success?)
  • What would you do differently with 15 more minutes?

The answers reveal which patterns have become instinct and which still need practice.


Build Your Prompt Toolkit

Now capture what you've learned in a permanent document.

Help me create MY-PROMPT-TOOLKIT.md with fill-in-the-blank templates
for each workflow I've practiced: survey, backup, organize, batch,
recover, search, and verify. For each template, include the key
phrases that trigger the right agent behavior.

This toolkit is the chapter's most important deliverable. The organized folders will get messy again. The scripts will need updates. But the templates — the patterns for how you direct an agent — those are permanently useful.


The Seven Principles in Action

You've been learning the Seven Principles without memorizing them. Let's make explicit what emerged through practice.

LessonWhat You DidPrinciple That Emerged
1. SurveyRan bash commands to analyze folderP1: Bash is the Key
1. SurveyMade chaos visible through reportsP7: Observability
2. Safety FirstCreated backup before changesP6: Constraints and Safety
2. Safety FirstVerified backup was completeP3: Verification as Core Step
3. OrganizationDocumented rules in rules.mdP5: Persisting State in Files
3. OrganizationTested on one file firstP4: Small, Reversible Decomp.
4. Batch OperationsGenerated reusable scriptP2: Code as Universal Interface
5. Error RecoveryRestored from backup after mistakeP3 + P6: Verify + Safety
6. Search & DiscoveryDescribed problem, agent chose toolsP1 + P2: Bash + Code
6. Search & DiscoveryCreated persistent index of resultsP5: Persisting State in Files

All seven principles showed up naturally. You didn't study them from a textbook. You experienced them through action. And you saw them reinforce each other — safety enabled experimentation, verification caught errors, persistence made rules reusable.


Your Command Vocabulary

Throughout this chapter, you observed the agent using these commands. You don't need to memorize them, but recognizing them helps you understand what the agent is doing.

Core Commands

CommandPlain EnglishLesson
lsList files in a directory1, 3
findFind files by name or date1, 2, 6
wc -lWord count (count lines)1, 2
du -shDisk usage (human-readable sizes)1
cpCopy files2, 5
mvMove (or rename) files3, 4
rm -rfRemove recursively (dangerous!)5
mkdirMake directory2, 3
mkdir -pMake directory (create parents too)4
catDisplay file contents3
sort -rhSort (reverse, human-readable)1
head -10Show first 10 lines4
diffShow differences between files5
cp -rCopy recursively (entire folders)5
chmodChange file permissions5
grepSearch inside files6
grep -lSearch inside, show matching files6
grep -iSearch case-insensitive6

Connectors

SymbolPlain EnglishExample
| (pipe)"then" — chain commands togetherfind ... | wc -l = "find files, then count them"
xargs"for each" — converts text to argumentsfind ... | xargs grep = "find files, then search inside each"

Flags Worth Knowing

FlagMeaningExample
-lShow as list (ls) or list files only (grep)grep -l "pattern"
-iCase-insensitivefind -iname "*.PDF" matches .pdf too
-rReverse order (or recursive)sort -r
-hHuman-readable sizes (KB, MB, GB)du -h
-pCreate parent directoriesmkdir -p a/b/c

You don't need to memorize syntax. You need to recognize patterns. When you see the agent use these commands, you'll know what it's doing — and you can verify it's doing the right thing.


Reflection Questions

Before moving on, consider these questions:

1. Which workflow will you use most often?

Everyone's answer is different. Some people struggle with cluttered desktops. Others need to batch rename screenshots weekly. Which pattern solves your recurring problem?

2. What would you add to your toolkit?

You might need templates for:

  • Finding duplicate files
  • Archiving old projects
  • Cleaning up specific file types (old logs, cache files)

Think about what's missing for your specific needs.

3. Where did you observe each principle?

Look back at the principles table. Can you point to specific moments when you saw the agent apply that principle? The more concrete your memory, the more the patterns will stick.


From Manual to Automated

Everything you did in this chapter was manual. You opened Claude Code, typed prompts, approved actions. You were the trigger.

When you learn automation, you'll build AI Employees that do this automatically:

This Chapter (Manual)Automated Workflow
You type "survey my folder"Agent watches folder for changes
You decide when to organizeAgent organizes on schedule
You approve each batchAgent follows pre-approved rules
You verify resultsAgent reports results to you

Your rules.md becomes the AI Employee's decision rules. Your verification patterns become its supervision methods. Everything you learned transfers.

Here's a concrete glimpse of what that looks like. Your manual rules.md feeds directly into an automated workflow:

# file_organizer_agent.py — what your manual workflows become

import yaml
from pathlib import Path
from datetime import datetime

# YOUR rules.md becomes the agent's decision logic
rules = yaml.safe_load(open("rules.md"))

# YOUR backup pattern becomes an automatic safety step
def organize_new_files(watch_folder: Path):
new_files = detect_new_files(watch_folder) # Survey (Lesson 1)
create_timestamped_backup(new_files) # Safety (Lesson 2)

for file in new_files:
category = apply_rules(file, rules) # Rules (Lesson 3)
move_with_logging(file, category) # Batch (Lesson 4)

verify_all_files_accounted_for(new_files, rules) # Verify (Lesson 5)
send_summary_report() # Observability (P7)

# YOUR manual prompt → automated trigger
schedule.every(1).hour.do(organize_new_files, Path("~/Downloads"))

Every function in that script maps to a lesson you completed. create_timestamped_backup is Lesson 2. apply_rules is Lesson 3. verify_all_files_accounted_for is Lesson 5. The workflows are identical. Automation just removes you as the trigger.

The gap between "I type a prompt" and "it runs automatically" is smaller than you think. It's not a different skill — it's the same skill with a scheduler attached.


✅ Final Checkpoint: Chapter Deliverables

By completing the checkpoints throughout this chapter, you should now have:

ItemLocationStatus
FILE-INVENTORY.mdIn file-organizer/✅ Lesson 1 checkpoint
backup/With timestamped folder✅ Lesson 2 checkpoint
rules.mdWith edge cases added✅ Lesson 3 checkpoint
ORGANIZER-LOG.mdFull history✅ Lesson 3 checkpoint
organized/Files categorized✅ Lesson 3 checkpoint
Recovery exerciseCompleted✅ Lesson 5 checkpoint
MY-PROMPT-TOOLKIT.mdYour prompt templates✅ This lesson

If you're missing any items, go back to the relevant lesson and complete the checkpoint. The toolkit is the most important deliverable — it's what you'll use long after this chapter is done.


What You've Accomplished

When you started this chapter, you had a messy Downloads folder and no systematic way to handle it.

Now you have:

  • A methodology: Survey, backup, design rules, batch execute, recover, verify
  • Reusable tools: Scripts and templates you can adapt
  • Pattern recognition: You see the Seven Principles when agents work
  • Recovery confidence: You know how to fix mistakes, not just avoid them
  • A permanent toolkit: Prompt templates that work on any folder, any time

This isn't just about files. The patterns you learned apply to any domain where you direct an AI agent. Describe the problem, establish safety, document rules, test small, scale up, recover from errors, verify.


Try With AI: Extended Practice

Prompt 1: Domain Transfer

I've learned file organization workflows in this chapter. Help me apply
the same patterns to a different domain: my email inbox. What would
the equivalent of "survey," "backup," "rules," "batch," and "verify"
look like for email management?

What you're practicing: Abstraction. The workflows aren't about files. They're about systematic problem-solving. You're learning to see the pattern beneath the specific application.

Prompt 2: Toolkit Expansion

My prompt toolkit has the six core workflows. What other file-related
prompts would be useful to add? Think about tasks like finding duplicates,
archiving old projects, cleaning up cache files, or managing downloads
over time.

What you're practicing: Anticipation. Good toolkits grow with your needs. You're learning to think ahead about what patterns you'll need.

Prompt 3: Principle Identification

I'm about to reorganize my Photos folder. Before I start, help me
plan which of the Seven Principles I should apply at each step.
For each principle, tell me specifically what I should do or ask for.

What you're practicing: Explicit principle application. By planning with principles in mind, you internalize them more deeply. Eventually this becomes automatic.


Conclusion

Here's what changed between Lesson 1 and now.

In Lesson 1, you asked the agent to analyze your Downloads folder. You watched it work. You were impressed that it ran six commands in 30 seconds.

Now? You wouldn't just watch. You'd check whether it backed up first. You'd question its categorization rules. You'd ask for a preview before batch operations. You'd verify the results against a known state. You'd ask for a script, not a one-time fix.

That shift — from passive observer to active director — is the real deliverable. Not the organized folder. Not the scripts. Not the toolkit document. The skill of knowing what to demand from an agent before trusting its output.

The agent is ephemeral. Your conversation ends, context resets, the next session starts fresh. But the patterns you've internalized — survey before acting, backup before changing, verify before trusting, script before repeating — those persist in you. They transfer to email management, project organization, data pipelines, and every domain where you direct AI agents.

Your Downloads folder is organized. Your toolkit is built. You're ready for automation.


🔄 Session Management Note

You've completed the entire chapter. Commit everything and start a completely fresh session before moving to the next chapter.

Why this matters: Seven lessons of file processing generated a lot of context — surveys, organization rules, batch scripts, recovery exercises, search patterns, and this capstone. Carrying all of that into the next chapter would be the Kitchen Sink pattern from Chapter 6. Your deliverables (MY-PROMPT-TOOLKIT.md, rules.md, scripts) are all saved in files. The next chapter starts clean.