Nate Herk | AI Automation
37 min video
3 min read
Claude Code Automation in 37 Minutes
You just saved 34 min.
The big takeaway
Learn to build production-ready AI automations with Claude Code using the WAT framework (Workflows, Agents, Tools). This guide covers the interface, planning with clear communication, leveraging MCP servers and skills, testing workflows, and deploying to Modal with scheduled triggers or webhooks.
Getting Started: Interface and Setup
Claude Code requires VS Code and a paid Claude plan
Install VS Code for free, then add the Claude Code extension. You need a paid Claude subscription (Pro at $17/month minimum, though Max is recommended for heavy usage) to access Claude Code. The extension integrates a chat-like interface directly into VS Code.
Project structure: files on left, agent on right
VS Code's left panel shows your project files and folders (workflows, tools, system prompts). The right panel is where you chat with Claude Code, ask it questions, and let it execute actions. You must open a folder to start working.
Enable bypass permissions mode for hands-off automation
Go to Settings > Cloud Code and toggle 'allow bypass permissions mode' on. This lets Claude Code make edits without asking for approval on every step, speeding up development significantly.
The WAT Framework: How Automations Work
WAT separates reasoning from execution for reliability
Workflows (layer 1) are plain-language markdown SOPs stored in a workflows folder. Agents (layer 2) are Claude Code itself, coordinating between workflows and tools. Tools (layer 3) are Python scripts that execute actual actions like API calls or file operations. This three-layer separation makes systems reliable because AI handles reasoning while deterministic code handles execution.
1
Layer 1: Workflows (markdown SOPs with objectives, inputs, tools, outputs, edge cases)
2
Layer 2: Agent (Claude Code coordinates, reads workflows, runs tools in sequence, handles failures)
3
Layer 3: Tools (Python scripts executing actions: API calls, data transforms, file operations)
WAT Framework: Three-layer separation of concerns
System prompt (claude.md) defines the entire project
Create a claude.md file as your project's system prompt. It instructs Claude Code on the WAT framework, file structure, how to operate, and what to do when things fail. Without it, the agent is generic and doesn't understand your tools or workflows.
Self-healing workflows improve through iteration
When a tool fails, Claude Code investigates the error, fixes the script, retests, and updates the workflow to prevent the same error again. Example: if rate-limited on an API, it discovers a batch endpoint, refactors the tool, verifies it works, and documents the fix.
Planning and Communication
Use plan mode for clear, detailed requirements
Before building, switch to plan mode and describe your goal, features, and constraints in natural language. Claude Code will research options, ask clarifying questions, brainstorm alternatives, and only proceed once confident. This prevents misaligned outputs and saves iteration cycles.
Claude Code asks questions to fill knowledge gaps
In plan mode, Claude Code searches the web and asks you specifics like 'What channels should we track?', 'How often should reports run?', 'Where should data be stored?'. Answering these questions upfront ensures the final automation matches your exact needs.
Example: YouTube analytics workflow planning
User requested scraping YouTube data for AI niche trends, generating a professional slide deck with charts, and emailing reports. Claude Code asked about channel discovery (auto-discover top channels), frequency (weekly), storage (Google Sheets), and delivery (Gmail). This single planning conversation produced a complete 7-tool workflow.
1
User describes goal: scrape YouTube AI data, analyze trends, generate slide deck, email report
2
Claude Code asks: channels to track, frequency, storage method, email address
3
User answers: auto-discover, weekly, Google Sheets, Gmail
4
Claude Code creates: 7 Python tools + 1 markdown workflow + deployment plan
Planning conversation produces complete automation
Superpowers: MCP Servers and Skills
MCP servers act like an app store for integrations
MCP (Model Context Protocol) servers let Claude Code connect to services like Gmail, Calendar, or YouTube with a single connection instead of managing multiple different API endpoints. Think of it as a universal micro-USB port: connect once, and the agent figures out which endpoints and parameters to use.
Skills are custom instructions that improve consistency
Skills are reusable knowledge documents (markdown or code) that Claude Code loads dynamically when relevant. Instead of reading them every time in the system prompt, Claude Code checks available skills, loads only the relevant ones, and applies them. This improves consistency, speed, and saves tokens.
Difference between skills, projects, and MCP
Projects contain static documents and background info specific to one workflow. Skills are installed globally and persist across projects. MCP servers connect to external services for data and actions. Use skills for repeated instructions, MCP for integrations, and projects for project-specific context.
1
Skills
Custom instructions, reusable, global scope, knowledge-based
2
Projects
Static docs, project-specific, local scope, background info
3
MCP Servers
External integrations, data/actions, persistent connections
Skills vs. Projects vs. MCP Servers
Canvas design skill creates branded, professional PDFs
The canvas design skill is a custom prompt that improves Claude Code's ability to create visually appealing PDFs. By installing it and referencing it in your workflow, Claude Code generates PDFs with better layouts, branding, and aesthetics without manual design work.
Testing and Optimization
Test workflows before deployment to catch issues
Run the full workflow in Claude Code to verify all tools execute in order, data flows correctly, and outputs match expectations. Claude Code will surface errors, fix them, and re-test automatically. This iterative testing phase is critical because deployed workflows don't self-heal in production.
PDF generation example: iterate on output quality
Initial PDF output was only 2 pages (title and thank you). User reported the issue. Claude Code investigated, fixed the tool and workflow, and regenerated a 9-page professional PDF with charts, logos, and recommendations. This shows the importance of testing and feedback loops.
Deployed workflows don't self-improve; update locally and redeploy
Once a workflow is deployed to Modal, it runs on schedule or webhook but doesn't self-heal. To improve it, edit the workflow and tools in Claude Code, test locally, then push the updated version back to Modal. The agent stays local; only the workflow and tools go to production.
Deployment to Modal
Modal hosts automations and charges only on execution
Modal is cloud infrastructure for AI workflows. Create a free account (get $5 credit), add a card for $30 more (lasts a long time). Modal only charges when your workflow actually runs, not by the minute or day. This makes it cost-effective for scheduled or triggered automations.
Deployment process: security review, then push to Modal
Before deploying, ask Claude Code to run a security review: check for exposed API keys, vulnerabilities, and webhook protections. Once approved, Claude Code packages the workflow and tools, creates Modal secrets for sensitive data, and deploys the app with a scheduled trigger (cron) or webhook endpoint.
Schedule triggers run workflows on a cron schedule
Set a workflow to run at specific times, e.g., every Monday at 6 a.m. Chicago time. Modal shows deployment history, logs, and next scheduled run. You can manually trigger a run to test before the schedule kicks in.
Webhook triggers run workflows on external events
Deploy a workflow with a webhook endpoint. External systems (Zapier, forms, webhooks) POST data to that endpoint, triggering the workflow immediately. Example: a lead form submission triggers research and sends an email notification in seconds.
YouTube API quota example: plan for limits in production
During testing, the YouTube API hit its daily 10,000-unit quota because of repeated test runs. In production (weekly runs), this won't happen. Claude Code suggested alternatives and longer-term fixes. This shows the importance of understanding API limits before deploying.
10,000 units/day
YouTube API daily quota
Testing exceeded quota; production weekly schedule will not
Real-World Example: YouTube Analytics Automation
Full workflow: scrape, analyze, generate, email, store
The YouTube analytics workflow (1) discovers 30 top AI channels, (2) fetches 187 videos, (3) analyzes trends and performance, (4) generates 6 charts, (5) builds a 9-slide branded PDF, (6) exports data to Google Sheets, (7) emails the report. All from a single natural-language request in plan mode.
1
Discover top 30 AI channels
2
Fetch 187 videos from those channels
3
Analyze trends, engagement, posting patterns
4
Generate 6 charts (views, engagement, topics, etc.)
5
Create 9-slide branded PDF with logo and recommendations
6
Export channel stats and video data to Google Sheets
7
Email PDF report to user
YouTube Analytics Workflow Steps
Output includes professional PDF, Google Sheet, and email
The workflow generated a branded PDF with median views, top videos, top channels, engagement analytics, trending topics, posting patterns, and recommendations. It also created a Google Sheet with three tabs: channel stats (30 channels with subscribers and views), top videos (with engagement rates), and weekly summary (tracking metrics over time).
1
PDF Report
9 slides with charts, logo, recommendations
2
Google Sheet
3 tabs: channel stats, top videos, weekly summary
3
Email
Automated delivery to Gmail with PDF attachment
YouTube Analytics Workflow Outputs
Deployment: scheduled to run every Monday at 6 a.m.
The workflow was deployed to Modal and scheduled as a cron job to run every Monday at 6 a.m. Chicago time. Modal shows deployment history, logs, and next scheduled run. A manual test run was triggered to validate the setup before the schedule began.
Key Takeaways and Best Practices
Start with a clear system prompt (claude.md)
The first step in any Claude Code project is creating a claude.md file that explains the WAT framework, your file structure, and how the agent should operate. This single document sets the tone for the entire project and prevents generic, unfocused outputs.
Plan thoroughly before building to reduce iteration
Use plan mode to describe your goal, features, and constraints. Claude Code will ask clarifying questions and brainstorm options. Spending 5-10 minutes on planning upfront prevents building the wrong thing and saves hours of rework.
Test locally, deploy to Modal, update by re-deploying
Develop and test workflows in Claude Code locally. Once confident, deploy to Modal with a schedule or webhook trigger. To improve a deployed workflow, edit it locally, test, and push the updated version back to Modal. The agent stays local; only workflows and tools go to production.
Leverage skills and MCP servers to extend capabilities
Don't reinvent the wheel. Search for existing skills (custom instructions) and MCP servers (integrations) that solve common problems. Install them globally so they persist across projects. This multiplies what Claude Code can do without writing extra code.
Security review before production deployment
Always ask Claude Code to review the code for exposed API keys, vulnerabilities, and webhook protections before deploying. Store secrets in Modal's secret manager, not in code. This prevents accidental exposure if code is shared or committed.
Learn by doing: follow along and experiment
Reading about Claude Code is different from using it. The best way to understand how it thinks and works is to open VS Code, follow the tutorial, and build something yourself. You'll see patterns emerge and start to understand the mental model.
Worth quoting
"Cloud Code has been allowing me to build things that used to take me hours in just minutes."
— Nate Herk, at [0:00]
"My job is to make confusing things as simple as possible."
— Nate Herk, at [0:31]
"These agentic workflows are basically self-healing. When things fail, they figure out what happened and fix it."
— Nate Herk, at [8:11]
Try this
Download and install VS Code from google.com, then install the Claude Code extension
Create a paid Claude account (Pro at $17/month or Max for heavy usage)
Enable bypass permissions mode in Claude Code settings to allow hands-off automation
Create a new folder for your first project and initialize it with a claude.md system prompt
Use plan mode to describe your automation goal in natural language and let Claude Code ask clarifying questions
Test your workflow locally in Claude Code before deploying to production
Create a Modal account (free with $5 credit, $30 more with card) to host your deployed workflows
Run a security review in Claude Code before deploying to check for exposed API keys and vulnerabilities
Deploy your workflow to Modal with either a scheduled cron trigger or webhook endpoint
Monitor Modal logs and deployment history to validate that your workflow runs correctly
Save useful workflows and tools as skills or in your claude.md for reuse across projects
Search the Claude Code templates website for existing skills and MCP servers to extend capabilities
Made with Glimpse by Wozart
glimpse.wozart.com/v/a3epzghh
Share this infographic
Read this infographic as text

