Get Started with Claude Code

Set up Claude Code and use it as an AI pair programmer on a real project.

Introduction

30 Second Summary

Imagine having a coding partner who can read your entire project, answer questions about it in plain English, and make changes for you. That's what AI-powered coding assistants offer.

In this project, you will install Claude Code and use it to explore a Python project, find and fix a bug, implement a new feature, and manage your code with Git.

What You'll Build

You'll set up Claude Code on your machine and use it to work through a complete development workflow on a small Python calculator project.

By the end of this project, you'll have:

  • A fully configured Claude Code environment ready to use on any project.
  • A working Python project that you navigated, debugged, and enhanced using natural language conversations with Claude Code.
  • A CLAUDE.md file that gives Claude persistent memory of your project's conventions across sessions.
  • Secret Mission: Create a custom skill that automates a repetitive workflow in your project.

Are there any prerequisites?

You need basic familiarity with code in any language. No prior experience with Claude Code or AI coding tools is required.

Claude Code requires a Claude Pro ($20/month), Max ($100-$200/month), or Team plan subscription. The free Claude plan does not include Claude Code access.

Install Claude Code and Git

Claude Code is a command-line tool that lives in your terminal. To use it, you need two things installed: Claude Code itself and Git (so Claude Code can track your project history and make commits).

In this step, you'll install both tools on your Windows machine and connect Claude Code to your Anthropic account.

In this step, get ready to:
  • Install Git for Windows.
  • Install Claude Code.
  • Authenticate with your Claude account.
Install Git for Windows

Git for Windows gives Claude Code access to the Bash shell tool, which it prefers for running commands. Without it, Claude Code falls back to PowerShell only.

  • Press the Windows key to open your search bar.
  • Type PowerShell and press Enter to open it.
  • Check if Git is already installed by running this command:
git --version

✔️ I see a version number

Git is already installed on your machine. You're ready to move on to the next substep.

ⓧ Command not found

Git is not installed yet. Follow these steps to install it:

What should I select during installation?

The Git for Windows installer shows many options. Accept the defaults for every screen by clicking Next until the installation completes. The defaults are well-suited for this project.

  • Once the installer finishes, close and reopen PowerShell (this ensures your PATH updates).
  • Run the version check again:
git --version

You should now see a version number printed in the terminal.

Why does Claude Code need Git?

Git for Windows includes Git Bash, which gives Claude Code access to the Bash shell tool. This lets Claude run familiar Unix-style commands when working on your project.

If Git for Windows is not installed, Claude Code uses PowerShell as its shell tool instead.

Install Claude Code

Claude Code uses a native PowerShell installer that downloads the tool and sets it up to auto-update in the background.

  • In PowerShell, install Claude Code by running this command:
irm https://claude.ai/install.ps1 | iex

What does this command do?

irm (short for Invoke-RestMethod) downloads the installer script from Anthropic's servers. The pipe (|) sends it to iex (short for Invoke-Expression), which runs the script to install Claude Code on your machine.

  • Once the installation finishes, verify it worked by running:
claude --version

✔️ I see a version number

Claude Code is installed and ready. You're all set for the next substep.

ⓧ Command not found

The command was not recognized. Try these fixes:

  • Close PowerShell completely and reopen it. The installer may have updated your PATH, which requires a new terminal session to take effect.
  • Run claude --version again in the fresh window.
  • If it still does not work, re-run the install command above and check for error messages in the output.

Still not working?

Make sure you are running PowerShell as a regular user (not as Administrator). Also confirm your system meets the minimum requirements: Windows 10 or later.

help me troubleshoot the Claude Code installation on Windows

Authenticate with your Claude account

Subscription required

Claude Code requires a Pro ($20/month), Max ($100-$200/month), or Team plan. The free Claude plan does not include Claude Code access.

  • Start Claude Code by running:
claude

What happens next?

Running claude for the first time opens your default browser to an Anthropic login page. You'll sign in with the account that has your Pro, Max, or Team subscription.

  • When your browser opens, sign in with the account that has your Claude Pro, Max, or Team subscription.
  • After signing in, return to your PowerShell window.

You should see the Claude Code welcome screen in your terminal. This is an interactive prompt where you can type natural language requests.

Browser did not open?

If the browser does not open automatically, look for a URL printed in the terminal output. Copy and paste it into your browser manually.

