Claude Code for Marketers: A Hands-On Guide to the Terminal Agent
Claude Code is Anthropic's coding agent for the terminal. Here's how a marketer sets it up, writes a CLAUDE.md rule book, builds pages, calculators and CRM imports, and keeps it safe.
Claude Code is Anthropic's coding agent. It runs in your terminal, inside a folder, and can read files, write code and run commands. For a marketer, that means landing pages, calculators, data clean-up scripts, CRM import files and SEO checks of your site's code, built in hours. The trick is a written rule book and strict guardrails.
I think every marketer at a startup should learn it. Not because marketers should become engineers. Because a lot of marketing work is really file work: CSVs to clean, pages to clone, imports to prep and checks to run. A chat window can't touch those files. A terminal agent can.
This is the hands-on version. My Claude for marketing guide covers the whole setup, from projects to connectors. My guide to vibe coding for marketers covers the idea and the stack. This one is about sitting down with the terminal agent itself: installing it, writing its rule book, giving it real jobs and keeping it from breaking things.
Key takeaways
- Use it for file work. Pages, calculators, CSV clean-ups and import files are where it earns its keep.
- Write a CLAUDE.md first. It's the rule book the agent reads every session. Keep it under 200 lines.
- Rules guide, permissions block. Put hard limits, like never reading secrets, in deny rules.
- Branch, preview, review. Nothing reaches the live site without a pull request and a preview link.
- Start with a clean-up script. Easy to check, nothing goes live and the payoff is clear.
What is Claude Code, and how is it different from the Claude app?
Claude Code is an agent, not a chat box. You start it inside a folder. It looks at the files there, makes a plan, writes or edits files and runs commands to check its work. Then it shows you what it changed.
The Claude app is where you write, research and think. Claude Code is where you make files. That's the simplest way to split them.
| Tool | Where it works | What it produces | Best marketing jobs |
|---|---|---|---|
| Claude app | A chat window | Words, analysis, drafts | Briefs, copy, research, summaries |
| Claude Code | A folder on your machine | Files, code, scripts, commits | Pages, calculators, CSV clean-ups, imports, site checks |
| App builders | A hosted editor | A hosted app | Quick prototypes you don't need to own |
Per Anthropic's Claude Code quickstart, it also runs in VS Code, JetBrains editors, a desktop app and on the web. The terminal is still the most direct way in, and the one I'd learn first.
It also asks before it acts. In the default mode, it prompts before most edits, shell commands and network requests. That's a feature. For a marketer new to code, those prompts are a running lesson in what the agent is about to do.
Why should a marketer use a terminal agent at all?
Because the work is already in files. Think about your week.
- An event list arrives as a messy CSV with mixed-up name fields.
- Sales wants 12 versions of a landing page, one per industry.
- The CRM import needs columns renamed, dates reformatted and duplicates removed.
- Someone asks whether every page on the site has a meta description.
- The pricing page needs a small ROI calculator by Friday.
Each of these is a file job. Today, a marketer either does it by hand, waits for a developer or skips it. A terminal agent turns each one into a short brief and a review.
There's a second reason. Scripts are reusable. Once Claude Code writes a clean-up script for one event list, the next list takes seconds. A chat answer is gone when you close the tab. A script in a folder is a tool your team owns.
How do you set up Claude Code?
Setup takes about ten minutes if you've opened a terminal before. Here's the path from Anthropic's quickstart.
Check you have an account
You need one of these: a Claude Pro, Max, Ultra, Team or Enterprise subscription, a Claude Console account with prepaid credits, or access through a supported cloud provider. A personal subscription is the easiest way to try it. For a team, use a Team or Enterprise plan so someone can see usage.
Install it
On a Mac, Linux or Windows WSL, the native install is one line in the terminal.
curl -fsSL https://claude.ai/install.sh | bash
claude --version
On Windows PowerShell, the quickstart gives a separate command, and Homebrew and WinGet installs are listed too. Native installs update in the background. Homebrew and WinGet installs don't, so you update them yourself.
Start a session in a folder
Move into the folder you want to work on, then start it.
cd ~/marketing-tools
claude
The first time, it asks you to log in through your browser. After that, it remembers you.
Ask before you build
Don't start with a task. Start with questions. The quickstart suggests prompts like "what does this project do?" and "explain the folder structure." On a website repo, this tells you where pages live, how they're built and what you shouldn't touch.
Then run /init. It reads the project and drafts a starting CLAUDE.md with build commands and conventions it finds. That file is the next section, and it's the most important one in this post.
How do you write a CLAUDE.md rule book?
A CLAUDE.md is a plain text file of instructions. Claude Code loads it at the start of every session. Without it, each session starts from zero. With it, the agent knows your brand rules, your folders and your no-go zones before you type a word.
Anthropic's memory docs list where these files can live.
| File | Where it lives | Who it's for | Marketing use |
|---|---|---|---|
| Project | CLAUDE.md in the repo | Everyone on the project | Brand rules, folder map, commands, page rules |
| User | ~/.claude/CLAUDE.md | Only you, every project | Your writing style and personal shortcuts |
| Local | CLAUDE.local.md, kept out of git | Only you, this project | Your test data and sandbox links |
Three rules from the docs shape how I write them.
Keep it short. Anthropic suggests under 200 lines per file. Longer files use more of the context window, which is the agent's working memory, and the agent follows them less well. Move rules for one part of the site into separate rule files that load only when needed.
Be specific. The docs say the more specific and concise your rules, the more consistently Claude follows them. "Write well" does nothing. "Headings in sentence case, no em dashes, meta titles under 60 characters" does.
Don't use it as a lock. The docs are clear that CLAUDE.md is context, not enforced settings. If something must never happen, block it with a permission rule. More on that below.
Here's a short example for a marketing site repo.
Marketing site rules
What this repo is:
Next.js marketing site. Pages in app/, blog posts in content/blog/.
Commands:
- npm run dev (local preview)
- npm run build (must pass before any pull request)
Brand and copy:
- Sentence case headings. No em dashes.
- Meta titles 60 characters or fewer. Descriptions 140 to 160.
- Never invent stats, quotes or customer names.
Working rules:
- Always work on a new branch. Never commit to main.
- Never read, print or edit .env files.
- Ask before adding any new package.
- Every image needs alt text. Every form field needs a label.
- End each task with a short summary of what changed and how to check it.
Write it once, then improve it every time the agent gets something wrong. When you correct it twice on the same thing, that correction belongs in the file.
What can marketers build with Claude Code?
Here are the five jobs I'd give it first, ordered from safest to riskiest.
| Job | Input | Output | Risk if wrong |
|---|---|---|---|
| Data clean-up script | Messy CSV | Clean CSV and a log | Low: you check the file |
| CRM import file | Event or list export | Import-ready CSV | Medium: bad data in the CRM |
| SEO audit of a repo | Your site's code | A report of issues | Low: it only reads |
| Calculator | A spec and formulas | One page with the tool | Medium: wrong math goes live |
| Landing page variants | A template and a CSV | One page per segment | Medium: public copy errors |
Clean up data with a script
This is the best first job. Drop the file in a folder and describe the output.
Read events/expo-2026.csv. Write a Python script that splits full names into
first and last, lowercases emails, standardizes company names, and removes
rows with no email. Save clean rows to output/clean.csv and removed rows to
output/removed.csv with a reason column. Print a count of each.
Ask for the removed rows in their own file. That one line turns a black box into something you can check in two minutes.
Prep a CRM import
CRM imports go wrong in boring ways: wrong date formats, duplicate contacts and values that don't match your dropdowns. Ask the agent to check each one before you upload.
Read output/clean.csv and crm/fields.csv, which lists our CRM properties and
allowed dropdown values. Map each column to a property. Flag any value that
isn't allowed. Mark likely duplicates by email and by company domain. Do not
upload anything. Write import/ready.csv and import/report.md.
Deduplication is the step people skip. My guide to a HubSpot import without duplicates covers the matching rules. Use the CRM field naming checker when you create new properties, so the mapping stays clean. If your CRM is already a mess, the CRM data hygiene guide and my CRM cleanup work start there.
Audit your site's code for SEO
If your site lives in a repo, Claude Code can read every page at once. Ask for a read-only report.
Without changing any files, list every page route. For each, report: title
length, meta description length, missing alt text, missing canonical tag,
more than one H1, and internal links that point to pages that don't exist.
Save it to reports/seo-audit.md, sorted by how many pages each issue affects.
This won't replace a crawl of the live site. It finds problems in the source, before they ship. Pair it with a technical SEO audit of what search engines actually see.
Build a small calculator
Calculators make good lead magnets and sales tools. Give the agent a tight spec.
Build a single-page ROI calculator at app/tools/roi/page.tsx.
Inputs: team size, hours saved per person per week.
Output: hours saved per year. Show the formula under the result.
Server-render the page copy. Label every input. No new packages.
Then check the math yourself with three sets of numbers you've worked out by hand. Wrong math on a public page costs more trust than having no calculator at all.
Make landing page variants
Give it one approved template and a CSV with one row per segment.
Read app/lp/template/page.tsx and data/segments.csv. Create one page per row
at app/lp/[slug]. Use the headline, pain and proof columns exactly as written.
If a row is missing a field, skip it and list it. Don't invent copy.
"Don't invent copy" is the line that matters. The agent will fill gaps if you let it. You want it to stop and report instead.
What guardrails keep Claude Code safe?
Four guardrails cover most of the risk. All of them come from the same idea: the agent is fast and confident, and sometimes wrong.