Claude Code Automation in 37 Minutes

Summary of the video “Master 95% of Claude Code in 36 Mins (as a beginner) by Nate Herk | AI Automation.

Learn to build production-ready AI automations with Claude Code using the WAT framework (Workflows, Agents, Tools). This guide covers the interface, planning with clear communication, leveraging MCP servers and skills, testing workflows, and deploying to Modal with scheduled triggers or webhooks.

Getting Started: Interface and Setup

Claude Code requires VS Code and a paid Claude plan

Install VS Code for free, then add the Claude Code extension. You need a paid Claude subscription (Pro at $17/month minimum, though Max is recommended for heavy usage) to access Claude Code. The extension integrates a chat-like interface directly into VS Code.

Project structure: files on left, agent on right

VS Code's left panel shows your project files and folders (workflows, tools, system prompts). The right panel is where you chat with Claude Code, ask it questions, and let it execute actions. You must open a folder to start working.

Enable bypass permissions mode for hands-off automation

Go to Settings > Cloud Code and toggle 'allow bypass permissions mode' on. This lets Claude Code make edits without asking for approval on every step, speeding up development significantly.

The WAT Framework: How Automations Work

WAT separates reasoning from execution for reliability

Workflows (layer 1) are plain-language markdown SOPs stored in a workflows folder. Agents (layer 2) are Claude Code itself, coordinating between workflows and tools. Tools (layer 3) are Python scripts that execute actual actions like API calls or file operations. This three-layer separation makes systems reliable because AI handles reasoning while deterministic code handles execution.