If you accidentally closed the session, run claude again and use the /login command to re-authenticate.

help me authenticate Claude Code on Windows

Your tools are installed and authenticated. Next up, you'll create a starter Python project and let Claude Code explore it for you.

Create a Starter Project and Explore It

Your tools are installed and Claude Code is ready to go. Now you need a project for Claude to work with.

In this step, you'll create a small Python calculator project with an intentional bug hidden inside it. Then you'll launch Claude Code and watch it explore, understand, and fix your code using plain English conversations.

In this step, get ready to:
  • Create a Python project with a hidden bug for Claude to find.
  • Start Claude Code and explore the codebase through conversation.
  • Have Claude identify and fix the bug for you.
Set up a small Python project to work with

You'll create a folder with two files: a Python calculator module and a README. The calculator has four functions, but one of them has a sneaky bug that Claude will find later.

  • Move to your Desktop by running this command:
cd ~/Desktop
  • Create your project folder, move into it, and initialize a Git repository by running these commands:
mkdir claude-code-playground
cd claude-code-playground
git init

You should see a message that says Initialized empty Git repository followed by a path ending in .git/.

Seeing 'git' is not recognized?

This means Git for Windows wasn't installed correctly in Step 1. Go back and verify git --version works in PowerShell before continuing.

Help me troubleshoot why git isn't recognized in PowerShell

Now you'll create the calculator file. This file contains four arithmetic functions, but the divide function has an intentional bug that returns multiplication instead of division.

  • Open calculator.py in Notepad by running this command:
notepad calculator.py

Notepad asks about a new file?

Since calculator.py doesn't exist yet, Notepad will ask if you want to create a new file. Click Yes to confirm.

  • Paste the following code into Notepad:
def add(a, b):
    """Add two numbers."""
    return a + b


def subtract(a, b):
    """Subtract b from a."""
    return a - b


def multiply(a, b):
    """Multiply two numbers."""
    return a * b


def divide(a, b):
    """Divide a by b."""
    if b == 0:
        raise ValueError("Cannot divide by zero")
    return a * b  # Bug: should be a / b

What does this code do?

This module defines four arithmetic functions: add, subtract, multiply, and divide.

The divide function has an intentional bug on its last line. It returns a * b (multiplication) instead of a / b (division). Claude Code will find this for you shortly.

  • Save the file by pressing Ctrl+S.
  • Close Notepad.

Next, you'll create a README that documents the project.

  • Open README.md in Notepad by running this command:
notepad README.md
  • Click Yes when Notepad asks to create the new file.
  • Paste the following content into Notepad:
# Calculator

A simple Python calculator with basic arithmetic operations.

## Functions

- `add(a, b)` - Add two numbers
- `subtract(a, b)` - Subtract b from a
- `multiply(a, b)` - Multiply two numbers
- `divide(a, b)` - Divide a by b

## Usage

```python
from calculator import add, subtract, multiply, divide

result = add(2, 3)  # Returns 5
```
  • Save the file by pressing Ctrl+S.
  • Close Notepad.
  • Confirm your files exist by running:
ls

You should see calculator.py and README.md listed in the output.

Don't see both files?

Make sure you saved each file in Notepad before closing. If a file is missing, run the notepad command again for that filename and re-paste the content.

Also confirm you're still inside the claude-code-playground folder. Run pwd to check your current location.

Help me figure out why my project files aren't showing up

Start Claude Code and explore the codebase

Now that your project has files, you can launch Claude Code and let it explore. Claude reads your files automatically when you ask about them.

  • Start a Claude Code session by running:
claude

You should see the Claude Code interactive prompt appear, ready for your questions.

What is this prompt?

Claude Code runs as an interactive session inside your terminal. You type natural language questions or instructions, and Claude responds by reading your files, analyzing code, and suggesting or making changes.

  • Ask Claude about your project by typing this prompt and pressing Enter:
what does this project do?

Claude will read your files and give you a summary of the calculator project. Notice that you didn't need to tell Claude which files to look at.

  • Ask Claude to explain the code in detail by typing:
explain the calculator.py file and how each function works

Claude walks through each function, explaining what it does and how it works.

How does Claude know which files to read?

Claude Code automatically identifies which files are relevant to your question. When you ask about the project, it reads your directory listing and file contents without you needing to specify paths.

