Facebook iconHow to Use Claude Code? (Everything You Need to Know)
F22 logo
Blogs/AI

How to Use Claude Code? (Everything You Need to Know)

Written by Rabbani Shaik
Dec 10, 2025
6 Min Read
How to Use Claude Code? (Everything You Need to Know) Hero

Have you ever wanted a simple way to get coding help right inside your terminal? This article is about Claude Code, Anthropic’s AI tool that works from the command line, reads your project, and helps with everyday coding tasks like explaining code, automating routine steps, and handling Git commands using plain language. 

We’ll guide you through installing it, using the main commands, setting permissions safely, and extending it with external tools through the Model Context Protocol (MCP). By the end, you’ll know how to set up Claude Code in your own projects and use it to work more smoothly and efficiently. As reported by ppc.land, Claude Code has already processed 195 million lines of code in a week. Keep reading to see how it can fit into your workflow.

welcome to claude code

How to Install and Set Up Claude Code

Install via npm

# Install Claude Code
npm install -g @anthropic-ai/claude-code

# Navigate to your project
cd your-awesome-project

# Start coding with Claude
claude
# You'll be prompted to log in on first use

Basic Commands in Claude Code

Once you’ve installed Claude Code, here are some essential commands you’ll use regularly.

Starting a Session

# Start a new Claude session
claude

# Start with MCP servers configured in a JSON file
claude --mcp-config .mcp.json

# Skip ALL permission prompts (dangerous, allows execution without confirmation)
claude --dangerously-skip-permissions

Working With Prompts

# Start with an initial prompt
claude "explain this project"

# Continue the most recent conversation
claude -c

# Resume any past conversation (shows history)
claude --resume

Maintenance
# Update to the latest CLI version
claude update

What You Can Do Inside a Claude Session?

Once inside a session, Claude provides a set of slash commands (/) for extended functionality:

  • /mcp → Check MCP server status
  • /clear → Clear the current context (start fresh)
  • /compact → Compact the conversation to reduce token usage
    • Useful since Claude Code has a ~200k context limit (can be restrictive for large projects)
  • /memory → Edit persistent memory (claude.md)
  • /model → Switch between models
    • opus-4.1 for planning (more powerful, more expensive)
    • sonnet-4.1 for day-to-day coding
  • /review or /security-review → Trigger code review

Using claude.md - The Claude code’s context of your project.

What is claude.md?

  • A simple markdown file that acts as long-term memory for your project.
  • Claude reads it automatically at the start of every session (/init).
  • Anything in claude.md becomes part of Claude’s working context—without you having to re-explain it every time.

What to Put in claude.md

Think of it as a project README for your AI pair-programmer. Examples:

  • Project goals & scope
  • Coding conventions (naming patterns, linting rules)
  • Architecture notes
  • Environment setup instructions
  • Special constraints (e.g., “always use Python 3.12,” “React 18 only”)

Updating claude.md from Prompts

You don’t even need to edit the file manually. Inside a session, you can tell Claude to remember something using the # symbol:

claude prompt

This automatically appends the instruction to your claude.md file.

Pro tip: Keep claude.md in version control with your team. That way, every developer (and every Claude session) shares the same context.

MCP: Extend Claude Code with External Tools

MCP (Model Context Protocol) is what allows Claude Code to reach beyond your local terminal and interact with external services. By configuring MCP servers, you can give Claude access to tools such as:

  • context7 → Up-to-date documentation for LLMs and AI code editors
  • GitHub → Pull requests, issues, repo browsing
  • Git → Local Git operations
  • Playwright → browser automation
How to Use Claude Code Effectively
Learn prompt strategies and integration workflows to get the most from Claude Code for generation, debugging, and documentation.
Murtuza Kutub
Murtuza Kutub
Co-Founder, F22 Labs

Walk away with actionable insights on AI adoption.

Limited seats available!

Calendar
Saturday, 17 Jan 2026
10PM IST (60 mins)

In short, MCP is how you turn Claude Code from a “chatty assistant” into a programmable development agent.

Opening the MCP Configuration Workflow

Inside a Claude session, run:

/mcp

This command opens the MCP configuration workflow, where you can:

  • Add or remove MCP servers
  • Inspect which servers are active
  • Verify connection status

Example: Adding the Context7 MCP Server

Let’s walk through adding a real MCP server, Context7.

Context7 is a popular MCP server that provides up-to-date code snippets from major frameworks and Git repositories. Once connected, Claude can fetch relevant examples directly into your workflow.

Step 1. Get Your API Key

Log in to the Context7 dashboard and copy your API key.

Step 2. Add the MCP Server

Run the following command:

claude mcp add --transport http context7 https://mcp.context7.com/mcp \
  --header "CONTEXT7_API_KEY: YOUR_API_KEY"

This command installs Context7 as a global MCP server on your system.

Step 3. Verify the Setup

Open a Claude Code session and run:

/mcp

You should see context7 listed among the active MCP servers.

Step 4. Use It in Prompts

When you want Claude to use Context7, simply reference it in your prompt:

  • Use context7 to get me the latest Next.js authentication snippet.
  • Fix this camera track not getting published to livekit during low network conditions. Use context7 to get the latest code. 

Claude will automatically call the Context7 MCP server and pull in relevant results.

That’s it, adding an MCP server really is as easy as “blowing out a candle on a cake.”

