← Back to list

Learning to Claude Code

Up until now we have been using ChatGPT and Gemini to scratch our vibe-coding itch. But the future is agentic and a lot of folks swear by…

David Such in Embedded AI · 2026-02-21 22:10 · 42 claps · 6.4 min read
#vibe-coding #ai-agent #agentic-ai #embedded-systems #embedded-ai
Open on Medium ↗
Wiki topics: LLM · Large Language Models AGT · AI Agents EDU · Education & Learning 💻 · Programming

Learning to Claude Code

Up until now we have been using ChatGPT and Gemini to scratch our vibe-coding itch. But the future is agentic and a lot of folks swear by Claude so we thought we would give it a go and use the Anthropic Academy to learn how.

If you want to use Claude Code you are going to need at least a Pro account (i.e., pay Anthropic some money). There is an interesting tweet (what do we call them now?) by Boris Cherny about how he uses Claude Code. As its creator, his advice is credible. Boris runs five Claude’s in parallel in terminal and jumps between them as they spit out a result. He has another 5–10 Claude’s in the browser (http://claude.ai/code). We are going to start with a more modest single Claude and take it from there.

[embed]Embedded AI: Launch Updates and Early Access Sign up to receive launch updates for Embedded AI: Intelligence at the Edge, published by No Starch Press. You will be…embedded-ai.kit.com

Image created using Midjourney

Image created using Midjourney

In a departure from our usual approach (jump in and muddle through), we are going enrol in the Anthropic Academy and learn how to use the tool properly. This article will document our journey. Along the way we will note down the interesting bits so we don’t forget them.

Claude Code in Action

Our story begins on the Anthropic website. If you click on the Claude Code in Action course you will see that it consists of 15 lectures, 1 hour of video, and a quiz (Figure 1). At the end, assuming you pass, you are awarded a certificate of completion. With the install, setup, and documenting things here, it took a bit over 2 hours to complete.

Figure 1. The Claude Code in Action course

Figure 1. The Claude Code in Action course

On the same page, you can read all about the course content, learning objectives, and prerequisites. One of the prerequisites is access to Claude Code and an API key. Note that you need two accounts:

  1. The Claude.ai consumer account with a subscription (Free, Pro, Max, Team, or Enterprise plans). This is the account that you use to chat with Claude.
  2. An Anthropic Console developer account located at https://console.anthropic.com/. This is where you get the API key which is actually optional for completing the course. You can choose to use your own code base for the course exercises if you wish. If you want fancy GitHub integration you will need an API key.

After enrollment, you start by watching a series of short videos (Figure 2). If video isn’t your jam or if you want to review, all the content from the videos is repeated below.

Figure 2. Example of the short videos used in the course

Figure 2. Example of the short videos used in the course

The examples shown are very impressive, albeit with a strong web dev bias. Click on the Next button in the bottom right of the browser to progress. Alternately you can use the left hand Navigation panel.

Claude Code Setup

The instructions to setup Claude Code can be found at: https://code.claude.com/docs/en/quickstart

Figure 3. Installation is straight forward

Figure 3. Installation is straight forward

After installation, you will be able to run claude in the terminal. Before doing this, change to the directory where you want to operate. The first time you run the claude command you will be prompted to authenticate (Figure 4). Typing 1 in terminal will open a browser page.

Figure 4. Claude Code authentication

Figure 4. Claude Code authentication

Running Claude in a Project

The first time you use Claude in a project you run the /init command (Figure 5). This gives Claude an overview and context for your codebase. After analyzing the code, Claude creates a summary and writes it to the **CLAUDE.md file. In addition to this summary you can use the `CLAUDE.md`** file to provide specific instructions for Claude. This file gets included with every request you make and is like a persistent system prompt.

Figure 5. Running /init on a new project

Figure 5. Running /init on a new project

Custom Commands

Custom commands in Claude Code are Markdown files stored in ~/.claude/commands/ (user-level) or .claude/commands/ (project-level). To accept runtime parameters, you use the $ARGUMENTS placeholder in the Markdown file, which Claude Code replaces with whatever string is after the command.

For example, to create a command that reviews a specific file called **~/.claude/commands/review.md** :

Review the file at $ARGUMENTS for the following:

- Logic errors and edge cases
- Memory safety issues relevant to embedded or resource-constrained targets
- Naming consistency with the surrounding codebase
- Suggest improvements but do not modify the file

Invoke it in a Claude Code session with:

/review src/sensor_driver.cpp

In this example, Claude Code substitutes $ARGUMENTS with src/sensor_driver.cpp at runtime before processing the prompt. $ARGUMENTS captures everything typed after the command as a single string, so you can pass a filename, a module name, a free-form description, or multiple space-separated values and handle the parsing through the prompt wording.

Project-level commands at .claude/commands/ are visible only within that repo, while user-level commands at ~/.claude/commands/ are available everywhere. This mechanism is good for creating repeatable tasks, code review checklists, documentation generation, or test scaffolding.

GitHub Integration

We use GitHub Desktop to keep our repos in order, but early on in the Claude Code process, you are going to want to install and authenticate the CLI version. This is straightforward in macOS:

brew install gh

Then authenticate with:

gh auth login

This will walk you through a browser-based way to connect to your GitHub account. The CLI and Desktop app both talk to GitHub’s API/servers and they share nothing locally that would cause conflicts. It is common to use both Desktop for visual diffs, commit staging, and branch management, and the CLI (or Claude Code) for automation and terminal workflows.

After installing and authenticating the CLI you can run this command in Claude Code:

/install-github-app

This will generate a PR (Figure 6) which adds a GitHub Actions workflow that enables Claude Code integration in your repository. You can pick a particular repo or all of them when you do this. We are starting with just one while we get comfortable with Claude.

Figure 6. Claude Code generated PR to add GitHub support to a Repository

Figure 6. Claude Code generated PR to add GitHub support to a Repository

You have to merge this request before you can start using Claude Code in the repo.

Hooks

Hooks let you execute custom shell commands at defined points in the Claude Code lifecycle. Hooks fire at four stages: PreToolUse, PostToolUse, Notification, and Stop, giving you control over what happens before and after Claude touches your code, runs a command, or completes a session.

For example, here’s a hook that logs every file Claude writes to a local file, which you can use for auditing what the agent modified during a session.

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Write",
        "hooks": [
          {
            "type": "command",
            "command": "echo \"$(date '+%Y-%m-%d %H:%M:%S') - Written: $CLAUDE_TOOL_INPUT_PATH\" >> ~/claude_audit.log"
          }
        ]
      }
    ]
  }
}