You'll see Claude request permission to read files. Approve these requests so Claude can access your code.

Use Claude to find the bug

Your calculator has a hidden bug in the divide function. Instead of spotting it yourself, let Claude do the detective work.

  • Ask Claude to analyze your code for bugs by typing:
are there any bugs in calculator.py?

Claude will analyze the code and identify that the divide function returns a * b instead of a / b. It will propose a fix.

  • When Claude asks for permission to edit calculator.py, approve the change.

What is Claude's permission model?

Claude Code always asks for permission before modifying files. You can approve individual changes or enable an "Accept all" mode for a session. For now, approve each change individually so you can review what Claude does.

  • Verify the fix by asking Claude:
show me the divide function now

The divide function should now return a / b instead of a * b.

Claude didn't suggest a fix?

If Claude only described the bug without offering to fix it, ask directly: "fix the bug in the divide function" and approve the file edit when prompted.

Help me get Claude Code to fix the bug in my calculator

✔️ Awesome, I've got everything!

Great. Double check that your calculator.py now has return a / b in the divide function.

ⓧ I'd like to double check the full code

After Claude's fix, your calculator.py should look like this:

def add(a, b):
    """Add two numbers."""
    return a + b


def subtract(a, b):
    """Subtract b from a."""
    return a - b


def multiply(a, b):
    """Multiply two numbers."""
    return a * b


def divide(a, b):
    """Divide a by b."""
    if b == 0:
        raise ValueError("Cannot divide by zero")
    return a / b

Your README.md should look like this:

# Calculator

A simple Python calculator with basic arithmetic operations.

## Functions

- `add(a, b)` - Add two numbers
- `subtract(a, b)` - Subtract b from a
- `multiply(a, b)` - Multiply two numbers
- `divide(a, b)` - Divide a by b

## Usage

```python
from calculator import add, subtract, multiply, divide

result = add(2, 3)  # Returns 5
```

You just experienced Claude Code's core loop: ask a question, let it read your code, review its suggestion, and approve the change. Next up, you'll have Claude implement a brand new feature and run tests on it.

Make Claude Implement a Feature

In the previous step, you asked Claude to explore your codebase and find a bug. Claude identified the issue and fixed it for you.

Now you'll take things further. In this step, you'll ask Claude to implement a brand-new feature, create tests to verify everything works, and commit your changes using Git through conversational commands.

In this step, get ready to:
  • Add a power/exponent function using Claude Code.
  • Create and run a test script through Claude.
  • Make your first Git commit using Claude Code.
Ask Claude to add a new feature

One of Claude Code's strengths is handling multi-file changes from a single request. You can ask it to add a feature and update documentation at the same time.

  • In your Claude Code session, type the following prompt and press Enter:
add a power/exponent function to the calculator and update the README to document it

Claude will find the appropriate files, show you the proposed changes, and ask for your approval before making any edits.

  • Review the changes Claude proposes to calculator.py and README.md.
  • Approve the changes when prompted.

How does Claude Code's permission system work?

Claude Code always asks for permission before modifying files. It shows you the proposed changes first, then waits for your approval before making any edits.

You can approve individual changes one by one, or press Shift+Tab to cycle through permission modes. This keeps you in control of what Claude changes in your project.

After approving, Claude will add a power function to calculator.py and add documentation for it in README.md.

Claude's output looks different from what you expected?

Claude may generate slightly different code than the examples shown later in this step. That's normal. As long as the function calculates exponents correctly (e.g., power(2, 3) returns 8), you're on track.

If Claude adds extra features you didn't ask for, you can reject those specific changes and tell Claude to keep it simple.

Why didn't Claude add the function I expected?

Test the implementation

A new feature isn't complete without tests. You can ask Claude to both create and run a test script in a single request.

  • In your Claude Code session, type the following prompt and press Enter:
create a simple test script that verifies all calculator functions work correctly, then run it

Claude will create a test_calculator.py file with tests for every function, then execute it to verify everything passes.

  • Approve when Claude asks permission to create the test file.
  • Approve when Claude asks permission to run the script.

What happens if a test fails?

If any tests fail, Claude will automatically identify the issue, explain what went wrong, and fix it. You'll see this self-correcting behavior in real time. Just approve the fix when prompted.

You should see output ending with something like "All tests passed!" in your terminal.