Example:

Permissions & Project-Scoped MCP Servers

By default, Claude will ask for your permission before invoking any MCP server. Once approved, it integrates the tool into its workflow seamlessly.

Sometimes, however, you don’t want global servers, you need project-specific MCP configurations that can also be shared with teammates.

Using .mcp.json for Project Scope

You can configure MCP servers at the project level by creating a .mcp.json file in your repo. This allows you to:

  • Keep project tools isolated from global ones
  • Share the same MCP setup with your team via version control
  • Ensure consistent environments across devs

Example: Adding the Playwright MCP Server

Playwright has an MCP server that lets Claude Code execute browser automation, perfect for UI testing and debugging.

  1. Create a .mcp.json in your project root.
  2. Add the server config like this:
{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": [
        "@playwright/mcp@latest"
      ]
    }
  }
}
  1. command: "npx" → Uses npx to run the tool
  2. args: [...] → Installs and runs the latest Playwright MCP package
How to Use Claude Code Effectively
Learn prompt strategies and integration workflows to get the most from Claude Code for generation, debugging, and documentation.
Murtuza Kutub
Murtuza Kutub
Co-Founder, F22 Labs

Walk away with actionable insights on AI adoption.

Limited seats available!

Calendar
Saturday, 17 Jan 2026
10PM IST (60 mins)

Triggering the Server

Once defined, Claude Code will automatically pick up the project’s .mcp.json. To use it, just ask in your Claude prompt:

Use the playwright MCP server to test the login flow.

Claude will then execute browser automation through Playwright as part of its workflow.

Use Case: This is especially powerful for automation testing, detecting UI regressions, running end-to-end flows, or validating

Multi-Model Strategy: Choosing the Right Model

Claude Code supports multiple models, and you can switch between them at any time using the /model command. Each model has its strengths, so knowing when to use which can save you time (and money).

When to Use Each Model

  • Opus 4.1 → Best for architecture, system design, and complex debugging
    • Slower and more expensive, but produces deeper reasoning and higher-quality plans.
  • Sonnet 4 → Ideal for day-to-day development
    • Balanced speed and quality, great for writing functions, tests, or iterating quickly.

The Hybrid Mode: opusplan

If you want the best of both worlds, Claude Code introduces opusplan mode.

Here’s how it works:

  1. Planning with Opus 4.1
    • Claude first uses Opus 4.1 to analyze your request.
    • It produces a detailed plan (e.g., files to edit, functions to touch, risks to consider).
  2. Execution with Sonnet 4
    • Once you approve the plan, Claude switches to Sonnet 4 to implement the code.
    • You get both the depth of Opus and the efficiency of Sonnet.

BOOM  (Probably the best outcome of an agentic coding agent, anthropic really nailed it here) 

Claude will give you a plan to implement a feature/ fix a bug or anything you want. It will tell you the file that it is gonna change and all. And you can approve the plan or modify it and accept. Sonnet 4 will take over and code it for you.

Conclusion

Claude Code is intentionally low-level and unopinionated, sitting close to raw model access, so it can adapt to your development workflow rather than forcing a new one.

Think of it as a senior pair-programmer sitting in your terminal:

  • Be specific in your prompts
  • Iterate instead of expecting perfection in one shot
  • Keep safety checks on unless you know what you’re doing
  • Extend it with MCP servers when you need external tools or integrations

Used well, Claude Code doesn’t just speed up your work, it changes how you build, test, and reason about software.

Author-Rabbani Shaik
Rabbani Shaik

AI enthusiast who loves building cool stuff by leveraging AI. I explore new tools, experiment with ideas, and share what I learn along the way. Always curious, always building!

Share this article

Phone

Next for you

Self-Consistency Prompting: A Simple Way to Improve LLM Answers Cover

AI

Jan 9, 20266 min read

Self-Consistency Prompting: A Simple Way to Improve LLM Answers

Have you ever asked an AI the same question twice and received two completely different answers? This inconsistency is one of the most common frustrations when working with large language models (LLMs), especially for tasks that involve math, logic, or step-by-step reasoning. While LLMs are excellent at generating human-like text, they do not truly “understand” problems. They predict the next word based on probability, which means a single reasoning path can easily go wrong. This is where self

What Is Prompt Chaining? How To Use It Effectively Cover

AI

Jan 9, 20267 min read

What Is Prompt Chaining? How To Use It Effectively

Picture this: It’s 2 AM. You’re staring at a terminal, fighting with an LLM. You’ve just pasted a 500-word block of text, a "Mega-prompt" containing every single instruction, formatting rule, and edge case you could think of. You hit enter, praying for a miracle. And what do you get? A mess. Maybe the AI hallucinated the third instruction. Maybe it ignored your formatting rules entirely. Or maybe it just gave you a polite, confident, and completely wrong answer. Here’s the hard truth nobody

What is Directional Stimulus Prompting? Cover

AI

Jan 9, 20268 min read

What is Directional Stimulus Prompting?

What’s Actually Going On Inside an AI “Black Box”? Have you ever noticed that you can ask an AI the same thing in two slightly different ways and get completely different replies? That’s not your imagination. Large Language Model systems like ChatGPT, Claude, or Gemini are often described as “black boxes,” and there’s a good reason for that label. In simple terms, when you send a prompt to an LLM, your words travel through an enormous network made up of billions of parameters and layered mathe