System prompt (claude.md) defines the entire project

Create a claude.md file as your project's system prompt. It instructs Claude Code on the WAT framework, file structure, how to operate, and what to do when things fail. Without it, the agent is generic and doesn't understand your tools or workflows.

Self-healing workflows improve through iteration

When a tool fails, Claude Code investigates the error, fixes the script, retests, and updates the workflow to prevent the same error again. Example: if rate-limited on an API, it discovers a batch endpoint, refactors the tool, verifies it works, and documents the fix.

Planning and Communication

Use plan mode for clear, detailed requirements

Before building, switch to plan mode and describe your goal, features, and constraints in natural language. Claude Code will research options, ask clarifying questions, brainstorm alternatives, and only proceed once confident. This prevents misaligned outputs and saves iteration cycles.

Claude Code asks questions to fill knowledge gaps

In plan mode, Claude Code searches the web and asks you specifics like 'What channels should we track?', 'How often should reports run?', 'Where should data be stored?'. Answering these questions upfront ensures the final automation matches your exact needs.

Example: YouTube analytics workflow planning

User requested scraping YouTube data for AI niche trends, generating a professional slide deck with charts, and emailing reports. Claude Code asked about channel discovery (auto-discover top channels), frequency (weekly), storage (Google Sheets), and delivery (Gmail). This single planning conversation produced a complete 7-tool workflow.

