Claude Code: คู่มือ Commands

🇹🇭 Thai claude-codecommandsreferencethai
📋 Table of Contents (17 sections)
  1. คู่มือ Commands
  2. ภาพรวม
  3. Git & Version Control
  4. Code Quality
  5. Session & Context
  6. Configuration & Settings
  7. Memory & Knowledge
  8. MCP & Plugins
  9. Authentication
  10. Tasks & Agents
  11. Diagnostics & Status
  12. Installation & Setup
  13. IDE & Desktop Integration
  14. Remote & Environment
  15. เบ็ดเตล็ด
  16. Internal / Debug Commands
  17. ดูเพิ่มเติม

คู่มือ Commands

Catalog ครบถ้วนของ slash commands ทั้งหมดใน Claude Code


ภาพรวม

Commands คือ actions ที่ user เรียกใช้ผ่านคำนำหน้า / ใน REPL (เช่น /commit, /review) อยู่ใน src/commands/ และลงทะเบียนใน src/commands.ts

ประเภทของ Command

ประเภทคำอธิบายตัวอย่าง
PromptCommandส่ง prompt ที่จัดรูปแบบไปยัง LLM พร้อม tools ที่ inject/review, /commit
LocalCommandทำงานใน-process คืนค่า plain text/cost, /version
LocalJSXCommandทำงานใน-process คืนค่า React JSX/install, /doctor

รูปแบบการนิยาม Command

const command = {
  type: 'prompt',
  name: 'my-command',
  description: 'สิ่งที่ command นี้ทำ',
  progressMessage: 'กำลังดำเนินการ...',
  allowedTools: ['Bash(git *)', 'FileRead(*)'],
  source: 'builtin',
  async getPromptForCommand(args, context) {
    return [{ type: 'text', text: '...' }]
  },
} satisfies Command

Git & Version Control

CommandSourceคำอธิบาย
/commitcommit.tsสร้าง git commit พร้อม message ที่ AI สร้างให้
/commit-push-prcommit-push-pr.tsCommit, push และสร้าง PR ในขั้นตอนเดียว
/branchbranch/สร้างหรือสลับ git branches
/diffdiff/ดูการเปลี่ยนแปลงไฟล์ (staged, unstaged หรือเทียบกับ ref)
/pr_commentspr_comments/ดูและแก้ไข PR review comments
/rewindrewind/ย้อนกลับไปยังสถานะก่อนหน้า

Code Quality

CommandSourceคำอธิบาย
/reviewreview.tsCode review ด้วย AI สำหรับ staged/unstaged changes
/security-reviewsecurity-review.tsCode review เน้นด้านความปลอดภัย
/advisoradvisor.tsรับคำแนะนำด้าน architecture หรือ design
/bughunterbughunter/ค้นหาบัคที่อาจเกิดขึ้นใน codebase

Session & Context

CommandSourceคำอธิบาย
/compactcompact/บีบอัด conversation context เพื่อรองรับ history มากขึ้น
/contextcontext/แสดง context ปัจจุบัน (files, memory ฯลฯ)
/resumeresume/กู้คืน conversation session ก่อนหน้า
/sessionsession/จัดการ sessions (list, switch, delete)
/shareshare/แชร์ session ผ่าน link
/exportexport/Export conversation ไปยังไฟล์
/summarysummary/สร้างสรุปของ session ปัจจุบัน
/clearclear/ล้าง conversation history

Configuration & Settings

CommandSourceคำอธิบาย
/configconfig/ดูหรือแก้ไข Claude Code settings
/permissionspermissions/จัดการ tool permission rules
/themetheme/เปลี่ยน terminal color theme
/output-styleoutput-style/เปลี่ยนรูปแบบการแสดงผล output
/colorcolor/สลับการแสดงสี
/keybindingskeybindings/ดูหรือปรับแต่ง keybindings
/vimvim/สลับ vim mode สำหรับ input
/efforteffort/ปรับระดับความพยายามในการตอบ
/modelmodel/เปลี่ยน model ที่ใช้งานอยู่
/privacy-settingsprivacy-settings/จัดการการตั้งค่า privacy/ข้อมูล
/fastfast/สลับ fast mode (การตอบที่สั้นกว่า)
/briefbrief.tsสลับโหมด brief output

Memory & Knowledge

CommandSourceคำอธิบาย
/memorymemory/จัดการ persistent memory (CLAUDE.md files)
/add-diradd-dir/เพิ่ม directory เข้าใน project context
/filesfiles/แสดงไฟล์ใน context ปัจจุบัน

MCP & Plugins

CommandSourceคำอธิบาย
/mcpmcp/จัดการ MCP server connections
/pluginplugin/ติดตั้ง ลบ หรือจัดการ plugins
/reload-pluginsreload-plugins/โหลด plugins ที่ติดตั้งทั้งหมดใหม่
/skillsskills/ดูและจัดการ skills

