This is a complete guide to running your GTM work out of Claude Code. GTM (go-to-market) means everything you do to find and win customers: lists, research, outreach, reporting.
Claude Code is Anthropic’s AI agent. It runs in your terminal, the text window where you type commands, and it can read files, write and run small programs, and call other tools. In this guide, “Claude” means Claude Code.
We’ll build one setup step by step: installing Claude Code, the project folder, the file Claude reads at the start of every session (one conversation with Claude Code), the scripts that do the work, and the memory that turns each of your corrections into a rule.
This is the structure I work in every day. In the example run at the end, one typed sentence becomes a checked list of 678 contacts in a Google Sheet. Your part is one approval, four rounds of reading ten rows, and the launch.
This guide is for founders who have never set up Claude Code and for GTM people who want a cleaner structure. You don’t need to be an engineer. If Claude Code already runs on your computer, skip to step 2.
How the setup works
The setup splits the work into three layers. Claude makes the decisions, and everything that has one right answer runs in code.
- Workflows are written instructions, one file per job. Each one describes the job the way you’d brief a new colleague: the goal, the inputs, which scripts to run in which order, what the result looks like, what to do when something breaks. They’re markdown files, plain text with a few symbols for headings and lists.
- Claude reads the workflow, decides what to run next, reads error messages, fixes what it can and asks you when it can’t.
- Scripts are small programs in Python, a common programming language. Each one does one job: pull companies from a data provider, remove duplicates, check which companies fit, verify emails, write rows to a sheet. The same input always gives the same output. Claude writes them for you.
You talk to Claude. It reads the workflows and runs the scripts, and you almost never run a script yourself.
Why the split matters. Say Claude gets a single step right 90% of the time when it does the work without a script. A list build has at least five steps: pull, remove duplicates, check fit, find emails, check the list. Chain five steps at 90% each and the whole run is right 59% of the time (0.9 to the power of 5). At ten steps it’s 35%.
A tested script does the same thing on row 10,000 as on row 1. So my rule is: if a step has one right answer, it goes into a script. Counting, matching, removing duplicates and cutting by employee count all belong there.
Judgment stays with the model and with you: what a company sells, which segment (group of similar target companies) to run first, what a reply means.
For the fit check, a model reads each company’s website and answers one yes/no question from your context files. A script sends the question, saves every answer and does the counting. Row 900 gets exactly the same question as row 1.
1. Install Claude Code and open it in a folder
Claude Code needs a paid Claude plan. Pro costs $20 a month and includes it. The free plan doesn’t.
On a Mac, open the Terminal app (press Cmd+Space and type “Terminal”) and paste the install command from Anthropic’s docs:
curl -fsSL https://claude.ai/install.sh | bash
Then create your project folder, go into it and start Claude Code:
mkdir gtm
cd gtm
claude
The first time, Claude Code opens your browser so you can log in with your Claude account. After that, typing claude inside the folder is all it takes. If you’d rather not use the terminal, Claude Code also runs in the Claude desktop app.
Two keys you’ll use all the time. Shift+Tab switches between modes. Press it until the bar under the input says “plan mode on”, and Claude proposes what it will do before it changes any file. Esc stops Claude in the middle of a step.
Your first prompt can build the folder from step 2 for you:
Create the folder structure for a GTM workspace: CLAUDE.md, context/,
workflows/, tools/, .claude/skills/, .tmp/, an empty .env and a
.gitignore that excludes .env and .tmp/. Don't write any scripts yet.
2. Set up the project folder
Everything lives in one project folder. Claude reads it, and you can open every file yourself.
gtm/
├── CLAUDE.md # read at the start of every session
├── context/
│ ├── icp.md # who you sell to, the yes/no question
│ ├── offer.md # what you sell, proof, pricing model
│ ├── voice.md # how your messages sound
│ ├── answer_key.csv # 40 companies you labelled yes or no by hand
│ └── exclude.csv # customers, open deals, opt-outs
├── workflows/
│ ├── build-account-list.md
│ ├── research-account.md
│ └── weekly-report.md
├── tools/
│ ├── pull_companies.py
│ ├── dedupe.py
│ ├── qualify.py
│ ├── enrich_contacts.py
│ ├── verify_emails.py
│ ├── check_list.py
│ └── push_to_sheet.py
├── .claude/
│ ├── settings.json # permissions, shared with the team
│ └── skills/
│ └── account-research/
│ └── SKILL.md
├── .tmp/ # temporary files, rebuilt on every run
├── .env # API keys, never shared
├── .mcp.json # MCP servers for this project
└── .gitignore # files git must never share: .env, .tmp/
The ICP (ideal customer profile) in context/icp.md describes the companies that fit you best, and it ends with one yes/no question every company has to pass.
An API is the connection one program uses to talk to a tool directly. An API key is the password for it. Git is the tool many teams use to share a project folder, and .gitignore lists the files it must leave out.
Three rules keep the folder clean:
- .env holds the keys for your scripts. Open it in a text editor and paste each key after its name, like
PROSPEO_API_KEY=abc123. Scripts read the keys from there. Never paste a key into the chat, a workflow or a file you share. - .tmp/ holds only files you can rebuild. Raw data from the tools, website text, files between two steps. If you can’t regenerate a file, it doesn’t belong there.
- Results go where people work. The finished list goes to a Google Sheet, the CRM (the database where your sales team tracks companies and deals) or the sending tool (the tool that sends your emails). Files on your computer are working files.
3. Write CLAUDE.md, the file every session reads first
Claude Code loads CLAUDE.md from the project folder at the start of every session. Keep it under 200 lines. Longer files use more of the text Claude can work with at once, and Claude follows them less reliably.
CLAUDE.md says what the project is, where things live, the rules, and what to do when something breaks. The details of each job belong in its workflow.
A file to copy:
# GTM workspace
## What this is
Outbound and list building for [company]. We sell [offer] to [ICP in one line].
Finished work goes to [Google Sheet / CRM / sending tool]. Local files are working files.
## Read first
- context/icp.md before any targeting, list or fit-check work
- context/offer.md and context/voice.md before writing anything a prospect will read
## How work happens here
1. Find the workflow in workflows/ that matches the task and follow it.
2. Use the scripts in tools/. If none fits, say so and propose a new one before you write it.
3. Anything with one right answer (counts, duplicates, matching, number cuts, formatting)
runs in a script. Never estimate it.
4. Save every API response unchanged to .tmp/raw/ before you parse it.
5. After every run, report the row count after each step.
## Rules
- Before any paid API call, tell me the expected number of calls and wait for a yes.
- Remove everything in context/exclude.csv before any paid contact lookup.
- The CRM is read only. Never create or update records.
- Never send, launch or schedule anything. You prepare, I launch.
- Keys live in .env. Never print them or copy them anywhere else.
## When something breaks
Read the whole error. Fix the script, rerun it on 5 rows, then on the full set.
Add a dated line to the workflow's Learned section: what broke and why.
## When I correct you
Save the correction as a memory rule (rule, why, how to apply).
If the same rule comes up a second time, propose a check in a script.
The raw-data rule saves money. If a script has a bug in the parsing, you fix it and run it again on the saved files instead of paying for the same data twice.
CLAUDE.md is an instruction, not a block. Claude reads it and tries to follow it, but Claude Code doesn’t enforce it. For anything that must never happen, like writing to the CRM or sending an email, also add a deny rule. That’s a line in .claude/settings.json that blocks a tool completely. Step 7 shows how.
4. Write one workflow per job
A workflow is the written instruction for one job. Write it in plain language, name the script for every step, and say exactly where Claude should stop and ask you.
# Workflow: build an account list
## Objective
Every buyer at every company in one segment that passes the question
in context/icp.md, with verified emails, in a Google Sheet.
## Inputs
- segment name (must exist in context/icp.md)
- buyer titles (from context/icp.md, all of them, no limit per company)
## Steps
1. tools/pull_companies.py --segment <name> raw data to .tmp/raw/
2. tools/dedupe.py then remove context/exclude.csv and companies
contacted in the last 90 days (fresh CRM export)
3. tools/qualify.py --test run the question on context/answer_key.csv.
STOP if any answer differs from mine.
4. tools/qualify.py the same question on every company
5. STOP. Report counts and the number of paid lookups. Wait for my go.
6. tools/enrich_contacts.py, then tools/verify_emails.py
(keep only valid, drop unknown, catch-alls only after a catch-all check)
7. tools/check_list.py domain match, shared inboxes, duplicates
8. tools/push_to_sheet.py
## Output
Sheet named "<segment> wk <week>", plus the row count after every step.
## Edge cases
- The API says "too many requests" (error 429): wait 60 seconds, retry 3 times,
then stop and tell me.
- Under 100 companies pass the question: stop and ask before loosening anything.
## Learned
- (date) The CRM export writes websites with "www." in front.
dedupe.py removes it before matching.
Step 3 is the check most people skip. You label a few dozen companies by hand first: your customers as yes, the companies that look right but aren’t as no. The question only runs on the full list once the model agrees with your labels. My TAM playbook shows this step in detail.
Then ask Claude to write each script the workflow names, one at a time, and test each one on 5 rows before the next.
The Learned section is where the setup gets better. When a run breaks and Claude fixes the script, it adds a dated line there. The next run knows why the script looks the way it does.
5. Turn repeated instructions into skills
A skill is a saved set of instructions you call by name. It’s a folder in .claude/skills/ with a file called SKILL.md inside. The file starts with a short header (a name and a description), and the instructions follow below it.
You call a skill with a slash command, like /account-research. Claude also loads it on its own when your request matches the description. A skill folder can also hold its own scripts and reference files.
Skills and workflows work together. The workflow holds the full instructions for a job, and the skill is a short command that starts it. A good skill is often a few lines that say which context to read and which workflow to follow.
Build a skill the third time you type the same instructions. If the instructions still change every time, wait. A skill makes Claude do the job the same way every time, so the job should be settled first.
---
name: account-research
description: Research one company before outreach and write a short brief.
Use when I ask to research an account, prep for a call with a company,
or find an angle for a specific company. Not for building lists.
---
# Account research
1. Read context/icp.md and context/offer.md.
2. Follow workflows/research-account.md for the company I name.
3. Write the brief to .tmp/research/<domain>.md.
4. Every fact in the brief needs a source URL. Leave out what you can't source.
Write the description in the words you type. Claude picks a skill by its description. Use the phrases you use (“research this account”, “prep for a call with”). If another skill does something similar, say what this one isn’t for.
6. Save every correction as a rule
This is the step that makes the setup better every week.
Claude Code has auto memory, and it’s on by default when you run Claude Code on your own computer. When you correct Claude or confirm an approach, it can save a note as its own markdown file in ~/.claude/projects/<project>/memory/. It also adds one line to an index file called MEMORY.md.
At the start of every session, the first 200 lines or the first 25 KB of that index load, whichever limit comes first. During the session, Claude reads the individual note files it needs and uses the index to find them. Type /memory in a session to see and edit them.
I don’t leave this to Claude. When I correct something, I add “save that as a rule”, and every rule file has the same three parts:
---
name: shared inboxes are not contacts
description: info@, office@, sales@ never count as a person
type: feedback
---
Rule: an address like info@, office@ or sales@ never counts as a contact person.
Why: a shared inbox doesn't belong to one person. Counted as a person,
it makes the share of companies with a contact look higher than it is.
How to apply: keep these rows, tag them as generic, and use the owner's name
from the website for the greeting. Report them in their own column.
The line “type: feedback” marks the note as a correction.
The loop. A correction becomes a rule file, and its line in the index loads in the next session. If the rule comes up a second time, it moves into code. The rule above becomes a check in check_list.py, and the memory file names the script.
Clean up the memory once a month. Merge duplicate rules, shorten rules a script now enforces to one line that names the script, and fix any two rules that contradict each other. Only the start of the index loads, so a long index drops rules without telling you.
Memory stays on one computer. Auto memory isn’t shared between machines. If a team works in the same setup, put team-wide rules in CLAUDE.md or in .claude/rules/ (one file per topic) inside the project folder, where everyone who shares the folder gets them.
7. Connect your tools with API keys and MCP servers
There are two ways to connect a tool, and you’ll use both. An API key lets a script call the tool. An MCP server lets Claude call it directly in the conversation. MCP (Model Context Protocol) is an open standard for connecting AI agents to outside tools, and many data and sales tools offer an MCP server.
| Route | Best for | How Claude uses it | Example |
|---|---|---|---|
| API key plus script | Bulk jobs, anything you repeat | Runs a script in tools/ that reads the key from .env | Pull 3,000 companies, verify 800 emails |
| MCP server | Lookups, CRM questions, one-off checks | Calls the tool directly in the conversation | “Which of these 40 websites already have an open deal?” |
My rule: if a job touches 50 rows or more, it goes through a script. Everything an MCP server returns lands in the conversation, and Claude Code cuts off very large results. A script writes the results to a file instead.
API keys. Create the key in the tool’s settings, put it in .env, and ask Claude to write the script that uses it. Test the script on 5 rows before anything else.
# .env (never share this file)
COMPANY_DATA_API_KEY=
EMAIL_FINDER_API_KEY=
VERIFIER_API_KEY=
SEQUENCER_API_KEY=
Common picks: Prospeo, BlitzAPI or GetLeads for company and people data, with Apollo as another option. Prospeo or LeadMagic for finding emails. MillionVerifier for checking them, and LeadMagic or BounceBan for catch-all addresses (mail servers that accept every address, so a normal check can’t confirm them).
Instantly, Smartlead or Lemlist for sending. All of them have an API, so all of them fit this setup.
MCP servers. Type this in your terminal, outside Claude Code. It adds a remote server, one that runs on the tool’s side and is reached over the internet:
claude mcp add --transport http crm --scope project https://mcp.example.com/mcp
With –scope project, Claude Code saves the server to .mcp.json in the project folder, so everyone who shares the folder, for example through git, gets it. Claude Code asks you to approve a project server the first time it sees it.
Don’t write a key into .mcp.json. Write ${CRM_API_KEY} instead, and Claude Code fills in the value from an environment variable, a setting stored in your terminal.
Block the write tools. If your CRM’s MCP server can create or update records, deny those tools in .claude/settings.json. A line in CLAUDE.md is only an instruction. A deny rule is enforced by Claude Code itself.
{
"permissions": {
"deny": [
"mcp__crm__create_record",
"mcp__crm__update_record"
]
}
}
The exact tool names depend on the server. They all follow the same pattern: mcp__, then the server name, two underscores, then the tool name.
8. Run it: one sentence to a finished list
Here’s an example run with this setup.
Say you sell scheduling software to physical therapy groups with 3 to 30 clinics in the US. On Monday you type one line:
Build next week’s list for the multi-clinic PT segment and get it ready for the sending tool.
- Session start. CLAUDE.md and the memory index load. Claude finds two rules that apply to this segment and opens workflows/build-account-list.md.
- Pull. pull_companies.py runs the segment’s filters against your company data provider. 3,120 companies come back, and the raw data goes to .tmp/raw/.
- Remove duplicates and exclusions. dedupe.py removes 410 duplicates. Then 960 companies go out: customers, open deals, opt-outs and companies you contacted in the last 90 days, checked against a fresh export from the CRM. 1,750 are left.
- Check fit. qualify.py first asks the question about the 40 companies in your answer key and agrees with all 40. Then it asks about all 1,750: “Does this company run three or more outpatient physical therapy clinics under one owner?” 520 pass.
- Stop and ask. The company data came from a flat-rate plan, one payment a month. The email finder charges per contact, so the run stops here. Claude reports 520 companies with 1,040 people in the buyer roles, so up to 1,040 paid lookups. You say go.
- Find and verify emails. The email finder returns 790 contacts with an email. The verifier marks 701 of them valid, and the other 89 (invalid, unknown or catch-all) are dropped.
- Check. check_list.py flags 38 rows where the email domain doesn’t match the company’s website. Claude reads them: 29 are clinic groups that email from their parent brand’s domain, and 9 are wrong matches. It adds a list of known parent domains to the check, reruns it, drops the 9 and adds a dated line to the workflow’s Learned section.
- Deliver. push_to_sheet.py writes 692 rows to a Google Sheet, and Claude prints the count after every step.
Then comes your part. You open the sheet and read ten rows. Two of them are hospital outpatient departments. In this example they buy through the hospital’s IT team and never on their own. You tell Claude.
Claude saves the rule to memory, searches the whole sheet for the same kind of row and removes 14. 678 rows are left. If hospital departments come up again next week, the rule goes into the “no” list of the question in context/icp.md, so the fit check catches them.
You read three more rounds of ten rows, and all three come back clean. Then you import the list into the sending tool and launch the campaign yourself.
Your part of that run was one approval, four rounds of ten rows and the launch. The correction you made is already in memory for next Monday.
9. Keep these steps manual
For some steps, Claude prepares the work and you do the last click. The reason is the cost of a mistake.
Take a merge field, the placeholder like {first_name} that the sending tool fills in. If it’s broken and 2,000 people get that email, nobody can take it back. Automating the launch click saves you a few seconds.
- Anything that reaches a person. Sending, launching campaigns, connection requests, posts. Claude prepares, you press the button.
- Paid runs. Claude states the number of calls first and waits for a yes.
- Writes to the CRM. Claude only reads the CRM. The deny rule from step 7 blocks every write.
- The answer key. You label the test companies yourself. If Claude labels them, the test only checks Claude against Claude.
- The offer and the angle. Claude can draft ten angles from your context files. Picking the one you’d defend on a sales call is your job, in my opinion.
- Reading every list by hand. Read ten rows, fix the rule behind any wrong row, and repeat until three rounds of ten in a row come back clean. In my experience this catches problems no check was written for yet, and each of those becomes the next check.
- The monthly memory cleanup. Ten minutes, once a month.
Where to start today
You can have your setup running today in three steps:
- Install Claude Code, create the project folder and write CLAUDE.md with the sections from step 3.
- Write the workflow for the GTM job you do most often and let Claude turn its steps into scripts.
- Connect your tools and run it. Every correction you make goes into memory as a rule.


