In Part 1 you saw the difference between asking a chatbot and handing work to an agent. In Part 2 you got opencode installed. This is Part 3: let’s actually do a real piece of work together, the kind you’d recognise from your day-to-day.
No tl;dr here. Just follow along and you’ll have something real done by the end.
The task
Imagine you’ve been handed a messy CSV of sales (the kind that arrives with inconsistent columns, blank rows, mixed date formats, and a stray “NA” or two). You want two things:
- A cleaned version of the file.
- An answer to a question: who are the top 5 customers by region?
Any spreadsheet wonk has done this by hand dozens of times. It’s fiddly. Let’s have opencode do it.
Step 1: Put your file where opencode can see it
Create a folder on your computer for this little project (call it something like sales-task) and drop your CSV inside it. Then:
- Open a terminal in that folder (in Windows Terminal / Git Bash,
cdinto it). - Run
opencodeand press Enter.
When opencode is running from that folder, it can see and edit the files in it. Done. The setup is just that.
Step 2: Hand it the work (the prompt)
Copy this, open opencode, and paste it in:
Here's a messy sales CSV in this folder. Clean it up: fix the date formats,
drop fully-empty rows, and handle the "NA" values. Save the cleaned version
as sales_clean.csv. Then look at the cleaned data and tell me who the top 5
customers are by region.
Notice what you didn’t do:
- You didn’t explain how to clean it (it can read the file and figure it out).
- You didn’t say which tool to use (Python vs formulas, you don’t care).
- You did say what done looks like: a saved
sales_clean.csvplus a top-5-by-region answer.
That’s the agent-style prompt from Part 1, in action.
Step 3: Watch, then check its work
OpenCode will probably ask a clarifying question or two, pick an approach, and get to it. Depending on the file, it may have to stop and check something with you; that’s normal and fine.
When it says it’s done, don’t just say “okay.” Verify:
- Did a file called
sales_clean.csvactually appear? Peek at it. - Does the top-5 answer make sense against the data you know? A wrong top-customer should set off the same alarm bell it would if a colleague told you.
- If anything looks off, tell it: “the dates still look mixed, fix that” or “I expected Acme at the top, why isn’t it here?”
This check-you’ve-always-done-yourself is the part you keep. The agent did the slog; you did the judging.
A common first-time gotcha: if opencode can’t see your CSV, you’re probably running it in the wrong folder. Make sure the terminal that launched opencode is the same folder where the CSV lives.
Step 4: Ask one follow-up
Now lean on it a bit more; this is where the collaboration gets fun. Try:
“Good. Now turn the top-5 result into an Excel formula I can paste into a PivotTable.”
Or:
“Explain in plain terms how you found the top 5, step by step.”
You now have a repeatable pattern: state the goal → let it work → check the result → iterate. That pattern is the whole skill, and it transfers to far bigger tasks than a CSV.
What you just learned
- The agent did hands-on file work, not just talk.
- You directed the outcome and verified it; your judgment mattered.
- You can iterate and refine without starting over.
Where to next? The opencode docs have much more depth. But you’ve already crossed the threshold that matters: you used an AI agent to do actual work, your way.