Claude Code for Non-Developers
Automating Repetitive Tasks

Your First Automation

Turn a one-off Claude Code task into something you can run again — the core pattern behind every automation in this module

From one-off to repeatable

In Module 3, you asked Claude Code to clean a messy CSV, answer questions about the data, and generate a chart. That worked. But what happens next month when you get a new export in the same format?

You could start a fresh conversation and type all the same instructions again. The column mappings, the date format, the cleanup rules, the chart layout. It would work, but you'd be doing the same work twice.

You already know how to get Claude Code to do a task once. This page shows you how to make that task repeatable — so the next time takes seconds instead of minutes.

The core pattern

Every automation in this module follows the same three steps:

1. Do the task once, interactively. Use the conversation skills from Module 2. Describe what you want, review the result, iterate until it's right.

2. Notice that you'll need to do it again. Same format, same cleanup rules, same output. The trigger might be a weekly export, a monthly report, or a recurring request from your team.

3. Ask Claude Code to save it as something reusable. Once you've done the task and it works, tell Claude Code to turn those instructions into something you can run again without re-explaining everything.

That's it. Same workflow you already know, plus one step at the end: "save this so I can do it again."

A concrete example

Say you're an operations manager. Every Monday, you get a CSV export of the previous week's support tickets. The file always has the same columns: ticket_id, customer, date_opened, category, priority, status, resolution_time_hours.

Each week, you need to:

  • Clean up the category column (the support tool exports inconsistent names like "billing", "Billing", "billing issue", "BILLING")
  • Calculate the average resolution time by category
  • Flag any tickets that took longer than 24 hours to resolve
  • Generate a summary with the counts and averages

In Module 3, you'd start Claude Code, describe all of this, review the results, and get your summary. Works fine the first time.

The second Monday, you'd do it again. Same instructions, different file.

By the third Monday, you're thinking: "I've typed these same instructions three times."

That's the moment to automate.

Step 1: Do it once

Start Claude Code in your project folder and work through the task interactively:

I have a file called tickets_week12.csv with support ticket data. Clean up the category column — standardize all variations of billing, technical, account, and general to those four exact values. Then show me:
1. Total tickets by category
2. Average resolution time by category (in hours)
3. Any tickets that took longer than 24 hours to resolve

Save the cleaned data to tickets_week12_clean.csv.

Claude Code reads the file, standardizes the categories, runs the analysis, and shows you the results.

Review the output. Are the category mappings right? Do the numbers look reasonable? Did it flag the right tickets?

If something's off, iterate. "You mapped 'tech support' to 'general' — it should be 'technical'."

Keep going until the output is what you want. This is the same process from Module 2 and 3. Nothing new yet.

Step 2: Recognize the pattern

Here's where the shift happens. You look at what you just did and ask yourself the questions from the previous page:

  • Does this follow a pattern? Yes. Same columns, same cleanup rules, same analysis.
  • Clear inputs and outputs? Yes. Input: a CSV from the support tool. Output: a cleaned file and a summary.
  • Will I do this again? Yes. Every Monday.
  • Does it require judgment? Not much. The category mappings and the 24-hour threshold are the same every time.

This is an automation candidate.

Step 3: Ask Claude Code to save it

Now the new part. In the same conversation — while Claude Code still has context on what you just did — tell it:

That worked well. I get a file like this every Monday with the same columns and format. Create a slash command called /weekly-tickets that does everything we just did: clean the categories, calculate the stats, flag slow tickets, and save the cleaned file. The command should accept a filename as input so I can point it at whatever this week's file is called.

Claude Code creates a small text file in your project's .claude/commands/ folder. That file captures the full workflow: the category mappings, the analysis steps, the 24-hour threshold, the output format. The filename becomes the command name — so a file called weekly-tickets.md becomes the /weekly-tickets command.

You don't need to understand what's in the file or edit it. Claude Code writes it for you.

Plain language: A slash command is a saved set of instructions. Type the command name, and Claude Code follows those instructions — like handing someone a recipe card instead of describing the dish from scratch.

Running it next week

The following Monday, a new export arrives: tickets_week13.csv.

Start Claude Code and type:

/weekly-tickets tickets_week13.csv

The text after the command name (tickets_week13.csv) gets passed in as input, so Claude Code knows which file to work on. Same cleanup, same analysis, same format. No re-explaining.

If the output looks right, you're done in under a minute.

If something is different — say the support tool added a new category you haven't seen before — Claude Code will apply the existing rules as best it can. You can update the command afterward to handle the new case.

The three levels of automation

What you just did sits at the second of three levels. They build on each other:

Level 1: One-off commands. You type instructions in plain language, Claude Code does the task, and the conversation ends. This is what you've been doing since Module 2. No setup, no saving, no reuse. Perfect for tasks you'll only do once.

Level 2: Saved commands (slash commands). You save a set of instructions so you can reuse them by typing a short name. This is what you just learned. The task still runs interactively — you start it, watch it work, and review the result. Perfect for tasks you do weekly or monthly.

Level 3: Hands-off automation. The task runs on its own without you starting it or watching it. A report that generates every Monday morning before you arrive, for example. This involves running Claude Code in the background (without the interactive conversation) on a schedule. We won't go deep on this in the course, but it's worth knowing the option exists.

Most non-developer automation lives at Level 2. Reusable, but still under your control. You run the command, review the output, and decide what to do with it.

When to save vs. when to re-type

Not every task is worth saving as a slash command. Here's a practical test:

Save it if you've done the same task more than twice and the instructions were the same each time. The weekly report, the monthly data cleanup, the regular file-rename job.

Re-type it if the task changes significantly each time. If you're always adjusting the column mappings, changing the analysis questions, or working with different file formats, a saved command won't help much — you'd be overriding most of it anyway.

Also re-type it if the task is faster to describe than to look up. "Rename this file to quarterly-report-q1.pdf" doesn't need a slash command.

A rough threshold: if your instructions take more than two or three sentences, and you've typed them more than twice, save them.

The skill you already have

Look back at what you just did. You described a task in plain language, reviewed the result, and then asked Claude Code to remember it for next time. No code. No programming language. No configuration files to edit.

The skill behind all of this is the same one you built in Module 2: describing what you want clearly enough that Claude Code can do it. The only new piece is asking Claude Code to save those instructions when you know you'll need them again.

What's next

So far you've automated a single-file workflow. Next, you'll scale up to bulk operations — renaming, converting, and organizing hundreds of files at once. The same pattern applies, but the stakes go up when you're touching hundreds of files instead of one.

On this page