The Setup That Makes Claude Code Actually Work for Workflows
Accelerate your business processes with the help of Claude Code and the WAT framework
Most people use Claude the same way every day. They open a new session. They explain what they need. Claude helps. The session ends.
Tomorrow, they do it all over again.
Claude doesn’t remember the last conversation. It doesn’t know your preferences. It doesn’t know what you worked on yesterday. Every session starts from zero. So every session requires you to re-explain, re-prompt, and re-babysit.
That’s not automation. That’s a smarter version of doing it yourself.
There’s a setup that changes this. It takes about an hour to build and pays off every day after that. By the end of this guide, you’ll have a system where Claude remembers your context, handles recurring tasks on its own, and gets smarter every time something goes wrong.
Two Types of AI Automation
Before getting into the setup, it helps to understand what makes Claude different from the automation tools most businesses already use.
Static Automations
Tools like Zapier, Make, and n8n are what’s called “static automation.” You build a flowchart: if this happens, do that. It works great until something unexpected comes up. A field is missing. An API returns a different format. A step fails. The whole workflow stops. You get an error notification. You go fix it manually.
Static automation is reliable inside the box you built. Outside that box, it breaks.
Agentic Automations
Claude Code is “agentic automation.” It doesn’t follow a fixed flowchart. It reads the situation, decides what to do next, and adapts when something doesn’t go as planned. You describe what you want in plain English. Claude figures out the path.
The tradeoff is that Claude is probabilistic -- meaning it uses judgment, not rules. That introduces some variability. The WAT framework below is specifically designed to handle this: keep Claude in the reasoning layer, and use reliable scripts for the parts that need to be exact every time.
The WAT Framework
WAT stands for Workflows, Agents, Tools. It’s a three-layer architecture that separates what Claude is good at (reasoning) from what code is good at (executing consistently).
Layer 1: Workflows (The Instructions)
A workflow is a markdown file -- basically a text document -- that tells Claude exactly how to handle a specific task. It lives in a workflows/ folder in your project. It explains the goal, the steps, which tools to use at each step, the expected output, and what to do if something breaks.
You write it once in plain English. Claude reads it every time it runs that task.
The key difference from a prompt: the workflow doesn’t disappear when the session ends. It lives in your file system. It’s permanent. And every time you run into a problem, you update the file so it doesn’t happen again.
Layer 2: Agents (The Decision-Maker)
This is Claude. Its job is to read the workflow, run the tools in the right order, handle anything unexpected, and ask you questions when something is missing. It connects your instructions to the actual execution.
Layer 3: Tools (The Execution)
These are Python or Bash scripts in a tools/ folder. They do the deterministic work -- API calls, data transformations, file operations. They don’t make decisions. They just run reliably and return a result.
Why this separation matters: If something goes wrong, you know exactly where to look. Bad output from an API call? Tools problem. Claude running steps in the wrong order? Workflow problem. Claude missing context to make the right call? Agent problem. Three layers, three distinct debugging surfaces.
Setting it up starts with one file. The CLAUDE.md file sits at the root of your project and tells Claude how the whole system works. Claude reads it at the start of every session. Here’s a starter version you can copy directly:
# Agent Instructions
You're working inside the WAT framework (Workflows, Agents, Tools).
This architecture separates concerns so that probabilistic AI handles
reasoning while deterministic code handles execution.
## The WAT Architecture
Layer 1: Workflows -- Markdown SOPs in workflows/
Each workflow defines the objective, required inputs, which tools to use,
expected outputs, and how to handle edge cases.
Layer 2: Agents -- This is your role.
Read the relevant workflow, run tools in the correct sequence, handle
failures gracefully, and ask clarifying questions when needed.
Layer 3: Tools -- Python scripts in tools/
API calls, data transformations, file operations. Deterministic.
Credentials and API keys are stored in .env.
## Operating Principles
1. Look for existing tools before building new ones
2. When something fails: fix the script, retest, update the workflow
3. Keep workflows current as you learn better methods
Prompt Credit: Nate Herk
Copy this or you can always have Claude Code create this file for you. Open Claude, describe how you work and what you want to automate, and ask it to write the CLAUDE.md file for you. It will generate a version customized to your setup.
How Workflows Get Better Over Time
This is the part most people miss, but its the most powerful.
Every time something breaks -- Claude misses a step, a tool returns an error, the output isn’t quite right -- that’s information. You diagnose what went wrong, fix it, and update the workflow file so it doesn’t happen again.
The loop looks like this:
Something breaks
Identify which layer failed
Fix the tool or update the workflow instructions
Verify the fix works
Move on with a more reliable system
After a few weeks of this, your workflows become very good. The problems stop repeating. Claude handles edge cases it used to fail on. The system compounds.
The other habit that accelerates this: a decision log. Any time Claude makes a non-obvious choice, add a line to a decisions/log.md file explaining why. When a new session starts from scratch, that log gives Claude the context it needs to make the same good calls again.
Running Automatically: Loops and Scheduling
Until recently, workflows required you to manually trigger them. You had to open Claude, run the command, wait for it to finish.
That’s changed with two new features.
/loop runs any task on a repeating interval inside a session. Tell Claude to check something every 10 minutes, run a report every hour, or process a queue continuously. It runs until you stop it.
/schedule is bigger. It creates a cron job -- a scheduled task -- that runs a Claude agent automatically, even when you’re not at your computer. You define the task and the schedule (every morning at 8am, every Monday, the first of the month), and Claude runs it, executes the workflow, and saves the results wherever you’ve set it up to save them.
What this unlocks in practice:
A daily inbox processor that organizes your notes every morning before you start work
A weekly research briefing that pulls the latest news in your niche every Monday
Automated content pipeline steps that run on a schedule instead of waiting for you to trigger them
The combination of a well-built workflow and a schedule means some of your recurring work just... happens. You stop triggering it. It runs.
Multiagent: When One Claude Isn’t Enough
For more complex workflows, Claude Code now supports subagents -- separate Claude instances that run in parallel, each with their own isolated context window.
The parent agent coordinates the work. It spawns subagents to handle specific pieces, each with their own instructions and tool access. The subagents work simultaneously and report back only their final output. All the intermediate noise (file reads, searches, errors) stays contained in each subagent’s context and never clutters the main conversation.
A 200,000-token context window sounds large. For a workflow that reads a lot of files, searches the web, and writes a long output, it fills up fast. Subagents solve this by offloading the heavy work to separate windows.
In practice: instead of one Claude reading every file in a codebase, reviewing code, checking security vulnerabilities, and summarizing everything in a single session -- you spawn three subagents to do those jobs simultaneously. The main agent gets three clean summaries back and compiles the final report.
The Mistakes That Slow Everyone Down
Not using Plan Mode. Claude Code has a mode most people never touch. Plan Mode (Shift+Tab twice) makes Claude lay out the full approach before doing anything. It writes a plan, you review it, then it executes. For any workflow with real consequences -- sending emails, modifying data, publishing content -- this is worth using every time. Without it, Claude jumps straight to execution and you don’t get a chance to course-correct.
Doing small edits manually. The biggest waste in Claude Code is using it for big tasks but grabbing the keyboard for small ones. “It’s faster” is usually not true once you account for the time to switch contexts, make the edit, and switch back. The right habit is to prompt everything. Let Claude make the change, review it, move on. The overhead of a short prompt is almost always lower than you think.
Stuffing too much into CLAUDE.md. Claude can follow around 150-200 instructions at once, but the system already uses about 50 of those slots before you add anything. A bloated CLAUDE.md causes Claude to miss rules buried in the noise. Keep the root file focused on things that apply to every single task. Move everything else into skills or workflow files that Claude reads only when relevant.
Start Today
The fastest path to getting value from this system is simple: pick one task you’ve prompted manually three or more times in the last month. Create a folder with the Claude.MD file from above. Ask Claude to run it and then describe the workflow from start the finish and have Claude build the rest.
You don’t need the full automation built out on day one. The more you use it the better it will work. That workflow will break in some small way. You’ll fix it. It’ll be better. You’ll build the next one.
If this was helpful please like and comment and feel free to send me a message if you’d like to discuss more.