Work on a branch, always
Version control is your undo button. Every task starts on a new branch. Nothing goes to main without a pull request. You can ask Claude Code to make the branch for you, and the quickstart shows it handling git in plain English.
Review in a preview
Every pull request should get a preview link, a private copy of the site with your change in it. That's a staging environment per change. Click through it on your phone and your laptop. Read the agent's summary. Ask it why it made any change you didn't expect.
Block secrets with deny rules
An API key in a public repo is a bad day. Claude Code's permissions docs let you block reading files outright. Add this to your project settings.
{
"permissions": {
"deny": ["Read(./.env)", "Read(./.env.*)", "Read(./secrets/**)"]
}
}
The docs say rules are checked in order: deny, then ask, then allow. A deny rule always wins. An allow rule can't carve an exception out of it. That's the lock CLAUDE.md can't give you.
Pick the right permission mode
Claude Code has several modes. Here are the ones a marketer should know.
| Mode | What it does | When to use it |
|---|---|---|
| Default (Manual) | Asks before most edits, commands and network requests | Your first month, and any live site work |
| Plan | Reads and explores, but doesn't edit your files | Big tasks: get a plan, approve it, then build |
| Accept edits | Auto-accepts file edits and basic file commands in the folder | Trusted clean-up jobs on local data |
| Bypass permissions | Skips prompts | Never, unless you're in an isolated container |
The docs say bypass mode belongs only in isolated environments like containers or virtual machines. Press Shift+Tab to switch modes during a session. When in doubt, plan first. It's cheaper to fix a plan than a pull request.
For agents that act in other tools, like a CRM or ad account, the rules get stricter. My guides to MCP for marketers and AI agent guardrails cover read-only access, approvals and logs. Keep a human in the loop on anything that touches customers or money.
Worked example: what Claude Code saves a marketer in month one
Here's a time budget with assumed numbers. Plug in yours.


