Approved CPD Provider — The CPD Group #791576
ENFRAR

AI tools

Claude Code guide: AI coding in your terminal, step by step

Claude Code reads your project, edits files and runs commands from the terminal. This guide covers the first steps, the features worth learning and how to stay in control.

AMAADOR Academy editorial teamPublished 8 min read5 sources

Espacio para la creación
Photo: “Aquí surgen las ideas” by Kurayú via Wikimedia Commons, licensed under CC BY-SA 4.0. Resized for the web.

What is Claude Code?

Claude Code is a coding tool from Anthropic that runs in your terminal. You open it inside a project folder and talk to it in plain language. It can read your files, search the code, edit several files, run commands such as tests, and explain what it finds. Anthropic describes it as an agentic coding tool, which means it takes steps on its own instead of only suggesting text. If the word is new, read our guide to AI agents first.

It is also available in some code editors and other places, but the terminal is the core experience. You use it with a Claude subscription that includes it, or with an API account. Plans and access change, so read Anthropic's official pages for the current options.

This is a quick guide. For a full path from first install to expert use, take our free Claude Code Mastery course.

What you can do with it

  • Understand a new codebase: ask "explain how login works in this project".
  • Fix bugs: paste an error and let it find the cause, change the code and run the tests.
  • Add features: describe the feature, review its plan, then let it build step by step.
  • Refactor and clean up: rename things, split large files, add comments.
  • Write tests and documentation.
  • Handle Git tasks: review changes, write commit messages and prepare pull requests, with your approval.
  • Automate chores: repetitive edits across many files.

You do not have to be an expert. Non-programmers use it for small tools and scripts, and our Coding with AI for Non-Programmers course is a gentle start. Also see AI coding for beginners.

Video: “Claude Code - Full Tutorial for Beginners” — Tech With Tim on YouTube. Embedded for reference; the publisher is not affiliated with this site.

Step by step: your first session

  1. Check the basics. You need a computer with a terminal, a supported system and an account. Follow the official setup page for your operating system, because install steps change.
  2. Install Claude Code using Anthropic's current instructions, then sign in.
  3. Open a project folder. Use a small practice project or a copy of a real one. Put it under Git so you can undo changes.
  4. Start Claude Code by typing the command in that folder.
  5. Ask a read-only question first. "Give me an overview of this project and its main files."
  6. Give a small task. "Add input validation to the signup form and update the tests."
  7. Review before approving. Claude Code normally asks permission before it edits files or runs commands. Read what it proposes.
  8. Run the tests and check the diff yourself before you commit.

Habits that give better results

  • Give context in a project memory file. Claude Code reads a file called CLAUDE.md in your project. Put build commands, coding style and rules there.
  • Plan first. Ask it to explain its plan before it edits. Many users use a planning mode for bigger changes.
  • Work in small steps. Several small, tested changes beat one giant one.
  • Be specific. Name the file, the behaviour you want and how to test it.
  • Give a way to check. A test command or a sample input lets it verify its own work.
  • Start fresh when it drifts. A long, confused conversation can hurt quality. Clear it and restate the goal.
  • Use slash commands to manage sessions, settings and tools. Type a slash in the app to see what is available.

These habits are about prompting well. Our prompt engineering tips and the Prompt Engineering course help you to write better instructions.

Extending it: tools, agents and connections

Claude Code can connect to other tools through the Model Context Protocol, so it can reach services such as issue trackers or databases when you allow it. See MCP explained. It also supports custom commands, hooks that run your own scripts at set points, and sub-agents for specialised tasks. These are advanced features. Learn the basics first, then add one feature at a time. Anthropic's documentation lists the current options, and the free AI Workspaces course explains related ideas such as projects and connectors.

Video: “Claude Code for Beginners Tutorial [Full Course]” — freeCodeCamp.org on YouTube. Embedded for reference; the publisher is not affiliated with this site.

Safety and good practice

  • Use version control. Git lets you review and undo every change.
  • Keep permissions tight. Approve commands one by one at first. Be careful with any mode that skips approvals.
  • Protect secrets. Do not paste passwords or private keys into a prompt. Keep them out of the files the tool reads when possible.
  • Review all code. AI code can have bugs and security holes. Read the diff and run tests.
  • Watch untrusted content. A file or web page can contain instructions meant to mislead an agent.
  • Check your company rules before using it on work code, especially for confidential projects.
  • Know the costs. Heavy use consumes plan limits or API credit.

More on this in AI privacy and safety tips.

Claude Code or other AI coding tools?

Claude Code is terminal-first and agentic. Editor-based tools such as Cursor, GitHub Copilot and Windsurf put AI inside a graphical editor with autocomplete and chat. Many developers use both: an editor for everyday typing, a terminal agent for bigger tasks. Read our comparison of AI code editors, our explanation of vibe coding and the roundup best AI for coding. Try each on the same small task and keep the one that fits how you work. If you want a certificate-style path, there is also a free Claude Certified Architect: Foundations exam-prep course.

Common problems and quick fixes

  • It changes too much. Ask for a smaller scope: "Only edit this one file. Do not touch anything else."
  • It forgets your rules. Move them into the CLAUDE.md file so they load every session.
  • It guesses instead of checking. Tell it to read the relevant files and run the tests before it answers.
  • The answer is slow or expensive. Narrow the question, work on one folder at a time and start a fresh session for a new task.
  • The code runs but you do not understand it. Ask it to explain the code line by line and to simplify it. Do not merge code you cannot explain.

A sample first project

Create an empty folder, start Git and open Claude Code. Ask: "Build a simple command-line to-do list in Python. Store tasks in a JSON file. Add commands to add, list and complete tasks, and write a few tests." Read the plan. Approve the file creation. Run the tests. Then ask for one improvement, such as due dates, and look at the diff again. In an hour you will have learned the main loop: ask, review, test, improve, commit. That loop is more important than any single feature.

Quick tricks to try today

  1. Put your project rules and test commands in a CLAUDE.md file.
  2. Ask for a plan before any big change.
  3. Always work inside a Git repository so you can undo.
  4. Give it a way to verify, such as a test command.
  5. Keep tasks small and commit often.
  6. Name exact files and the behaviour you expect.
  7. Clear the conversation when it drifts and restate the goal.
  8. Approve commands one at a time until you trust the setup.
  9. Never paste secrets into prompts.
  10. Read every diff before you commit.

Frequently asked questions

What is Claude Code?

Claude Code is Anthropic's AI coding tool that runs in your terminal. It reads your project, edits files and runs commands to complete tasks you describe in plain language.

Is Claude Code free?

Access depends on Anthropic's current plans or API usage and can change. Check the official site for what is included and what limits apply.

Can beginners use Claude Code?

Yes, with care. Start with small projects under Git, read what it proposes and learn basic terminal use. A beginner course helps.

Is Claude Code safe to run on my code?

It asks for permission before many actions, but you stay responsible. Use version control, review diffs, protect secrets and follow your organisation's rules.

How is Claude Code different from Cursor or Copilot?

Claude Code is terminal-based and agentic. Cursor and Copilot are built around an editor with autocomplete and chat, although they also offer agent features.

Sources

Sources were checked on 29 November 2026; AI products change fast, so check the publisher for later updates.

  1. Anthropic: Claude Code overview docs.anthropic.com
  2. Anthropic: Claude Code best practices anthropic.com
  3. Anthropic: Building effective agents anthropic.com
  4. Model Context Protocol modelcontextprotocol.io
  5. Git documentation git-scm.com