Coding
for
Marketers

A step-by-step guide to go from nontechnical to coding pro with agentic AI tools.

  • No terminal experience required
  • Automate marketing tasks
  • Build custom tools
Terminal
$ npm install -g @anthropic-ai/claude-code
$ claude
> Create a landing page for my SaaS
✓ Created Next.js project
✓ Installed dependencies
✓ Built homepage with hero section
✓ Added pricing table
✓ Deployed to Vercel
$ ready

The Difference

ChatGPT gives you advice. Agentic tools do the work.

You:
Create a contact form component
ChatGPT:
Here's how you can create a contact form...
function ContactForm() {
  return <form>...</form>
}
Now you copy this, create a file, paste it, fix the imports, style it...

You're the middleware between AI and your project.

What Agents Are Great At

Agents excel at work humans find tedious, error-prone, or overwhelming. Understanding this helps you delegate effectively.

Processing Large Data

They don't get tired or lose context

What they handle well
  • Scanning large files and logs
  • Summarizing unfamiliar codebases
  • Transforming data between formats
  • Finding patterns humans would miss
Your role
Decide what matters and why
The mental shift

Stop thinking about what you can build. Start thinking about what you can delegate. You're the director. The agent does the repetitive execution.

What You Can Build

Real marketing projects you can build with AI agents. Each example is a prompt away.

Landing page with A/B variants
"Build a landing page with headline variants I can test"
Pricing page with toggle
"Create a pricing page with monthly/annual toggle"
Competitor comparison page
"Build an alternatives page comparing us to competitors"
Case study template
"Create a case study page with results metrics"
Marketing-friendly CLI toolsClaude can use these
vercelDeploy in seconds
stripeTest payments locally
resendSend transactional email
supabaseDatabase & auth
posthogAnalytics & experiments
ghGitHub from terminal

Just say "deploy this to Vercel" or "set up Stripe payments" and the agent handles the CLI.

Pick one thing you wish existed. Tell Claude to build it. Iterate.

Terminal Basics

The terminal is where you run commands. Claude Code uses it too. These are the same commands you'll see it run.

Navigate Commands
cd folder-nameGo into a folder
cd ..Go up one level
cd ~Go to home folder
lsList files in current folder
pwdShow current location
You don't need to memorize these
Claude Code runs these commands for you. But knowing what they do helps you understand what the agent is doing.

Install Node.js

Before installing Claude Code, you need Node.js. It's a runtime that lets you run JavaScript tools like npm (Node Package Manager).

Download Node.jsStep 1 of 3
Go to nodejs.org and download the LTS (Long Term Support) version for Mac.
Open your browser and visit:
 
https://nodejs.org
 
Click the big green "LTS" button to download.

Once Node.js is installed, you're ready to install Claude Code.

Getting Started

From zero to your first project in 5 steps. No coding knowledge required.

Open TerminalStep 1 of 5
On Mac: Cmd+Space, type 'Terminal'. On Windows: search 'Command Prompt' or 'PowerShell'.
A window with a blinking cursor. This is where you type commands.

That's it. You just need a description of what you want to build.

What Code Actually Is

Code is just text files in folders. A "project" is a folder with rules about how the files work together.

File Explorer
my-project
page.tsx← your homepage
layout.tsx← wrapper for all pages
package.json← project config

Click folders to explore. This is all a project is: organized text files.

The Software Stack

Modern software has layers. Here's where you fit in.

Stack Overview
1AI Providers
OpenAIAnthropicGoogle

The brains. You don't talk to these directly.

2Agentic Tools← You are here
Claude CodeCursorCodex

Where you work. They talk to AI and execute on your files.

3Languages & Frameworks
Next.jsRailsDjangoLaravel

Pre-built structure. The agent writes in these for you.

4Source Control
GitGitHub

Tracks every change. Your safety net.

5Hosting
VercelHerokuRailway

Runs your code so the world can access it.

As a marketer, you work at layer 2. The agentic tool handles everything else.

Running Locally & Ports

"localhost" means your computer. A "port" is like an apartment number: which app to connect to.