✔️ Awesome, I've got everything!

Great. Double check you have three files in your project: calculator.py, README.md, and test_calculator.py.

ⓧ I'd like to double check the full code

Your files should look similar to the code below. Claude may generate slightly different implementations, but the core functionality should match.

calculator.py:

def add(a, b):
    """Add two numbers."""
    return a + b


def subtract(a, b):
    """Subtract b from a."""
    return a - b


def multiply(a, b):
    """Multiply two numbers."""
    return a * b


def divide(a, b):
    """Divide a by b."""
    if b == 0:
        raise ValueError("Cannot divide by zero")
    return a / b


def power(a, b):
    """Raise a to the power of b."""
    return a ** b

test_calculator.py:

from calculator import add, subtract, multiply, divide, power


def test_add():
    assert add(2, 3) == 5
    assert add(-1, 1) == 0


def test_subtract():
    assert subtract(5, 3) == 2


def test_multiply():
    assert multiply(3, 4) == 12


def test_divide():
    assert divide(10, 2) == 5.0
    try:
        divide(1, 0)
        assert False
    except ValueError:
        pass


def test_power():
    assert power(2, 3) == 8
    assert power(5, 0) == 1


if __name__ == "__main__":
    test_add()
    test_subtract()
    test_multiply()
    test_divide()
    test_power()
    print("All tests passed!")

README.md:

# Calculator

A simple Python calculator with basic arithmetic operations.

## Functions

- `add(a, b)` - Add two numbers
- `subtract(a, b)` - Subtract b from a
- `multiply(a, b)` - Multiply two numbers
- `divide(a, b)` - Divide a by b
- `power(a, b)` - Raise a to the power of b

## Usage

```python
from calculator import add, subtract, multiply, divide, power

result = add(2, 3)  # Returns 5
result = power(2, 3)  # Returns 8
```
Use Git through Claude Code

You can manage your entire Git workflow through natural language. Claude will stage files, write commit messages, and run Git commands for you.

  • Ask Claude to commit your work by typing this prompt:
commit all my changes with a descriptive commit message
  • Approve when Claude asks permission to run the Git commands.

Claude will stage all your files and create a commit with an appropriate message describing the bug fix, new power function, and test script.

  • Verify the commit by typing this prompt:
show me the git log

You should see at least one commit in the log with a descriptive message.

Why use Git through Claude Code?

Claude writes commit messages that describe what actually changed in your code. Instead of writing vague messages like "updated files", Claude reads the diff and summarizes the meaningful changes.

You can still use Git commands directly in your terminal anytime. Claude Code is an option, not a requirement.

Seeing a Git error?

If Claude reports that Git needs your name and email configured, ask Claude: "configure git with the name Test User and email test@example.com". This sets up the identity Git needs to create commits.

If Claude says there's nothing to commit, the changes may have already been committed. Ask Claude to show the git log to confirm.

Help me fix a Git error in Claude Code.

You just experienced the full development cycle with Claude Code: implementing a feature, testing it, and committing it. Next up, you'll set up project memory so Claude remembers your conventions across sessions.

Set Up CLAUDE.md for Project Memory

Every time you start a new Claude Code session, Claude begins with a blank slate. It doesn't remember what you discussed yesterday or the conventions you agreed on last week.

A CLAUDE.md file solves this. It lives in your project root, and Claude automatically reads it at the start of every session. Think of it as a briefing document that gets Claude up to speed instantly.

In this step, get ready to:
  • Create a CLAUDE.md file that gives Claude persistent project context.
  • Test that Claude remembers your conventions across sessions.
  • Learn session management commands for continuing, resuming, and clearing conversations.
Create a CLAUDE.md file for your project

CLAUDE.md is a Markdown file that Claude Code loads into its context window at the start of every session. It's the perfect place to store build commands, coding conventions, and project structure.

  • In your active Claude Code session, ask Claude to create the file by typing this prompt:
create a CLAUDE.md file for this project that includes our coding conventions, the project structure, and how to run tests
  • Claude will ask for permission before creating the file. Approve the change.
  • Review what Claude generates. It should include build/test commands, coding conventions, and a project layout section.

What should CLAUDE.md include?

A good CLAUDE.md covers three things: how to build and test the project, what coding conventions to follow, and what the file structure looks like.

