Tutorial12 min read

Your First Conversations - Tutorial

SFEIR Institute

TL;DR

This tutorial guides you step by step to master your first conversations with Claude Code, from writing effective prompts to executing the Explore → Plan → Code workflow. You will learn to formulate precise code requests, run tests, and drive an AI agent directly from your terminal in under 30 minutes.

This tutorial guides you step by step to master your first conversations with Claude Code, from writing effective prompts to executing the Explore → Plan → Code workflow. You will learn to formulate precise code requests, run tests, and drive an AI agent directly from your terminal in under 30 minutes.

Claude Code is a command-line development agent that transforms your instructions into code modifications, command executions, and automated refactorings. Claude Code (version 1.0+) relies on the Claude Sonnet 4.6 model by default and supports projects with up to 200,000 tokens of context. over 500,000 developers use Claude Code daily in their development workflow.

What are the prerequisites before getting started?

Before launching your first conversation, verify that your environment is ready. Node.js 22 or higher is required to run Claude Code without errors.

Open your terminal and run these checks:

node --version   # v22.0.0 or higher required
claude --version # Confirms Claude Code installation
PrerequisiteMinimum versionVerification
Node.js22.0.0node --version
Claude Code1.0.0claude --version
Git2.40+git --version
API KeyActiveclaude config list

If you have not yet installed the tool, check the complete guide on your first conversations to set up your environment. In practice, the full installation takes about 5 minutes on a standard connection.

Verification: All three commands return a version number without errors.

Key takeaway: verify Node.js 22+, Claude Code 1.0+, and Git 2.40+ before any first session.

How to launch your first Claude Code session? (~2 min)

Step 1: Open Claude Code in your project

Navigate to the root of your project and launch Claude Code:

cd ~/my-project
claude

Step 2: Send your first discovery prompt

Type a simple instruction to explore your codebase:

> Explain the structure of this project

Step 3: Verify that Claude Code reads your files

Confirm that the agent has properly analyzed your file tree:

> What are the main files and their roles?

A Claude Code session is an interactive instance that retains the context of your exchanges as long as you remain in the same terminal. Each session starts with an automatic analysis of your current directory, including CLAUDE.md files if they exist.

In practice, Claude Code analyzes an average of 15 files in under 3 seconds when starting a session. To configure persistent memory between your sessions, explore the tutorial on the CLAUDE.md memory system.

Verification: Claude Code displays a structured summary of your project with the main directories and files.
⚠️ If you see "No API key found", run claude config set api_key YOUR_KEY then relaunch claude.

Key takeaway: launch claude at the root of your project to start a contextualized session.

How to write effective prompts in project context? (~5 min)

The art of prompting in Claude Code rests on three principles: specificity, context, and intent. A well-formulated prompt reduces the number of iterations needed by 60% according to community feedback (2025).

Principle 1: be specific about the file and function

Compare these two approaches:

Vague promptPrecise promptResult
"Fix the bug""Fix the null pointer bug in src/auth.ts line 42"Targeted fix in 1 iteration
"Add tests""Add 3 unit tests for the validateEmail function in lib/validators.ts"Relevant tests generated
"Refactor the code""Extract the pagination logic from api/users.ts into a usePagination hook"Clean refactoring

Principle 2: provide business context

Include the "why" in your prompts to get tailored solutions:

> The calculateDiscount function in src/pricing.ts returns 0
> when the cart exceeds 1000EUR. The expected behavior is
> a 15% discount. Fix the calculation.

Here is how to structure a quality prompt: start with the target file, describe the current behavior, then specify the desired behavior. To deepen prompt techniques, check the tips for your Claude Code conversations.

Principle 3: use slash commands to guide the context

Slash commands are instructions prefixed with / that modify Claude Code's behavior. Type /help to display the complete list.

> /compact    # Summarizes the conversation to free up context
> /clear      # Clears the history and starts fresh
> /model      # Changes the model being used

For the exhaustive list, refer to the essential slash command examples.

Verification: Your prompt mentions a specific file, a current behavior, and an expected result.

Key takeaway: an effective prompt always contains a target file, a context, and a clear intent.

