Skip to content
DocsUse AIfundamentalsIntroduction to AI Coding
Chapter 1 of 15·fundamentals·5 min read

Introduction to AI Coding

Giới Thiệu Lập Trình với AI

What AI coding assistants are and how they transform development

Hover or tap any paragraph to see Vietnamese translation

What is an AI Coding Assistant?

An AI coding assistant is a tool that uses large language models (LLMs) to help developers write, understand, and debug code. They can generate code from natural language descriptions, explain complex code, suggest improvements, and even perform complex tasks autonomously.

Unlike traditional autocomplete tools that only suggest based on patterns, AI coding assistants understand context, logic, and the intent behind your code. They can answer questions, refactor code, write tests, and assist with debugging.

Why Use an AI Coding Assistant?

AI coding assistants significantly boost productivity by automating repetitive tasks, reducing time spent searching documentation, and providing intelligent suggestions right in your workflow.

  • Write code faster: Describe what you want and let AI generate the code, from simple functions to complete features.
  • Learn new technologies: AI can explain code, concepts, and best practices in your language.
  • Debug efficiently: Describe the problem and get debugging guidance or automatic fixes.
  • Maintain code quality: Get improvement suggestions, catch potential bugs, and ensure best practices.

Working with an AI coding assistant follows a simple, iterative cycle that helps you quickly go from idea to working code.

AI-Assisted Development Workflow
1
Describe
Tell AI what you need
2
Generate
AI creates code
3
Review
Check the output
4
Iterate
Refine if needed

What is Claude Code?

Claude Code is Anthropic's official CLI for Claude — a powerful AI coding assistant that runs directly in your terminal. It can read, write, and execute code in your project with deep contextual understanding.

Unlike other AI tools that only suggest code, Claude Code can actually execute tasks: create files, run commands, manage git, and even orchestrate multiple agents to complete complex projects.

Key Features

  • Full project context: Claude Code can read and understand your entire codebase, not just the current file.
  • Direct code execution: Run commands, create files, and make changes directly in the terminal.
  • Skills system: Pre-packaged workflows for common tasks like commit, review, deploy.
  • MCP Servers: Extend capabilities by connecting to external services.
  • Multi-agent orchestration: Coordinate multiple agents working in parallel on complex tasks.

Installing Claude Code

Claude Code can be installed via npm. You need Node.js 18 or later to run it.

Terminal
1# Install Claude Code globally2npm install -g @anthropic-ai/claude-code34# Or use npx to run without installing5npx @anthropic-ai/claude-code67# Verify installation8claude --version
Info
You need an API key from Anthropic or login with a Claude account to use it. On first run, Claude Code will guide you through authentication setup.

Running Claude Code for the First Time

After installation, simply run the claude command in your project directory. Claude will automatically analyze the codebase and be ready to assist.

Terminal
1# Navigate to your project2cd my-project34# Start Claude Code5claude67# Or start with a specific prompt8claude "explain the architecture of this project"

Claude Code will display an interactive interface where you can type requests in natural language. You can also use slash commands like /help to see available commands.

Core Concepts

Context and CLAUDE.md

Claude Code uses a CLAUDE.md file in your project to understand conventions, structure, and specific guidelines. This file is like a guide for the AI on how to work with your project.

CLAUDE.md
1# CLAUDE.md23## Project Overview4This is a Next.js e-commerce application using TypeScript.56## Commands7- `npm run dev` - Start development server8- `npm run build` - Build for production9- `npm test` - Run tests1011## Conventions12- Use TypeScript strict mode13- Follow Airbnb style guide14- Write tests for all new features

Tools and Permissions

Claude Code has access to various tools: read/write files, run bash commands, web search, and more. You can control what Claude is allowed to do through the permissions system.

  • Read: Read files and directories in the project
  • Write: Create and edit files
  • Bash: Run shell commands
  • WebSearch: Search for information on the web
  • Agent: Spawn sub-agents for complex tasks

Key Takeaways

Điểm Chính

  • AI coding assistants understand context and intent, not just patternsAI coding assistant hiểu ngữ cảnh và mục đích, không chỉ pattern
  • Claude Code runs in your terminal with full project accessClaude Code chạy trong terminal với quyền truy cập toàn dự án
  • CLAUDE.md file guides AI behavior in your projectFile CLAUDE.md hướng dẫn hành vi AI trong dự án
  • Permissions system controls what Claude can doHệ thống permissions kiểm soát những gì Claude có thể làm

Practice

Test your understanding of this chapter

Quiz

What makes AI coding assistants different from traditional autocomplete?

Điều gì khiến AI coding assistant khác biệt với autocomplete truyền thống?

True or False

Claude Code can only suggest code, it cannot execute commands.

Claude Code chỉ có thể gợi ý code, không thể thực thi lệnh.

Code Challenge

Complete the command to start Claude Code

Hoàn thành lệnh để khởi động Claude Code

npm install -g @anthropic-ai/
Quiz

What is the purpose of CLAUDE.md file?

Mục đích của file CLAUDE.md là gì?

← → to navigate chapters
Built: 4/8/2026, 12:01:11 PM