Development ServerStopped
$ npm run dev
localhost
Your computer
:
Separator
3000
Port number
Common ports you'll see
:3000Next.js, React
:5432PostgreSQL
:3001Second app
:6379Redis
:8080Various servers
:5173Vite
Port already in use?
If you see "port 3000 is already in use", either stop the other server or run on a different port: npm run dev -- --port 3001

Environment Variables & API Keys

Secrets like passwords and API keys are stored separately from your code. Never in files that get uploaded to GitHub.

.env.local
# This file is ignored by git - secrets stay local
DATABASE_URL=••••••••••••••••••••
STRIPE_SECRET_KEY=••••••••••••••••
NEXTAUTH_SECRET=••••••••••••••••••••
Why separate files?
Your code goes to GitHub (public or private). Secrets should never be uploaded. .env files are in .gitignore so they're never committed.
Where to get API keys
Each service has a dashboard: Stripe Dashboard, Supabase Settings, etc. Ask Claude "How do I get a Stripe API key?"
⚠️ Never commit secrets
If you accidentally push an API key to GitHub, consider it compromised. Rotate (regenerate) the key immediately. Claude Code warns you if you try to commit .env files.
In production (Vercel, Heroku, etc.)
You'll add these same variables in your hosting dashboard under "Environment Variables". Each environment (dev, staging, production) has its own secrets.

Context & Tokens

AI models have a "context window", a limit on how much they can remember in one conversation.

Context Window0 / 200,000 tokens
You: Add a contact form to the homepage+12
Plenty of room. Keep chatting!
What are tokens?
Tokens are chunks of text, roughly 4 characters or 3/4 of a word. "Hello world" = 2 tokens. Everything you send AND receive counts toward the limit.
When it fills up
The AI starts "forgetting" earlier messages. For long projects, start new conversations and re-explain context as needed.
Tips for managing context
• Break big tasks into separate conversations
• If Claude forgets something, just remind it
• Long code files use lots of tokens, so reference files by name instead of pasting

Markdown Files

Markdown (.md) is a simple way to format text. It's used for READMEs, docs, and notes.

Markdown Syntax
You write
# Heading 1
## Heading 2
**bold text**
*italic text*
[Link](url)
- Item 1\n- Item 2
`code`
```js\ncode block\n```
It becomes
Heading 1
Heading 2
bold text
italic text
Link
• Item 1
• Item 2
code
code block
Why markdown?
It's readable as plain text but renders nicely on GitHub, in editors, and documentation sites. You're already writing in markdown if you've used Notion or Slack formatting.

How It Actually Works

You describe what you want. The agent reads your code, makes a plan, and executes.

You:
Add a contact form with name, email, and message fields.
Your job
Clear communication, reviewing changes, steering direction
Agent's job
Reading docs, writing code, checking for errors

Agent Modes

Control how much autonomy your agent has. Start safe, speed up as you get comfortable.

Default Mode

You approve each file change before it's applied

Pros
  • + Safe for learning
  • + See every change
  • + Easy to reject mistakes
Cons
  • - Slower workflow
  • - Lots of clicking
Tip
Great for beginners. You'll learn by reviewing what the agent does.
The progression
DefaultAuto-acceptPlan mode for big tasks

Most developers land on auto-accept with occasional plan mode. YOLO is for specific situations.

The Iteration Loop

You don't need to get it right the first time. Describe, review, refine.

Iteration 1 of 4
You:
Change the headline to 'Ship faster with AI'
Updated Hero.tsx headline
The pattern
DescribeAgent buildsReviewRefineRepeat

Git & GitHub

Your safety net. Every change is tracked, nothing is lost.

Git vs GitHub
Git
• Lives on your computer
• Tracks every change
• Creates save points (commits)
• Works offline
GitHub
• Lives on the internet
• Stores code online
• Enables collaboration
• Connects to deployment
git push uploads changes  | git pull downloads changes

Learning by Asking

You don't memorize syntax. You ask "why" and build intuition over time.

Understanding Stripe Webhooks
You:
Why do I need a webhook for Stripe instead of just checking after checkout?
Claude:
The user might close the browser before your site gets the success callback. Webhooks guarantee Stripe tells you about the payment directly.
Ask for narration: "Explain each step as you go"
Ask why: "Why this approach instead of X?"
Ask for diffs: "Show me what you changed"