Authentication

CommandSourceคำอธิบาย
/loginlogin/ยืนยันตัวตนกับ Anthropic
/logoutlogout/ออกจากระบบ
/oauth-refreshoauth-refresh/รีเฟรช OAuth tokens

Tasks & Agents

CommandSourceคำอธิบาย
/taskstasks/จัดการ background tasks
/agentsagents/จัดการ sub-agents
/ultraplanultraplan.tsxสร้าง execution plan ที่ละเอียด
/planplan/เข้าสู่ planning mode

Diagnostics & Status

CommandSourceคำอธิบาย
/doctordoctor/ทำการตรวจสอบ environment
/statusstatus/แสดงสถานะระบบและ session
/statsstats/แสดงสถิติ session
/costcost/แสดง token usage และค่าใช้จ่ายโดยประมาณ
/versionversion.tsแสดงเวอร์ชัน Claude Code
/usageusage/แสดงรายละเอียด API usage
/extra-usageextra-usage/แสดงรายละเอียด usage เพิ่มเติม
/rate-limit-optionsrate-limit-options/ดูการตั้งค่า rate limit

Installation & Setup

CommandSourceคำอธิบาย
/installinstall.tsxติดตั้งหรืออัปเดต Claude Code
/upgradeupgrade/อัปเกรดเป็นเวอร์ชันล่าสุด
/initinit.tsเริ่มต้น project (สร้าง CLAUDE.md)
/init-verifiersinit-verifiers.tsตั้งค่า verifier hooks
/onboardingonboarding/เรียกใช้ setup wizard ครั้งแรก
/terminalSetupterminalSetup/ตั้งค่า terminal integration

IDE & Desktop Integration

CommandSourceคำอธิบาย
/bridgebridge/จัดการ IDE bridge connections
/bridge-kickbridge-kick.tsบังคับ restart IDE bridge
/ideide/เปิดใน IDE
/desktopdesktop/ส่งต่อไปยัง desktop app
/mobilemobile/ส่งต่อไปยัง mobile app
/teleportteleport/ย้าย session ไปยังอุปกรณ์อื่น

Remote & Environment

CommandSourceคำอธิบาย
/remote-envremote-env/ตั้งค่า remote environment
/remote-setupremote-setup/ตั้งค่า remote session
/envenv/ดู environment variables
/sandbox-togglesandbox-toggle/สลับ sandbox mode

เบ็ดเตล็ด

CommandSourceคำอธิบาย
/helphelp/แสดงความช่วยเหลือและ commands ที่มี
/exitexit/ออกจาก Claude Code
/copycopy/คัดลอกเนื้อหาไปยัง clipboard
/feedbackfeedback/ส่ง feedback ไปยัง Anthropic
/release-notesrelease-notes/ดู release notes
/renamerename/เปลี่ยนชื่อ session ปัจจุบัน
/tagtag/แท็ก session ปัจจุบัน
/insightsinsights.tsแสดง codebase insights
/stickersstickers/Easter egg — stickers
/good-claudegood-claude/Easter egg — ชมเชย Claude
/voicevoice/สลับโหมด voice input
/chromechrome/Chrome extension integration
/issueissue/ยื่น GitHub issue
/statuslinestatusline.tsxปรับแต่ง status line
/thinkbackthinkback/เล่นซ้ำกระบวนการคิดของ Claude
/thinkback-playthinkback-play/เล่นซ้ำการคิดแบบ animated
/passespasses/Multi-pass execution
/x402x402/x402 payment protocol integration

Internal / Debug Commands

CommandSourceคำอธิบาย
/ant-traceant-trace/Anthropic-internal tracing
/autofix-prautofix-pr/แก้ไข PR issues อัตโนมัติ
/backfill-sessionsbackfill-sessions/Backfill session data
/break-cachebreak-cache/ทำให้ cache ไม่ valid
/btwbtw/การขัดจังหวะ “By the way”
/ctx_vizctx_viz/Context visualization (debug)
/debug-tool-calldebug-tool-call/Debug tool call เฉพาะ
/heapdumpheapdump/Dump heap สำหรับวิเคราะห์ memory
/hookshooks/จัดการ hook scripts
/mock-limitsmock-limits/Mock rate limits สำหรับทดสอบ
/perf-issueperf-issue/รายงานปัญหาด้าน performance
/reset-limitsreset-limits/Reset rate limit counters

ดูเพิ่มเติม

  • Architecture — วิธีที่ command system ใช้งานร่วมกับ pipeline
  • Tools Reference — Agent tools (ต่างจาก slash commands)
  • Exploration Guide — การค้นหา source code ของ command
← Back to claudecodeanalysis