# Claude Code Foundation

Welcome everyone to the first module. I'm going to show you how to set up Claude Code, explain the differences between the different products Claude offers, and cover some complementary tools that will boost your productivity. We'll also set up Cursor and run Claude Code inside it.

There are three ways of running Claude Code. The first one, which I'll cover in the advanced section, is running it in terminal. Terminal is a text-based interface that developers use a lot for talking to the computer. You can chat there, similar to a chat window, and get things done with Claude Code. I'm not going to explain that setup right now.

The two other ways: first, installing Cursor, which is going to be the main focus for this module. Based on my evaluation, it's the best way to run Claude Code for our use case. The second is using the Claude desktop app. I'm using Mac, but Windows and Linux have their own apps as well.

Let's create an account. I already have one, so I'll log in. Go to the Claude website and create an account with your Gmail login.

The environment you're seeing on the web is Claude chat. In this view you don't have access to Claude Cowork or Claude Code, which are different products available in the app. Claude chat is exactly like ChatGPT — you ask something and Claude responds based on some information. You can still upload files and PDFs or build projects similar to ChatGPT. But this is the most basic way of using LLMs. It's mostly in chat mode, not in the territory of taking actions and agents.

I went ahead and downloaded the Claude app. Let me open it.

So it brings us directly to Claude chat. As you can see at the top, this is Claude Chat — I already explained it. Then you have Claude Cowork, which is an abstracted version of Claude Code. I don't personally recommend it because Claude Code gives you much more flexibility and power over all the capabilities of the tool. Claude Cowork has stripped away a lot of those capabilities and made a version with an easier interface, but it falls short quickly once you go into action and actually do projects. You really want full control over it, and Claude Cowork doesn't provide that.

When you go to the code tab, you see this interface. We'll use it in a different context — I'm going to load this in Cursor and explain why later.

Basically, you run Claude Code in a folder. So let's say I have a folder called demo in my documents. If I want to run Claude Code, I always need to pick a folder because it runs inside the folder — it's project-based. I open the folder and now I can give it tasks. I'm not going to do this now because I want to show you this in Cursor. Just know that here is where you write the prompts and it takes the actions.

---

Let me open Cursor. First, I'll show you where to download it.

Cursor is a tool for developers in which they use agents to write code. The interface might be a bit intimidating because it's text-heavy and has a lot of things we're not going to use, but I'll show you how to minimize it so you can focus on the capabilities we need. Go ahead, download it, create an account, and let's open it up.

This is the Cursor interface. It shows the files inside a folder. Our folder is empty right now so you won't see anything. Let me create a demo text file, write something, and save it. This is where you can preview the file. I can delete it from here, and it's gone from Cursor as well.

Here is the interface for using Cursor's own agents. I'm not going to explain it in detail because we're not going to use Cursor agents. The mechanics of how they work are exactly like Claude Code, but through experience I realized Claude Code is way more powerful. The models are much better. When you use Anthropic models — Sonnet, Opus — in Cursor with Cursor agents, they cost more than if you run Claude Code directly. That's why I decided to run Claude Code inside Cursor instead.

So here you need to go to the marketplace and search for "claude." Install the Claude Code extension for VS Code. Trust and install.

---

There's a bit of terminal use at the very beginning when setting up. Let me show you. In Cursor, you open the terminal with Command+J.

For the first time setting up, Claude Code may not yet be installed on your machine. You'll see a red error. Click "add to chat" — it adds that error line into the Cursor chat, and you ask it to solve the problem and install Claude Code. Allow whatever commands it asks to run behind the scenes.

Once installation is confirmed, run `claude` in the terminal. If you get a "command not found" error, add Claude to your path by running the command the agent gives you. Open a new terminal session and try again. Now you can choose your theme using the arrow keys. I like dark mode.

Then it asks you to connect to your Anthropic account. Select the first option: Claude account with subscription. You'll need a paid subscription for this.

---

Let me open Claude pricing and explain how it works.

You'll most likely start with the $15/month plan billed annually, or roughly $20 on monthly billing. There are higher tiers if your usage grows. Here's what matters for usage: in your account settings under the Usage section, you'll see a session usage bar that resets every four or five hours, and a weekly usage bar. As you use the product, these bars fill up. When the session limit is hit, you wait for the next reset. When the weekly limit is hit, you wait for the weekly reset. The bar fills faster on the lower-tier plan than on the higher-tier plan.

On cost optimization: different models have different costs. Opus is the smartest and most expensive model. Sonnet 4.6 is less expensive and extremely good for most use cases. Haiku is cheap but I rarely use it — only for very simple things.