Say one marketer does four file jobs a month. By hand, they take 25 hours in total. With Claude Code, once the scripts and CLAUDE.md exist, they take 6.5 hours, mostly review.
- CSV clean-up: 6 hours by hand, 1 hour with the agent. That saves 5 hours.
- Landing page variants: 10 hours by hand, 3 hours with the agent. That saves 7 hours.
- CRM import prep: 5 hours by hand, 1.5 hours with the agent. That saves 3.5 hours.
- SEO checks of the repo: 4 hours by hand, 1 hour with the agent. That saves 3 hours.
That's 18.5 hours back a month, close to half a work week.
The real cost is the first month. Writing the CLAUDE.md, learning the review habit and fixing the first few scripts might take 10 to 15 hours. After that, each repeat job gets faster. Per Anthropic's cost guide, enterprise users stay under $30 per active day 90% of the time, and the average lands between $150 and $250 a month. A marketer working a few days a week will usually spend less.
The same guide has two habits that keep costs down. Use /clear between unrelated tasks, so old context doesn't ride along. And write specific prompts. "Improve the site" makes the agent scan everything. "Fix the meta descriptions in app/blog" doesn't.
Where does Claude Code go wrong for marketers?
Vague briefs. "Make the landing page better" gets you a redesign you didn't ask for. Name the file, the change and the check.
No rule book. Without a CLAUDE.md, you repeat your brand rules every session, and some days you forget one.
Trusting the summary over the preview. The agent says it fixed the form. Click it. Submit it. Check the CRM.
Letting it guess data. Agents fill blanks with plausible values. In copy, that's a made-up stat. In a CRM import, that's a fake job title. Always ask it to flag gaps instead of filling them.
Working on main. One bad commit to main can take a page down. Branches cost nothing.
Skipping the boring checks. Ask for labels on every input, alt text on every image and server-rendered copy. Agents skip these unless the brief or the CLAUDE.md asks.
What does a week-one plan look like?
Here's how I'd spend the first week. About an hour a day.
| Day | Task | Output |
|---|---|---|
| Monday | Install, log in, start a session in a test folder | A working setup |
| Tuesday | Ask questions about your site repo, then run /init | A draft CLAUDE.md |
| Wednesday | Trim the CLAUDE.md, add deny rules for secrets | A rule book and a lock |
| Thursday | Write a CSV clean-up script on a real list | A reusable script and a log |
| Friday | Build one small page change on a branch with a preview | Your first reviewed pull request |
If you'd rather have the tools built for you, my custom software service builds calculators, internal tools and data scripts your team can run. It's the same approach, with the review done for you.
My take: learn the agent, keep the judgment
Claude Code doesn't make a marketer an engineer. It makes a marketer someone who can ship small, useful things without waiting in a queue.
That's a big deal at a startup, where the developer queue is long and the marketing to-do list is longer. But the value comes from the parts that stay human. You write the brief. You write the rule book. You review the preview. You decide what ships.
Treat it like a fast new hire on day one. Give it clear rules, small jobs and a review on everything. Widen its scope only when it has earned it.
FAQ
Do marketers need to know how to code to use Claude Code?
No, but you need to read what it does. You should be able to open a terminal, move into a folder and run a command. You should also be willing to read a summary of each change and click through a preview. Claude Code writes the code. You own the brief, the review and the decision to ship.
What plan do you need for Claude Code?
Anthropic's quickstart lists a Claude Pro, Max, Ultra, Team or Enterprise subscription, a Claude Console account with prepaid credits, or access through a supported cloud provider. For one marketer testing it, a personal subscription is the simplest start. Teams should use a Team or Enterprise plan so an admin can see usage and set limits.
What is a CLAUDE.md file?
It's a plain text file of instructions that Claude Code reads at the start of every session. Put your brand rules, folder layout, commands and do-not-touch list in it. Anthropic suggests keeping each file under 200 lines. Treat it as guidance, not a lock, and block risky actions with permission rules instead.
Is Claude Code safe to use on our website repo?
It can be, with guardrails. Work on a branch, never on main. Review every change in a pull request with a preview link. Add a deny rule so it can't read your .env file. Keep it in the default permission mode, which asks before edits and commands, until you trust the workflow.
What is the difference between Claude Code and the Claude app?
The Claude app is a chat window for writing, research and analysis. Claude Code is an agent that works inside a folder on your computer. It reads files, writes code and runs commands. Use the app for words. Use Claude Code when the output is a file, a page, a script or a cleaned data set.
How much does Claude Code cost to run?
On a subscription, usage is included up to your plan's limits. On API billing, Anthropic's cost docs say enterprise deployments average around $13 per developer per active day, and $150 to $250 a month. A marketer who uses it a few days a week will usually land well below a full-time developer's usage.
What should a marketer build first with Claude Code?
Start with a CSV clean-up script. The input and output are easy to check, nothing goes live and the time saved is obvious. Once that works, build a small calculator or a landing page variant on a branch, review it in a preview and only then ship it.
More like this
StartupsAI and automation