Keep it concise. Anthropic recommends targeting under 200 lines per file. Every line stays in Claude's context across turns, so brevity keeps responses fast and focused.

  • Confirm the CLAUDE.md file exists by asking Claude: show me the contents of CLAUDE.md

Claude didn't create the file?

Make sure you approved the file creation when Claude asked for permission. If you accidentally declined, ask Claude to try again.

Help me create CLAUDE.md for my project.

✔️ Awesome, I've got everything!

Great. Double check you're happy with the contents of your CLAUDE.md before moving on.

ⓧ I'd like to double check the full code

Here's what your CLAUDE.md should look like. Claude's output may vary slightly in wording, but it should cover the same sections:

# Project: Calculator

## Build & Test Commands
- Run tests: `python test_calculator.py`
- No build step required (pure Python)

## Coding Conventions
- Use class-based design for modules
- All public methods must have docstrings
- Include input validation with descriptive error messages
- Use type checking with isinstance for numeric inputs
- Raise ValueError for invalid operations, TypeError for invalid types

## Project Structure
- `calculator.py` - Main calculator class
- `test_calculator.py` - Test suite
- `README.md` - Documentation
- `CLAUDE.md` - Project instructions for Claude Code
Test the memory by starting a fresh session

The real test of CLAUDE.md is whether Claude actually uses it. Let's end your current session and start a new one to see if Claude picks up the project context automatically.

  • End your current Claude Code session by typing exit or pressing Ctrl+C.
  • Start a fresh session by running this command:
claude
  • Once the session starts, ask Claude about your project conventions by typing this prompt:
what are the conventions for this project?
  • Claude should reference your CLAUDE.md content in its answer. You'll see it mention docstrings, input validation, class-based design, or other conventions you stored.

How does Claude know about CLAUDE.md?

Claude Code automatically looks for a CLAUDE.md file (or .claude/CLAUDE.md) in your project root. It loads this file into the context window at the start of every session without you needing to reference it.

Claude doesn't mention your conventions?

Make sure you're running claude from inside the claude-code-playground directory where CLAUDE.md lives.

Claude isn't reading my CLAUDE.md file.

Learn essential session management

Claude Code has a few commands that help you manage conversations. These save time when you need to pick up where you left off or start fresh.

  • End your current session by typing exit or pressing Ctrl+C.
  • Continue your most recent conversation by running this command:
claude -c
  • You should see your previous conversation history loaded. Claude remembers exactly where you left off.
  • View all available commands by typing /help inside the session.
  • Reset the conversation to start fresh by typing /clear. This wipes the current conversation without ending the session.

What's the difference between these commands?

  • claude -c continues your most recent conversation in the current directory. Use it when you step away and come back.
  • /clear resets the conversation history inside an active session. Use it when you want a fresh start without exiting.
  • /help shows all available slash commands and keyboard shortcuts.

Keyboard shortcuts inside Claude Code

Type / to see all commands and skills. Press Tab for autocompletion and the up arrow for command history.

You now have persistent project memory and the session management skills to work efficiently across multiple coding sessions. Next up, you'll put everything together in a real development workflow.

Practice Real Development Workflows

Your project now has persistent memory through CLAUDE.md. Claude knows your project's conventions, structure, and how to run tests before you even ask.

In a real development workflow, you don't just ask an AI to write new code. You also ask it to improve existing code. In this step, you'll use Claude Code the way experienced developers do: requesting a refactor, reviewing a plan before Claude touches anything, and then having Claude implement the changes.

In this step, get ready to:
  • Refactor your calculator from standalone functions to a class-based design.
  • Use the "plan then execute" workflow to add input validation.
  • Commit your changes and get a full session summary from Claude.
Use Claude for a refactoring task

Refactoring means restructuring existing code without changing what it does. Your calculator currently uses standalone functions, but a class-based design groups related functionality together and makes it easier to add shared behavior (like input validation) later.

  • In your Claude Code session, type this prompt:
refactor calculator.py to use a class-based design instead of standalone functions

What happens when you send this?

Claude will read your current calculator.py, propose converting the standalone functions into methods on a Calculator class, and ask for your permission before making any file changes.

Claude Code always asks for permission before modifying files. You can approve individual changes or enable "Accept all" mode for a session.

  • Review the changes Claude proposes. It should wrap all functions inside a Calculator class and add self as the first parameter to each method.
  • Approve Claude's changes when prompted.