How to request code changes from Claude Code? (~5 min)

Claude Code modifies your files directly on disk after your validation. In 2026, the permission system protects you by asking for confirmation before each file write.

Requesting a simple modification

Formulate your request with the file path and the desired modification:

> In src/components/Header.tsx, add a "Logout" button
> to the right of the main menu that calls the logout() function

Claude Code presents a diff before applying the changes. Read the diff carefully, then accept or reject with y or n.

Requesting a refactoring

Specify the scope of the refactoring to avoid overly broad modifications:

> Refactor the processOrder function in lib/orders.ts:
> - Extract the validation into a validateOrder function
> - Extract the total calculation into calculateTotal
> - Keep the same return signatures

In practice, Claude Code processes a 200-line refactoring in 8 seconds on average. The permissions and security system lets you control which files the agent can modify.

Requesting multi-file modifications

Describe all the files involved in a single prompt:

> Add a POST /api/comments endpoint:
> 1. Create the Comment type in types/index.ts
> 2. Add the route in app/api/comments/route.ts
> 3. Add a test in tests/api/comments.test.ts
Request typeAverage timeFiles touched
Simple modification3-5 s1 file
Refactoring8-15 s2-4 files
New feature15-30 s3-8 files
Verification: The displayed diff matches your expectations. The modified files compile without errors.
⚠️ If you see "Permission denied for file write", check the permissions quickstart to authorize writes.

Key takeaway: formulate each code request with a target file, a precise action, and the expected result.

How to run commands and tests with Claude Code? (~5 min)

Claude Code can execute shell commands directly from the conversation. You keep control: each command requires your approval before execution.

Running tests

Ask Claude Code to run your tests:

> Run the project's unit tests

Claude Code automatically detects your test framework (Jest, Vitest, pytest) and executes the appropriate command. In practice, the tool identifies the test runner in 95% of projects without additional configuration.

Interpreting and fixing failures

When a test fails, ask for a chained correction:

> The validateEmail test fails with "Expected true, got false".
> Fix the regex in lib/validators.ts and rerun the tests.

Claude Code fixes the code, then runs the tests automatically to validate the correction. This correction-verification cycle is one of the major productivity gains: according to Anthropic, developers using Claude Code reduce their debugging time by 40%.

Running custom commands

You can request the execution of any command:

> Run npm run build and show me the errors if there are any
> Run git status to see the modified files
> Run the linter on src/ and fix errors automatically

To master context management during long debugging sessions, follow the context management tutorial. The /compact command is particularly useful after 20 exchanges to maintain response relevance.

Verification: The tests pass green after correction. The npm test command returns 0 errors.
⚠️ If you see "Command not allowed", add the command to your authorization list via the permissions settings.

Key takeaway: ask Claude Code to run your tests and fix errors in a single conversation.

How to use the Explore → Plan → Code workflow? (~8 min)

The Explore → Plan → Code workflow is a three-phase methodology that structures your interactions with Claude Code for complex tasks. This workflow reduces errors by 50% on modifications involving more than 5 files.

Phase 1: Explore - Understand the existing code

Start by asking Claude Code to analyze the codebase:

> Explore the authentication module: what files are
> involved, what is the architecture, what patterns are
> used? Don't modify anything.

The instruction "don't modify anything" is important. It forces Claude Code to stay in read-only mode. Ask follow-up questions to refine your understanding.

In practice, the Explore phase takes 2 to 5 minutes and covers an average of 30 analyzed files. You can check the first conversations cheatsheet for the most effective formulations.

Phase 2: Plan - Define the strategy

Request an action plan before any modification:

> Propose a plan to add OAuth2 authentication:
> - List the files to create and modify
> - Describe the steps in order
> - Identify potential risks
> Don't code anything yet.

Claude Code generates a structured plan that you can validate, modify, or reject before moving to implementation.

PhaseObjectiveAverage durationTypical command
ExploreUnderstand the existing code2-5 min"Analyze module X"
PlanDefine the strategy3-5 min"Propose a plan for Y"
CodeImplement5-20 min"Implement the plan"

Phase 3: Code - Implement the validated plan

Launch the implementation by referencing the plan:

