ข้ามไปเนื้อหาหลัก
Claude Code

Command Cheatsheet

สรุปคำสั่งที่ใช้งานบ่อยของ Claude Code CLIพร้อมคำอธิบายภาษาไทย เพื่อให้คุณทำงานร่วมกับ AI Agent ได้รวดเร็วยิ่งขึ้น!

WORKSPACE & FILES

/init

สร้างไฟล์เริ่มต้น CLAUDE.md และวิเคราะห์โปรเจกต์

Explore the codebase and generate a starter CLAUDE.md

/add-dir

ให้สิทธิ์ Claude เข้าถึงโฟลเดอร์เพิ่มเติม

Grant Claude file access to an additional directory

/memory

ดูหรือแก้ไขไฟล์ CLAUDE.md

View or edit the CLAUDE.md files in scope

/diff

ดูการเปลี่ยนแปลงที่ยังไม่ได้บันทึก (Diff)

Open an interactive viewer of uncommitted changes

@ + path

อ้างอิงไฟล์หรือโฟลเดอร์ใน Prompt

Reference a file or directory in your prompt

SESSION & CONTEXT

/clear

ล้างประวัติการสนทนาและเริ่มใหม่

Wipe conversation history and start fresh

/compact

สรุปบทสนทนาเพื่อคืนพื้นที่ Context Window

Summarize the conversation to free up context

/context

ดูการใช้งาน Context ปัจจุบัน

Visualize what is currently loaded into context

/rewind

ย้อนกลับบทสนทนาหรือโค้ด

Roll the conversation and/or your code back

/resume

เปิดเซสชันก่อนหน้าขึ้นมาทำต่อ

Reopen a previous session and continue

/export

บันทึกบทสนทนาปัจจุบัน

Save the current conversation

/btw

ถามคำถามแทรกโดยไม่รบกวน Context

Ask a quick side question without consuming context

SETTINGS & SYSTEM

/config

เปิดหน้าการตั้งค่า (Settings)

Open configuration settings

/model

เลือกหรือเปลี่ยนโมเดลที่ใช้งาน

View or switch the active model

/permissions

ดูหรือเปลี่ยนสิทธิ์การใช้เครื่องมือต่างๆ

View or change tool permissions

/cost

แสดงจำนวน Token และค่าใช้จ่ายของเซสชันนี้

Show token usage and spend for this session

/usage

แสดงลิมิตการใช้งานโควต้าของคุณ

Show your plan's usage limits

/status

แสดงสถานะปัจจุบัน (บัญชี, โฟลเดอร์, โมเดล)

Show account, model, working directory

/doctor

ตรวจสอบปัญหาการติดตั้งและสภาพแวดล้อม

Diagnose install and environment issues

/login

เข้าสู่ระบบ จัดการบัญชี หรือออกจากระบบ

Authenticate, switch accounts, or sign out

TASKS & TOOLS

/plan

เข้าสู่โหมดวางแผน (Plan Mode)

Drop straight into Plan Mode

/agents

แสดงและจัดการ Subagents

List, create, or edit subagents

/mcp

จัดการการเชื่อมต่อ MCP Server

Manage MCP server connections

/hooks

ดูการตั้งค่า Hooks สำหรับอีเวนต์ต่างๆ

View hook configuration for tool events

/skills

แสดง Skills ที่สามารถใช้งานได้

List the skills available in this session

/simplify

รีวิวและแก้ไขโค้ดที่เพิ่งแก้ไข (Bundled Skill)

Review recently changed files for reuse/quality

/help

ดูคำสั่งทั้งหมดที่สามารถใช้ได้

List all available commands

/exit

ออกจากโปรแกรม CLI

Quit the CLI

SHORTCUTS & KEYS

Shift + Tab

เปลี่ยนโหมด Permission Mode

Cycle permission mode (default → acceptEdits → plan)

Esc

หยุดการตอบกลับของ Claude

Interrupt Claude mid-response

Esc, Esc

เปิดเมนูย้อนกลับ (Rewind Menu)

Open the rewind/checkpoint menu

Ctrl + C

ยกเลิกคำสั่งหรือออกจากโปรแกรม

Cancel the current input, or exit

Ctrl + R

ค้นหาประวัติคำสั่ง (Reverse Search)

Reverse search through your prompt history

Ctrl + O

ดูประวัติการสนทนาแบบเต็มรูปแบบ

Expand to the verbose, full transcript view

↑ / ↓

เลื่อนดูประวัติคำสั่ง

Scroll through your prompt history

/

เปิดเมนูคำสั่ง

Open the command menu

?

แสดงปุ่มลัดสำหรับ Terminal

Show shortcuts for your current terminal

ทิปการใช้งาน

คุณสามารถพิมพ์ /help ใน Claude Code เมื่อไหร่ก็ได้เพื่อดูรายการคำสั่งทั้งหมด