Week 1: "What does this do?" → Week 8: "I know what we need" → Week 12: "Try this instead"

Debugging

Errors are normal. Paste them to the agent and ask "What does this mean?"

Error Log
Cannot read properties of undefined
Translation
Accessing something that doesn't exist yet
Common fix
Add optional chaining: users?.map(...)
Error 1 of 4
The debugging loop
1. Copy error
Full message
2. Paste to agent
"What happened?"
3. Review fix
Then apply

If a fix makes things worse, undo with: git checkout .

Testing & TDD

Tests are code that checks if your code works. Write tests first, then the code.

Test-Driven Development
Write a failing test:
test("validates email", () => {
expect(isValid("a@b.com")).toBe(true);
});
FAIL: isValid is not defined
Without tests
Change → Manual check → Miss bug → Deploy → User finds it at 2am
With tests
Change → npm test → Bug caught → Fix → Deploy confidently
Ask the agent
"Let's build this using TDD - write the tests first"

Extending Your Agent

Give your AI more powers. Think of it as assembling a team of specialists.

MCPsExternal connections
stripe
Check payments & subscriptions
posthog
Query analytics data
browser
Scrape competitor sites
slack
Send notifications
How to ask
"What's the best package for sending transactional emails?"
"Connect to Stripe so you can check my subscription revenue"
"Add a chart showing signups over time"

Skills

Skills are reusable capabilities you can add to your AI agent. They give Claude domain expertise: best practices, patterns, and procedural knowledge.

Without skills
Claude uses general knowledge. Works, but may miss framework-specific patterns.
With skills
Claude follows expert-level best practices for that specific domain.
Installing a skillOne command
# Install any skill from the directory
$ npx skills add owner/skill-name
# Skills work with Claude Code, Cursor, Copilot & more
Popular skills from skills.sh
vercel-react-best-practices
React & Next.js patterns
42K
web-design-guidelines
UI/UX best practices
32K
shadcn-ui
Component library patterns
28K
anthropics/claude-code frontend-design
Official Claude UI design
600+
Browse all skills at skills.sh →
Marketing SkillsFor marketers

CRO, copywriting, SEO, analytics, and growth engineering patterns for AI agents.

$npx skills add coreyhaines31/marketingskills
View on GitHub →

Tech Stacks

AI tools work best with popular languages. Start with Next.js unless you have a reason not to.

Next.jsRecommended
Language
TypeScript
Deploy to
Vercel
Used by
Notion, TikTok, Nike
Strengths
Runs everywhereHuge ecosystemBest AI support
Good for
Marketing sitesSaaS appsE-commerceDashboards
AI Support: Excellent. Most code online is JS/TS.
Not sure?
Ask Claude: "I want to build [your project]. What tech stack should I use?"

Learn by Exploring

Clone these open source Vercel templates to see how real projects are built. Poke around, break things, ask Claude to explain what you find.

Website

Portfolio Starter Kit

A simple portfolio and blog built with Next.js and Markdown. Great for learning how pages and content work together.

Markdown-based contentRSS feedSEO optimizedDark mode
App

Blog Starter

A statically generated blog using Next.js and Markdown. Shows how to build content-driven apps.

Static generationTailwind CSSMarkdown postsTypeScript
App

AI Chatbot

A full-featured chatbot built with the Vercel AI SDK. See how AI integrations work in a real app.

AI SDKStreaming responsesAuthenticationDatabase
Clone and explore
$ git clone https://github.com/vercel/nextjs-portfolio-starter
$ cd nextjs-portfolio-starter
$ npm install && npm run dev
Then ask Claude: "Explain how this project is structured"

Try It Yourself

You just learned everything you need to start building. Click through this terminal to see the workflow in action.

Step 1 of 7: Install Claude Code
$npm install -g @anthropic-ai/claude-code
What you just learned
One command to install. Works on Mac, Windows, and Linux.
0 of 7 completed

Join the Community

Learn from other marketers who are building with AI. Get help when you're stuck. Share what you're creating.

Terminal
$ subscribe --email
>
you@example.com