> Implement the plan step by step. Start by creating
> the file lib/oauth.ts, then modify the routes.

Verify each step before moving on to the next. You can interrupt at any time to adjust the plan. To integrate your modifications into Git efficiently, check the Git integration tutorial.

Verification: The plan covers all files to modify. The implementation follows the defined order. Tests pass after each step.

Key takeaway: the Explore → Plan → Code workflow structures your complex tasks into three distinct phases to minimize errors.

What are the shortcuts and tips to save time? (~3 min)

Here is how to speed up your Claude Code sessions with techniques proven by the SFEIR Institute community.

Essential keyboard shortcuts

ShortcutActionTime saved
EscapeCancel the current generationImmediate
Up arrowRecall the last prompt~2 s
/compactCompress the contextFrees ~60% of context
/clearReset the sessionImmediate
Ctrl+CInterrupt a commandImmediate

Combining requests

Group related requests into a single prompt instead of sending 5 separate messages:

> In src/api/users.ts:
> 1. Add email validation with zod
> 2. Add a test for invalid emails
> 3. Run the tests and fix if necessary

This approach reduces back-and-forth by 70% and consumes fewer tokens. You will find more techniques in the first conversations FAQ.

Using the CLAUDE.md file

The CLAUDE.md file is a Markdown configuration file that Claude Code reads at the start of each session. Create it at the root of your project:

# Project instructions
- Framework: Next.js 15 with App Router
- Style: Tailwind CSS, shadcn/ui components
- Tests: Vitest for unit tests
- Conventions: variable names in camelCase

By placing your conventions in this file, you avoid repeating them at each session. Claude Code applies these rules automatically in 98% of its responses.

Verification: The CLAUDE.md file exists at the root and Claude Code mentions it at the start of the session.

Key takeaway: the CLAUDE.md file and slash commands are your best allies for productive sessions.

How to avoid common beginner mistakes?

Here are the 5 most frequent errors observed among new Claude Code users, and how to fix them.

  1. Prompts that are too vague - "Improve the code" does not produce a usable result. Always specify a file, a function, and a measurable objective.
  1. Ignoring diffs - Read each diff before accepting. An automatic modification can introduce regressions if you do not verify it.
  1. Sessions that are too long without compaction - After 30 exchanges, the context degrades. Use /compact every 15-20 interactions to maintain response quality.
  1. Forgetting tests - End each modification with "run the tests" to detect regressions immediately.
  1. Not using the CLAUDE.md file - Without this file, you repeat your conventions at each session. Create it from day one.

If you want to go deeper into AI-assisted development beyond Claude Code, SFEIR Institute offers the AI-Augmented Developer training over 2 days. You will practice pair programming with an AI agent, assisted code review, and integration into a complete CI/CD workflow. To go even further, the AI-Augmented Developer - Advanced one-day training covers advanced prompt engineering techniques and multi-agent orchestration.

Key takeaway: the 5 most common mistakes are fixed by adopting precise prompts, systematic diff verification, and regular compaction.

How to go further with Claude Code?

You now master the basics: sessions, prompts, code modifications, command execution, and the Explore → Plan → Code workflow. Here is how to progress.

  1. Configure your CLAUDE.md file with your team's conventions
  2. Explore the essential slash commands to automate your recurring tasks
  3. Practice the Explore → Plan → Code workflow on a real feature of your project
  4. Integrate Claude Code into your Git flow with the Git integration tutorial
  5. Master context management with the dedicated tutorial

Additional resources

For a complete and structured onboarding, the Claude Code training from SFEIR Institute guides you through 1 day with hands-on exercises on real projects. You leave with an operational workflow and prompting techniques adapted to your tech stack.

ResourceTypeDuration
Conversations cheatsheetQuick reference5 min
First conversations FAQFrequently asked questions10 min
Permissions tutorialIn-depth guide20 min
SFEIR Claude Code trainingIn-person training1 day

Key takeaway: progress by combining daily practice, the CLAUDE.md file, and the resources from the Claude Code silo.

Recommended training

Claude Code Training

Master Claude Code with our expert instructors. Practical, hands-on training directly applicable to your projects.

View program