Quick Start

Learn Claude Code essentials in 5 minutes

Quick Start

⚡ Not set up yet? One command does it all: curl -fsSL https://qcode.cc/install/claude-code.sh | bash (Windows: irm https://qcode.cc/install/claude-code.ps1 | iex). See One-Click Setup Script.

After completing installation and environment configuration, let's master Claude Code's core features in 5 minutes.

Launch Claude Code

Navigate to your project directory in the terminal and run:

cd /path/to/your/project
claude

You'll see Claude Code's interactive interface, ready to start a conversation.

Core Interactions

1. Understand Code

> What's the architecture of this project?
> Explain how src/auth/login.ts works
> Find all places that call the database

2. Generate Code

> Write a user registration API endpoint
> Add unit tests for the UserService class
> Create a React login form component

3. Edit Existing Code

> Refactor utils.js to improve readability
> Fix the memory leak in handleSubmit function
> Add TypeScript types to all public functions

4. Debug Issues

> Why is the user redirected to 404 after login?
> Analyze this error: TypeError: Cannot read property 'id' of undefined
> Investigate why the API response is slow

5. Git Operations

> Show me what files I've modified
> Commit these changes with a good commit message
> Create a PR description

Reference Files with @

Use the @ symbol to precisely reference specific files, letting Claude read their contents directly:

> Review @src/components/Header.tsx and optimize performance
> Compare @src/v1/api.js with @src/v2/api.js
> Analyze project dependencies based on @package.json

Tip: Press Tab after typing @ to autocomplete file paths.

Pipe Input

Pass output from other commands to Claude Code for analysis:

# Explain git changes
git diff | claude "explain these code changes"

# Analyze log errors
cat error.log | claude "analyze these errors and provide solutions"

# Review PR changes
gh pr diff 123 | claude "review this PR for code quality"

Common Slash Commands

Use / commands during a session:

Command Description
/help Show help info and all available commands
/clear Clear current conversation history
/compact Compress conversation history to save tokens
/model View or switch models (e.g., opus, sonnet)
/memory Edit project memory file CLAUDE.md
/init Auto-generate project configuration
/commit Smart commit with generated message
/review Code review
/cost View current session cost
/doctor Diagnose installation and configuration issues
/config View or edit configuration
/mcp View MCP server status
/loop Run Claude Code in autonomous loop mode
/bug Report an issue

Keyboard Shortcuts

Shortcut Function
Tab Autocomplete file paths
Esc Interrupt current output
Ctrl+C Cancel current operation
/ Browse command history

Initialize Project Configuration

On first use, run /init to let Claude analyze your project and generate configuration:

> /init

This creates a CLAUDE.md file containing:

  • Project tech stack and architecture overview

  • Common build and test commands

  • Code style guidelines

  • Project-specific conventions

Purpose of CLAUDE.md: Claude Code automatically reads this file on startup, helping the AI better understand your project context.

Practical Examples

Example 1: Add a New Feature

> I need to add a user avatar upload feature with:
  1. Support for JPG/PNG formats
  2. 2MB file size limit
  3. Auto-crop to 200x200 after upload
  4. Store in S3

Example 2: Fix a Bug

> User feedback: Page freezes after clicking "Save" button
> Please investigate the issue in @src/pages/EditProfile.tsx

Example 3: Code Review

> /review
> Focus on security issues and performance bottlenecks

Example 4: Smart Commit

> /commit

Claude will automatically:

  1. Analyze all changes

  2. Generate a proper commit message

  3. Complete the commit

Efficiency Tips

  1. Be specific: Clearly describe what you want, including constraints

  2. Break it down: Split complex tasks into smaller steps

  3. Interrupt early: Press Esc immediately if output isn't what you want

  4. Use references: Use @ to specify files instead of letting AI guess

  5. Maintain context: Claude remembers previous conversation in the same session

Next Steps

Congratulations on mastering Claude Code essentials! Continue with:

  1. Explore CLI Tips for 34 practical tips

  2. Learn Workflow Tips to boost productivity

  3. Check out Codex Integration to use another AI tool

Related Documents

Codex Quick Start
Get Codex CLI installed and configured in 5 minutes -- start AI-powered coding with QCode.cc
Endpoints & API Paths
QCode.cc's three API protocols (Anthropic / OpenAI / Google Gemini), four access domains, and how to fill in BASE_URL
Environment Variables
How to configure environment variables so Claude Code, Codex, Gemini, and other AI coding tools connect to QCode.cc: core variables, a per-tool table, where to set them, and how to verify
🚀
Get Started with QCode — Claude Code & Codex
One plan for both Claude Code and Codex, Asia-Pacific low latency
View Pricing Plans → Create Account
Team of 3+?
Enterprise: dedicated domain + sub-key management + ban protection, from ¥250/person/mo
Learn Enterprise →