Superpowers: MCP Servers and Skills

MCP servers act like an app store for integrations

MCP (Model Context Protocol) servers let Claude Code connect to services like Gmail, Calendar, or YouTube with a single connection instead of managing multiple different API endpoints. Think of it as a universal micro-USB port: connect once, and the agent figures out which endpoints and parameters to use.

Skills are custom instructions that improve consistency

Skills are reusable knowledge documents (markdown or code) that Claude Code loads dynamically when relevant. Instead of reading them every time in the system prompt, Claude Code checks available skills, loads only the relevant ones, and applies them. This improves consistency, speed, and saves tokens.

Difference between skills, projects, and MCP

Projects contain static documents and background info specific to one workflow. Skills are installed globally and persist across projects. MCP servers connect to external services for data and actions. Use skills for repeated instructions, MCP for integrations, and projects for project-specific context.

Canvas design skill creates branded, professional PDFs

The canvas design skill is a custom prompt that improves Claude Code's ability to create visually appealing PDFs. By installing it and referencing it in your workflow, Claude Code generates PDFs with better layouts, branding, and aesthetics without manual design work.

Testing and Optimization

Test workflows before deployment to catch issues

Run the full workflow in Claude Code to verify all tools execute in order, data flows correctly, and outputs match expectations. Claude Code will surface errors, fix them, and re-test automatically. This iterative testing phase is critical because deployed workflows don't self-heal in production.

PDF generation example: iterate on output quality

Initial PDF output was only 2 pages (title and thank you). User reported the issue. Claude Code investigated, fixed the tool and workflow, and regenerated a 9-page professional PDF with charts, logos, and recommendations. This shows the importance of testing and feedback loops.

Deployed workflows don't self-improve; update locally and redeploy

Once a workflow is deployed to Modal, it runs on schedule or webhook but doesn't self-heal. To improve it, edit the workflow and tools in Claude Code, test locally, then push the updated version back to Modal. The agent stays local; only the workflow and tools go to production.

Deployment to Modal

Modal hosts automations and charges only on execution

Modal is cloud infrastructure for AI workflows. Create a free account (get $5 credit), add a card for $30 more (lasts a long time). Modal only charges when your workflow actually runs, not by the minute or day. This makes it cost-effective for scheduled or triggered automations.

Deployment process: security review, then push to Modal

Before deploying, ask Claude Code to run a security review: check for exposed API keys, vulnerabilities, and webhook protections. Once approved, Claude Code packages the workflow and tools, creates Modal secrets for sensitive data, and deploys the app with a scheduled trigger (cron) or webhook endpoint.

Schedule triggers run workflows on a cron schedule