There are also two separate cost components for each model: input (what goes into the model) and output (what the model generates). Generating text is more expensive than consuming information. So my approach is: use Opus for loading files and building a plan, then switch to Sonnet 4.6 to execute the plan, since execution involves more text generation. I'll cover context and cost optimization in more depth later in the course.

---

Now back to where we left off. I've authenticated and clicked continue. It asks whether you trust this folder and want Claude to have access. Say yes. Claude is now running in the demo folder and has access to everything inside it.

We're not going to interact with Claude in the terminal. In Cursor, open any file, right-click, and select "Claude Code: Open." This opens the Claude Code panel on the right side. Close the terminal. Now you can also delete any test files we don't need.

This is the Claude Code extension inside Cursor, and this is where we'll be using Claude Code. The reason I chose this setup: first, you can see all the files the agent is working on. The file structure is visible in the left sidebar, and you can preview file contents. When interacting in terminal only, you can't easily see or preview your files.

There's also a planning feature — when Claude writes a plan, you can give feedback by highlighting sections and adding comments. This is a very useful feature not available in terminal. You can also easily drop images and files into the chat, which again isn't available in terminal. And you have access to important commands that are available in terminal but also exposed here in the extension. These commands are not available in the Claude desktop app, which is another reason I'm not a fan of that approach.

---

Now let me explain what markdown files are. Markdown is a file with the `.md` extension. It's a structured text file. The difference from a `.txt` file is that markdown supports structure: headings, sub-headings, lists, bold text, emojis. Many of you have probably used Notion or Confluence — these wikis use markdown behind the scenes. It gives LLMs structure to understand the content and its hierarchy.

Let me show you an example from my notes app, Obsidian. Here's a Japan trip file. You can see titles, second headings, list items — that's markdown in action.

Markdown is the bread and butter for LLM work. Everything we do in non-coding use cases is going to be based on markdown files.

---

Now let me explain the different modes in Claude Code.

**Ask mode** is like chat. Claude won't edit your files — you just have a conversation and it replies back. For example: "I'm thinking of writing a short trip plan to Brazil. What should I consider?" It responds in the chat, doesn't touch any files. You can reply back. This is exactly the chat experience.

**Edit mode** is where Claude will edit your files. You can use `@` to mention files. So I'd bring in the file and say "Write this plan on this file." It goes ahead and writes the plan to the file. When I open the file, I can see the markdown preview — the structured rendered view — or the raw markdown source. The file is updated.

**Plan mode** is one I'll use extensively in the course. When you give Claude a task in plan mode, it first produces a plan with steps, budget, and deliverables. It shows what files it used as a source. You can highlight any part of the plan and add a comment — say "remove this section" or "add another section" — then click "No, keep planning." Claude takes the feedback and revises the plan. You can do this as many times as needed. Once you're happy, you click "Yes" and auto-accept and it starts executing.

It's really good to stay in plan mode for complex tasks. Plan mode does extra thinking and goes through multiple files. It usually produces much better output than direct mode, where Claude just goes and takes action without much thinking upfront.

---

Another thing about the interface: you can select a specific line or section in a file and it gets added to the LLM's context. So if I select a line and switch to edit mode (shortcut: Shift+Tab) and say "remove this line," Claude knows exactly what line I'm talking about. Useful for targeted edits.

**Effort** controls how many tokens are used per task. For complicated tasks, set it to high. For most things, medium is fine. My usual pattern: complex planning tasks use Opus at high effort, then I execute with Sonnet at medium effort.

**Model switching**: use the `/model` command to switch models between Sonnet, Opus, and Haiku. You can also use `/effort` instead of clicking the UI control. I keep it at medium and stay on Sonnet as the default.

---

One more thing before moving to the next module: one of the most empowering ways to use these agents is voice input instead of typing. When you talk, you naturally give more context and more nuance — it's as if you're talking to a human. More context means better results.

The tool I use for audio-to-text is called Aqua Voice. There are others — Whisper, Whisper Flow, Super Whisper — but I really like Aqua Voice. It's accurate, fast, and minimal. One key advantage: it reads screen context, so it correctly picks up names and specific terms visible on screen, including file names in Cursor.

I went ahead and finished the Aqua Voice onboarding. I can activate it with a shortcut, say something, and it gets automatically pasted into the Cursor chat — including the correct `@filename` references.

For example, I said: "I want you to make the test.md much shorter. Also take out São Paulo and add some islands or coastal towns that are more of a hidden gem to the plan than the main tourist destinations." Aqua Voice transcribed everything perfectly including the `@test.md` mention. I clicked enter and it went and updated the file.

With that, I'll close this module. See you in the next one where we'll set up the Claude Code configuration to get the most out of the tool.
