Claude Code is Anthropic's terminal-based AI coding agent. It runs in your shell, reads your actual files, and executes commands. It is not a chat interface bolted onto a code editor — it is an agent that works inside your project the way a senior developer would if they could type 200 words per second and never get bored.
This guide covers installation, the first commands worth running, and six real workflows that justify keeping it in your daily stack. If you are a non-developer using Claude Code to build marketing tools, automations, or content systems, this is written for you.
What Claude Code Actually Is
Most AI coding tools are autocomplete on steroids. You write code, they suggest the next line. Claude Code works differently. You give it a goal — "add a webhook endpoint to this Express app" — and it reads the relevant files, writes the code, runs it, checks for errors, and iterates. You review and approve changes at each step.
It has access to your file system, your terminal, and any CLI tools you have installed. That means it can run npm install, commit to git, read your .env file structure (without leaking secrets if you are careful), and grep through a codebase it has never seen before.
The practical implication: Claude Code collapses the gap between "I have an idea" and "the code is running." For operators who are not full-time developers, that gap used to be a bottleneck. Now it is not.
Installation and First-Run Setup
Claude Code requires Node.js 18 or higher. Check your version first, then install the package globally.
- Check Node version: run node --version in your terminal. If it is below 18, install Node from nodejs.org.
- Install Claude Code globally via npm.
- Run the auth command — it opens a browser, you log in with your Anthropic account, and credentials are stored locally.
- Navigate into a project folder and start a session.
- On first run, Claude Code scans the directory and builds context about what the project is.
npm install -g @anthropic-ai/claude-codeclaudeOnce you are inside a session, you type instructions the same way you would in Claude.ai — except Claude Code can actually touch the files. You approve file writes and shell commands before they execute. Nothing happens silently.
Claude Code uses your Anthropic API credits, not a flat subscription. For most marketing and automation projects, a session runs between $0.10 and $1.50 depending on codebase size and how many back-and-forth iterations happen. Budget accordingly if you are running it daily.
The CLAUDE.md File: How to Make It Work for Your Stack
The single highest-leverage move when setting up Claude Code is writing a CLAUDE.md file in your project root. This is a plain-text file Claude reads at the start of every session. Think of it as standing instructions for a contractor who needs context about your project before touching anything.
A good CLAUDE.md tells Claude: what the project does, which files are off-limits, what tech stack you are using, how to run tests, and any conventions you care about. Without it, Claude Code asks clarifying questions or makes reasonable guesses that may not match your setup.
# CLAUDE.md
## Project
This is a Node/Express lead capture API deployed on Railway. It connects to GoHighLevel via webhook and sends confirmation emails through Resend.
## Stack
- Node 20, Express 4
- Railway for hosting
- Resend for transactional email
- GoHighLevel webhook inbound
## Rules
- Never touch .env directly — reference .env.example for structure
- All routes go in /routes — no inline routing in server.js
- Run `npm test` before any commit
- Prefer async/await over .then() chains
## Deploy
`railway up` from project rootWrite this file once and update it as your project evolves. It pays dividends on every future session because Claude Code starts with the right mental model instead of reverse-engineering it from file names.
Six Workflows That Make Claude Code Worth It
These are the use cases that show up repeatedly when operators use Claude Code for real business work — not toy demos.
- Scaffold a new integration fast. Tell it what the external API does, paste in the authentication docs or an example curl request, and ask it to build a working module. It writes the file, installs the dependency, and wires it into your existing app structure.
- Debug an error you cannot read. Paste a stack trace or error message and ask Claude Code to find the cause in your actual files. It does not guess — it traces the error back to the line, explains why it is happening, and proposes a fix.
- Refactor a messy file. Point it at a specific file and tell it what bothers you: duplicate logic, a function that does too much, hardcoded values that should be constants. It rewrites cleanly and shows you the diff before touching anything.
- Write and run tests for existing code. Ask it to read a function and write unit tests for it using whatever testing framework you already have. Then ask it to run the tests. This catches edge cases you did not think about.
- Build a one-off script. Need to parse a CSV, hit an API for each row, and write results to a new file? Describe the task. Claude Code writes the script, runs it on a test file, and confirms the output format before you run it on real data.
- Generate documentation from code. Ask it to read a folder of route files and produce a plain-English API reference. Useful when you are handing a project to someone else or coming back to your own code after three months away.
Practical Prompts That Get Better Results
The quality of Claude Code output scales with how precisely you describe the goal and the constraint. Vague prompts produce working code that solves the wrong problem. Here are three prompt patterns worth internalizing.
The constraint-first pattern: state what must not change before describing what should change. This prevents Claude from refactoring things you did not ask it to touch.
Do not change the existing /webhook route or the Resend integration. Add a new POST route at /api/lead that accepts name, email, and source, validates that all three are present, and logs the payload to console. No database write yet.The show-me-first pattern: ask Claude to explain its plan before writing any code. Useful on complex tasks where a wrong assumption wastes ten minutes.
Before writing any code, explain in plain English how you would add rate limiting to the Express app. What package would you use, where would you add it, and are there any gotchas with the current middleware order?The specific-file pattern: tell it exactly which files are relevant instead of letting it scan everything. Faster and more precise on large projects.
Read only server.js and routes/webhook.js. The webhook is failing silently when the GHL payload is missing the contactId field. Find why the error is not being caught and add proper error handling.Keeping Sessions Focused and Costs Under Control
Claude Code loads context from your files every session. On large codebases, this context gets expensive fast. A few habits keep things efficient.
- Start a new session for each distinct task. Do not chain unrelated asks into one long session — the growing context window increases cost without improving output.
- Use /clear to reset context mid-session if a conversation is going off track. It is faster than starting over.
- Keep your CLAUDE.md tight. Every line Claude reads on startup costs tokens. Remove sections that are no longer accurate.
- Point Claude at specific files instead of asking it to explore freely. 'Read routes/lead.js' is cheaper and more accurate than 'look at the routes folder.'
- For repetitive tasks (like generating the same type of script repeatedly), write a template prompt in a text file and paste it at the start of each session. Consistency cuts back-and-forth.
When to Use Claude Code vs. When to Use Claude.ai
Claude.ai is the right tool when you need to draft, brainstorm, or get explanations. Claude Code is the right tool when the output needs to actually run.
If you are writing an email sequence, a funnel script, or a positioning document, use Claude.ai. If you are building a webhook handler, fixing a broken deploy script, or wiring two APIs together, use Claude Code. The distinction is: does the output need to execute on a machine? If yes, Claude Code.
The other scenario where Claude Code wins is any task where you need it to read your specific files. Claude.ai works from what you paste in. Claude Code works from what actually exists on disk. For debugging and refactoring, that difference is everything.
You do not need to be a developer to get value from Claude Code. If you can describe what you want in plain English and review a diff before approving it, you can use this tool. The skill it requires is clear thinking about what you want — which is a business skill, not a coding skill.