Set a workflow to run at specific times, e.g., every Monday at 6 a.m. Chicago time. Modal shows deployment history, logs, and next scheduled run. You can manually trigger a run to test before the schedule kicks in.

Webhook triggers run workflows on external events

Deploy a workflow with a webhook endpoint. External systems (Zapier, forms, webhooks) POST data to that endpoint, triggering the workflow immediately. Example: a lead form submission triggers research and sends an email notification in seconds.

YouTube API quota example: plan for limits in production

During testing, the YouTube API hit its daily 10,000-unit quota because of repeated test runs. In production (weekly runs), this won't happen. Claude Code suggested alternatives and longer-term fixes. This shows the importance of understanding API limits before deploying.

Real-World Example: YouTube Analytics Automation

Full workflow: scrape, analyze, generate, email, store

The YouTube analytics workflow (1) discovers 30 top AI channels, (2) fetches 187 videos, (3) analyzes trends and performance, (4) generates 6 charts, (5) builds a 9-slide branded PDF, (6) exports data to Google Sheets, (7) emails the report. All from a single natural-language request in plan mode.

Output includes professional PDF, Google Sheet, and email

The workflow generated a branded PDF with median views, top videos, top channels, engagement analytics, trending topics, posting patterns, and recommendations. It also created a Google Sheet with three tabs: channel stats (30 channels with subscribers and views), top videos (with engagement rates), and weekly summary (tracking metrics over time).

Deployment: scheduled to run every Monday at 6 a.m.

The workflow was deployed to Modal and scheduled as a cron job to run every Monday at 6 a.m. Chicago time. Modal shows deployment history, logs, and next scheduled run. A manual test run was triggered to validate the setup before the schedule began.

Key Takeaways and Best Practices

Start with a clear system prompt (claude.md)

The first step in any Claude Code project is creating a claude.md file that explains the WAT framework, your file structure, and how the agent should operate. This single document sets the tone for the entire project and prevents generic, unfocused outputs.

Plan thoroughly before building to reduce iteration

Use plan mode to describe your goal, features, and constraints. Claude Code will ask clarifying questions and brainstorm options. Spending 5-10 minutes on planning upfront prevents building the wrong thing and saves hours of rework.

Test locally, deploy to Modal, update by re-deploying

Develop and test workflows in Claude Code locally. Once confident, deploy to Modal with a schedule or webhook trigger. To improve a deployed workflow, edit it locally, test, and push the updated version back to Modal. The agent stays local; only workflows and tools go to production.

Leverage skills and MCP servers to extend capabilities

Don't reinvent the wheel. Search for existing skills (custom instructions) and MCP servers (integrations) that solve common problems. Install them globally so they persist across projects. This multiplies what Claude Code can do without writing extra code.

Security review before production deployment

Always ask Claude Code to review the code for exposed API keys, vulnerabilities, and webhook protections before deploying. Store secrets in Modal's secret manager, not in code. This prevents accidental exposure if code is shared or committed.

Learn by doing: follow along and experiment

Reading about Claude Code is different from using it. The best way to understand how it thinks and works is to open VS Code, follow the tutorial, and build something yourself. You'll see patterns emerge and start to understand the mental model.

Notable quotes

Cloud Code has been allowing me to build things that used to take me hours in just minutes. — Nate Herk
My job is to make confusing things as simple as possible. — Nate Herk
These agentic workflows are basically self-healing. When things fail, they figure out what happened and fix it. — Nate Herk

Action items

  • Download and install VS Code from google.com, then install the Claude Code extension
  • Create a paid Claude account (Pro at $17/month or Max for heavy usage)
  • Enable bypass permissions mode in Claude Code settings to allow hands-off automation
  • Create a new folder for your first project and initialize it with a claude.md system prompt
  • Use plan mode to describe your automation goal in natural language and let Claude Code ask clarifying questions
  • Test your workflow locally in Claude Code before deploying to production
  • Create a Modal account (free with $5 credit, $30 more with card) to host your deployed workflows
  • Run a security review in Claude Code before deploying to check for exposed API keys and vulnerabilities
  • Deploy your workflow to Modal with either a scheduled cron trigger or webhook endpoint
  • Monitor Modal logs and deployment history to validate that your workflow runs correctly
  • Save useful workflows and tools as skills or in your claude.md for reuse across projects
  • Search the Claude Code templates website for existing skills and MCP servers to extend capabilities

More like this