Every time Claude writes a file, the path and timestamp are appended to claude_audit.log. The environment variable CLAUDE_TOOL_INPUT_PATH is injected automatically by Claude Code and contains the path of the file being written.

You can save the hook in **~/.claude/settings.json** which is the user-level Claude Code configuration file. It lives in your home directory under a hidden .claude folder and applies globally across all projects. Any hooks defined there fire regardless of which repository or directory you're working in.

Claude Code also has a project-level settings file at .claude/settings.json within a specific repo, which only applies when working in that project. If both exist, project-level settings take precedence.

The Quiz

There are 8 mutiple-choice questions based on the content in the previous course. If you have been paying attention you should have no problem passing. It will only take a couple of minutes.

Conclusion

It is worth taking a couple of hours to go through the course content. Based on this you will be much better prepared to start applying it to your own projects.

If like Boris, you want to use the Opus model, start with:

claude --model claude-opus-4-5

Or switch mid-session with /model claude-opus-4–5. To set it persistently so every session uses Opus without specifying it each time:

claude config set model claude-opus-4-5

Remember that Opus is significantly more expensive per token than Sonnet!

My first book, Embedded AI, is coming later this year from No Starch Press, covering 25 hands-on hardware projects deploying machine learning on microcontrollers. Sign up for launch updates and bonus material! To support my writing here, please show your appreciation by following me, or subscribe to get an email whenever I publish a new article.

[embed]What the F-35 can Teach us about Writing Safer Embedded C++ Performance can be optimized later. Reliability must be designed in from the start.levelup.gitconnected.com


메타데이터
post_id
9ca159b7fa2b
slug
learning-to-claude-code-9ca159b7fa2b
url
https://medium.com/embedded-ai/learning-to-claude-code-9ca159b7fa2b
canonical_url
https://medium.com/embedded-ai/learning-to-claude-code-9ca159b7fa2b
author_url
https://medium.com/@reefwing
status
ok
fetched_at
2026-06-11 05:11:55