Claude will also update test_calculator.py to import and use the new Calculator class. If it doesn't do this automatically, ask it to update the tests next.

Claude didn't update the tests?

If Claude only refactored calculator.py but left test_calculator.py unchanged, type: update the tests to use the new Calculator class and run them. Claude will fix the imports and adjust each test function to instantiate a Calculator object.

Help me get Claude to refactor my tests

Experience the "plan before editing" workflow

Sometimes you want to see Claude's approach before it starts editing files. This is especially useful for larger changes where you want to sanity-check the direction first.

  • Ask Claude to plan the next change without implementing it by typing this prompt:
I want to add input validation to all methods. What's your plan? Don't make changes yet.

Why ask for a plan first?

When you say "Don't make changes yet", Claude outlines its approach without touching any files. This gives you a chance to redirect before any code is written.

For small changes this might feel like overkill. For larger refactors across multiple files, reviewing a plan first saves you from having to undo unwanted changes.

  • Read through Claude's proposed plan. It should describe adding a _validate_numbers method that checks inputs with isinstance and raises TypeError for non-numeric values.
  • Once you're satisfied with the plan, tell Claude to go ahead by typing:
go ahead and implement it
  • Approve the file changes when Claude asks for permission.

Claude will add the _validate_numbers method and call it at the start of every public method. It should also add a test_validation function to your test file and run the tests to confirm everything passes.

What should the validation look like?

The _validate_numbers method checks that both inputs are int or float. If not, it raises a TypeError with a message like "Expected a number, got str". This protects every calculator operation from invalid input in one place.

Tests failing after the validation changes?

If tests fail, ask Claude: the tests are failing, can you fix them and run them again?. Claude will read the error output, identify the issue, and fix it.

Help me fix my failing tests after adding validation

Commit and wrap up

Your calculator is now fully refactored with a class-based design and input validation. Time to save this progress to Git and see everything you accomplished.

  • Ask Claude to commit and summarize your session by typing this prompt:
commit these changes and show me a summary of everything we did today

Claude will stage all modified files, write a descriptive commit message, and then give you a recap of every modification made during the session.

What should the summary include?

Claude's summary should mention the refactor from standalone functions to a Calculator class, the addition of _validate_numbers with TypeError handling, and the updated test suite. This recap is useful for picking up where you left off in a future session.

  • Verify the commit landed by asking Claude:
show me the git log

You should see multiple commits in the log, including the one Claude just made for the refactor and validation changes.

Claude says there's nothing to commit?

This means Claude already committed the changes in a previous prompt. Check with show me the git log to confirm the commit exists. If the refactor and validation changes are already committed, you're good to go.

Help me check if my changes were committed

✔️ Awesome, I've got everything!

Great. Double check you've got commits in your git log and all tests are passing.

ⓧ I'd like to double check the full code

Here's what each file should look like after this step. Since Claude generates the code, yours may differ slightly in formatting or comments, but the structure and logic should match.

class Calculator:
    """A calculator with basic arithmetic operations and input validation."""

    def add(self, a, b):
        """Add two numbers."""
        self._validate_numbers(a, b)
        return a + b

    def subtract(self, a, b):
        """Subtract b from a."""
        self._validate_numbers(a, b)
        return a - b

    def multiply(self, a, b):
        """Multiply two numbers."""
        self._validate_numbers(a, b)
        return a * b

    def divide(self, a, b):
        """Divide a by b."""
        self._validate_numbers(a, b)
        if b == 0:
            raise ValueError("Cannot divide by zero")
        return a / b

    def power(self, a, b):
        """Raise a to the power of b."""
        self._validate_numbers(a, b)
        return a ** b

    def _validate_numbers(self, a, b):
        """Validate that inputs are numbers."""
        if not isinstance(a, (int, float)):
            raise TypeError(f"Expected a number, got {type(a).__name__}")
        if not isinstance(b, (int, float)):
            raise TypeError(f"Expected a number, got {type(b).__name__}")
from calculator import Calculator


def test_add():
    calc = Calculator()
    assert calc.add(2, 3) == 5
    assert calc.add(-1, 1) == 0
    assert calc.add(0, 0) == 0


def test_subtract():
    calc = Calculator()
    assert calc.subtract(5, 3) == 2
    assert calc.subtract(0, 5) == -5


