Short answer
Learning to code with AI means using an assistant such as Claude Code, Cursor, OpenAI’s Codex or GitHub Copilot to write software while you learn to specify, read, test and secure what it produces. Learn Python basics, git and tests first, build one small internal tool on fake data, review every change, and bring in an engineer before it touches personal information or live systems.
- Learn to read code, use git and run tests before asking AI to write much.
- Write a short spec and make the assistant plan before it writes code.
- A coding agent can read everything in its working folder, so practise on fake data.
- Keep API keys out of prompts and code, and rotate any key that leaks.
- Bring in an engineer before a tool writes to live systems or handles personal information.
Goal: Build a tiny internal tool with an AI coding assistant, review it properly, and know where your skills end. Who it is for: Business people who want to build small tools for their own team, and junior developers new to coding agents. Time: 30 minutes, plus about an hour if you complete the build.
An AI coding assistant can turn a paragraph of plain English into a working script. That moves the hard part rather than removing it: deciding exactly what to build, checking what was built, and keeping it safe.
What to learn before you let AI write code
Learn to read code, undo changes, run tests and write a spec, because you will approve every change the assistant makes.
| Skill | Why it matters with AI | Where to learn it |
|---|---|---|
| Reading Python | You approve each change, so you must be able to follow it | CS50’s Introduction to Programming with Python, free through OpenCourseWare |
| Git basics | One command reverses a bad AI change | GitHub Skills’ Introduction to Git |
| Running tests | Tests show the code does what your spec says | CS50 Python’s unit tests week |
| Reading errors | Pasting an error back works better when you understand it | The Python Tutorial |
| Writing a spec | Assistants build what you describe, gaps included | Claude Code 101’s explore, plan, code, commit workflow |
Which assistant to learn with
The habits transfer between tools, so pick one and stay with it. Prices are as listed on the dates shown.
| Assistant | Cheapest way in | Beginner note |
|---|---|---|
| Claude Code | A paid Claude plan; Pro shows $33 a month billed annually or $40 monthly from NZ, GST included (19 October 2026) | Not on the Free plan |
| Cursor | Free plan; Plus US$8 a month excluding tax (19 October 2026) | OpenAI and Anthropic models cost extra; turn on Privacy Mode |
| ChatGPT with Codex | Free plan includes limited Codex; Plus NZ$40 a month (19 October 2026) | OpenAI Academy runs a free Get Started with Codex path |
| GitHub Copilot | Free plan with 2,000 completions a month; Pro US$10 (20 October 2026) | Microsoft Learn’s Copilot fundamentals path is free |
Our guides to Claude Code and Cursor cover plans and how each handles your code.
Exercise: build an overdue invoice report
Illustrative scenario: a small business wants a Monday list of overdue invoices from its accounting software’s CSV export. Use made-up data only.
- Set up a safe folder. Create an empty project folder, install Python, and run
git initso every change can be undone. - Make fake data with traps. Create
invoices.csvwith 12 made-up rows: day-first dates such as 03/04/2026, amounts written as “$1,250.00”, one credit note with a negative amount, one paid invoice, one blank due date and one impossible date (31/09/2026). - Write the spec. Adapt the one below. It states the input, output, rules and what to do when unsure.
- Ask for a plan first. Use Plan Mode in Claude Code; in other tools, tell the assistant to restate the task, list assumptions and wait. Fix misunderstandings before any code exists.
- Let it build, with tests. Approve file edits one at a time. Ask for a test for every rule in the spec, then run the tests yourself.
- Check three rows by hand. Count days overdue on a calendar and compare. Look hardest at 03/04/2026: if the report treats it as 4 March, the date handling is wrong.
- Review and commit. Read the full diff, run the review below, and commit with a message saying what the tool does and who checked it.
Build a small command-line tool in Python, standard library only.
Purpose: list overdue invoices from a CSV export so I can chase them.
Input: invoices.csv with columns Invoice, Customer, Due date, Amount, Status.
Dates are New Zealand format, day first: 03/04/2026 is 3 April 2026.
Amounts may include "$" and commas. Credit notes have negative amounts.
Output: a new file overdue.csv with Invoice, Customer, Due date, Amount
and Days overdue, most overdue first. Print the total amount overdue.
Rules:
- Never change invoices.csv.
- Skip rows where Status is Paid or Voided, and skip credit notes.
- If a date or amount cannot be read, do not guess. Write the row to
problems.csv with the reason.
- Let me set "today" for testing, so results do not change daily.
Before writing code, restate the task, list your assumptions and
questions, and name the files you will create. Wait for my OK.
Then write the code and a test for every rule above.
In the code, look for an explicit date format like this rather than a library that guesses:
from datetime import datetime
def parse_nz_date(raw):
"""Parse a day-first NZ date such as 03/04/2026 (3 April 2026)."""
return datetime.strptime(raw.strip(), "%d/%m/%Y").date()
assert parse_nz_date("03/04/2026").month == 4
The impossible 31/09/2026 raises an error here, which your spec turns into a row in problems.csv instead of a guess.
How to review what the assistant wrote
Run the seven-check routine in evaluating AI generated code, then add three checks specific to coding agents:
- Read the diff, not the summary.
git diffshows every change; an agent’s summary of its own work can leave edits out. - Run the tests yourself. Confirm they check results rather than just print them.
- Ask what is missing. “Which rules in my spec have no test?” regularly finds gaps.
Security basics: secrets, permissions and data
- Secrets. OWASP’s secrets management guidance notes that many organisations have keys and passwords “hardcoded within the source code in plaintext”. Keep keys in an environment file listed in
.gitignore, never paste them into a prompt, and rotate any key that has been committed or shared. - Permissions. Claude Code’s security documentation, read on 20 October 2026, says interactive sessions start in auto mode, where a separate classifier model reviews actions instead of you. While learning, switch to manual mode: it starts read-only and asks before editing files, running tests or executing commands. Use the equivalent setting in other tools, and read every command before approving it; see understanding AI tool permissions.
- Data. In manual mode Claude Code asks before reading outside the folder it started in, so anything inside that folder is open to it. Keep real customer files out; the Privacy Act 2020 applies to personal information sent to an AI provider.
- Untrusted content. Files, web pages and issue text can carry instructions aimed at the agent. See recognising prompt injection.
When to stop and bring in an engineer
Stop when a mistake would reach a customer, a ledger or someone’s personal information before a person could catch it.
| Signal | Why it needs an engineer |
|---|---|
| Real personal information | Privacy Act duties, access control and breach handling |
| Writes to Xero, a CRM or email | Xero says its remote MCP V1 tools do not ask for confirmation before writing data |
| Several users or logins | Needs authentication, permissions and audit logs |
| Runs unattended or on a server | Needs monitoring, error alerts and an owner for fixes |
| You cannot explain part of it | Nobody can maintain code nobody understands |
Hand over your spec, fake data, tests and git history. Our custom AI development team takes prototypes like this to production.
What World of ClaudeCraft shows about building at scale
World of ClaudeCraft is Levy Street’s free, open-source (MIT) browser MMO. Its first playable version was built in about 48 hours in June 2026 with the Claude Fable 5 coding model. Since then roughly 60 contributors have pushed about 19,900 commits, and it had 2,300+ GitHub stars and 730+ forks in October 2026. The first version was the fast part; what followed was thousands of changes that had to be understood and maintained, the same shape as your invoice tool at far larger scale. Our write-up on what building games with AI taught us covers the engineering.
Free resources worth your time
- Claude Code 101: free, 12 lessons, about 1.5 hours.
- OpenAI Academy: free paths including Get Started with Codex.
- GitHub Copilot Fundamentals: a Microsoft Learn path of about 5 hours; Microsoft says Learn training is free.
- GitHub Skills: interactive courses including Introduction to Git and Getting Started with GitHub Copilot.
- CS50 Python: ten weeks of material, free through OpenCourseWare, including unit tests and file handling.
To compare paid, university and micro-credential options, see AI courses in New Zealand.
Check your work
- I can explain what each function in my tool does.
- My project is in git, and I know how to undo the last change.
- I wrote a spec, and the assistant planned before it coded.
- There is a test for every rule in my spec, and I ran them myself.
- I checked three results by hand, including a day-first date.
- No keys or passwords appear in my code, prompts or git history.
- The project folder holds only fake data.
- I know which signal would make me hand this tool to an engineer.
Next lesson: Understanding AI tool permissions.
Sources
- CS50’s Introduction to Programming with Python, Harvard University, accessed 20 October 2026
- The Python Tutorial, Python Software Foundation, accessed 20 October 2026
- Claude Code 101, Anthropic (Claude Academy), accessed 20 October 2026
- OpenAI Academy courses, OpenAI, accessed 20 October 2026
- GitHub Copilot Fundamentals Part 1 of 2, Microsoft Learn, accessed 20 October 2026
- Microsoft Learn frequently asked questions, Microsoft, updated 29 July 2026
- GitHub Skills, GitHub, accessed 20 October 2026
- GitHub Copilot plans and pricing, GitHub, accessed 20 October 2026
- Claude plans and pricing, Anthropic, accessed 19 October 2026
- Cursor pricing, Cursor, accessed 19 October 2026
- ChatGPT plans and pricing, OpenAI, accessed 19 October 2026
- Claude Code security, Anthropic, accessed 20 October 2026
- Secrets Management Cheat Sheet, OWASP Cheat Sheet Series, accessed 20 October 2026
- Xero remote MCP server FAQ, Xero, accessed 19 October 2026
- Privacy Act 2020, New Zealand Legislation, 2020
Written by the Levy Street team in Wellington. Last updated 19 October 2026.