def test_multiply():
    calc = Calculator()
    assert calc.multiply(3, 4) == 12
    assert calc.multiply(-2, 3) == -6
    assert calc.multiply(0, 100) == 0


def test_divide():
    calc = Calculator()
    assert calc.divide(10, 2) == 5.0
    assert calc.divide(7, 2) == 3.5
    try:
        calc.divide(1, 0)
        assert False, "Should have raised ValueError"
    except ValueError:
        pass


def test_power():
    calc = Calculator()
    assert calc.power(2, 3) == 8
    assert calc.power(5, 0) == 1
    assert calc.power(3, 2) == 9


def test_validation():
    calc = Calculator()
    try:
        calc.add("hello", 5)
        assert False, "Should have raised TypeError"
    except TypeError:
        pass


if __name__ == "__main__":
    test_add()
    test_subtract()
    test_multiply()
    test_divide()
    test_power()
    test_validation()
    print("All tests passed!")
# Project: Calculator

## Build & Test Commands
- Run tests: `python test_calculator.py`
- No build step required (pure Python)

## Coding Conventions
- Use class-based design for modules
- All public methods must have docstrings
- Include input validation with descriptive error messages
- Use type checking with isinstance for numeric inputs
- Raise ValueError for invalid operations, TypeError for invalid types

## Project Structure
- `calculator.py` - Main calculator class
- `test_calculator.py` - Test suite
- `README.md` - Documentation
- `CLAUDE.md` - Project instructions for Claude Code

Secret mission

Create a Custom Skill

You've used Claude Code to explore, debug, and build. Now take it further by creating a custom skill that automates your pre-commit review workflow. Skills are reusable commands that Claude loads automatically, turning a multi-step process into a single slash command.

Clean Up Your Resources

Clean Up Your Resources

This project runs entirely locally, so there are no ongoing cloud costs. Decide whether to keep your resources running, pause them to come back later, or delete them entirely.

Resources you used:

  • claude-code-playground project folder on your Desktop.
  • Claude Code CLI (native Windows installation).
  • Git for Windows.
  • Custom skill directory at ~/.claude/skills/quick-review/.

Keep everything running

No action needed. Choose this if you plan to keep practicing with Claude Code on this project or want to reuse the custom skill you created.

  • Your claude-code-playground folder stays on your Desktop for future Claude Code sessions.
  • Claude Code remains installed and will auto-update in the background.
  • Your custom /quick-review skill is available in every future Claude Code session.
  • Git for Windows stays installed for any future Git or Claude Code work.

Pause - I'll come back to this later

Exit any running Claude Code session to free up memory. Your files and tools stay installed so you can pick up where you left off.

  • If Claude Code is still running, type exit or press Ctrl+D to end the session.
  • All your project files, CLAUDE.md, and custom skill remain in place for next time.

Delete - I don't want to use this again

Remove all project files, uninstall Claude Code, and optionally uninstall Git for Windows.

  • Delete your project folder by running this command in PowerShell:
Remove-Item -Path "$HOME\Desktop\claude-code-playground" -Recurse -Force
  • Remove the Claude Code binary and data by running these commands in PowerShell:
Remove-Item -Path "$env:USERPROFILE\.local\bin\claude.exe" -Force
Remove-Item -Path "$env:USERPROFILE\.local\share\claude" -Recurse -Force
  • Remove Claude Code configuration files (this also removes your custom skill):
Remove-Item -Path "$env:USERPROFILE\.claude" -Recurse -Force
Remove-Item -Path "$env:USERPROFILE\.claude.json" -Force
  • To uninstall Git for Windows, press the Windows key, type Add or Remove Programs, and press Enter.
  • Find Git in the list and click Uninstall.

Nice Work!

Nice Work!

You did it. You've gone from zero to productive with Claude Code, setting up a complete AI-assisted development workflow on your Windows machine.

You've learned how to:

  • Explore an unfamiliar codebase using natural language, then had Claude find and fix a bug for you.
  • Implement features, run tests, and manage Git entirely through conversational commands with Claude Code.
  • Configure CLAUDE.md for persistent project memory and practice the "plan then execute" workflow for safe refactoring.
  • Secret Mission: Created a reusable custom skill that automates pre-commit code reviews across sessions.

Ready to quiz yourself?