Skills are pre-packaged workflows in Claude Code that allow you to perform complex tasks with a simple command. Each skill is a set of instructions and actions designed for a specific purpose.
Skills là các workflow được đóng gói sẵn trong Claude Code, cho phép bạn thực hiện các tác vụ phức tạp chỉ với một lệnh đơn giản. Mỗi skill là một tập hợp các hướng dẫn và hành động được thiết kế cho một mục đích cụ thể.
Instead of explaining every step in detail, you can invoke a skill and Claude will automatically execute the entire workflow. This saves time and ensures consistency.
Thay vì phải giải thích chi tiết mỗi bước, bạn có thể gọi một skill và Claude sẽ tự động thực hiện toàn bộ quy trình. Điều này giúp tiết kiệm thời gian và đảm bảo tính nhất quán.
Skills are invoked using slash commands with syntax /skill-name or using the full name. Some popular skills can be triggered by keywords.
Skills được gọi bằng slash command với cú pháp /skill-name hoặc sử dụng tên đầy đủ. Một số skill phổ biến có thể được kích hoạt bằng từ khóa.
1# Using slash command2/commit34# With arguments5/commit -m "fix: resolve login bug"67# Using full skill name8/oh-my-claudecode:autopilot build a REST API910# Keyword trigger (in normal conversation)11"autopilot create a todo app"The commit skill analyzes changes and creates commit messages following project conventions. It automatically determines the type of change (feat, fix, refactor, etc.) and writes clear descriptions.
Skill commit phân tích các thay đổi và tạo commit message theo quy ước của dự án. Nó tự động xác định loại thay đổi (feat, fix, refactor, etc.) và viết mô tả rõ ràng.
1# Auto-generate commit message2/commit34# With custom message5/commit -m "add user authentication"67# Commit specific files8/commit src/auth/Autopilot takes a brief idea and automatically executes the entire workflow: requirements analysis, design, planning, implementation, testing, and validation. This is the most powerful workflow for complex projects.
Autopilot nhận một ý tưởng ngắn gọn và tự động thực hiện toàn bộ quy trình: phân tích yêu cầu, thiết kế, lập kế hoạch, triển khai, testing và validation. Đây là workflow mạnh mẽ nhất cho các dự án phức tạp.
1# Start autopilot with a task2/autopilot create a blog system with posts and comments34# Autopilot will:5# 1. Analyze requirements6# 2. Create technical design7# 3. Plan implementation8# 4. Execute in parallel9# 5. Run QA cycles10# 6. Validate with reviewersAutopilot có thể chạy trong thời gian dài. Bạn có thể cancel bất kỳ lúc nào bằng /cancel và resume lại sau.
Ralph is a self-looping skill that continues until the task is complete. It keeps trying until the goal is achieved or the iteration limit is reached.
Ralph là skill tự lặp cho đến khi tác vụ hoàn thành. Nó tiếp tục cố gắng cho đến khi đạt được mục tiêu hoặc đạt giới hạn iteration.
1# Ralph for a specific task2/ralph fix all TypeScript errors in the project34# Ralph with verification5/ralph make all tests passThe plan skill helps you create detailed implementation plans before starting to code. It analyzes requirements, proposes architecture, and breaks down work into specific tasks.
Skill plan giúp bạn tạo kế hoạch triển khai chi tiết trước khi bắt đầu code. Nó phân tích yêu cầu, đề xuất kiến trúc và chia nhỏ công việc thành các task cụ thể.
1# Create a plan2/plan add authentication to the app34# Plan with interview mode (asks questions first)5/plan --interview redesign the database schemaYou can create your own skills to package commonly used workflows. Skills are defined in markdown files with frontmatter and instructions.
Bạn có thể tạo skill riêng để đóng gói các workflow thường dùng. Skill được định nghĩa trong file markdown với frontmatter và hướng dẫn.
1# .claude/skills/my-deploy.md2---3name: deploy4description: Deploy to production with safety checks5triggers:6 - deploy7 - ship it8---910# Deploy Skill1112## Steps131. Run all tests142. Build production bundle153. Run security scan164. Deploy to staging175. Run smoke tests186. Deploy to production197. Notify team on SlackClaude Code provides commands to manage skills: list, add, remove, and edit.
Claude Code cung cấp các lệnh để quản lý skills: liệt kê, thêm, xóa và chỉnh sửa.
1# List all available skills2/skill list34# Add a skill from marketplace5/skill add review-pr67# Remove a skill8/skill remove my-old-skill910# Edit a skill11/skill edit my-deploySome skills are automatically triggered when keywords are detected in your message. This makes the workflow more natural.
Một số skill được kích hoạt tự động khi phát hiện từ khóa trong tin nhắn của bạn. Điều này giúp workflow tự nhiên hơn.
1# These messages trigger skills automatically:2"autopilot create a dashboard" # → /autopilot3"ralph fix the bug" # → /ralph4"ulw run these tasks in parallel" # → /ultrawork5"deep interview this feature" # → /deep-interviewKey Takeaways
Điểm Chính
- Skills are pre-packaged workflows invoked with slash commandsSkills là workflow đóng gói sẵn được gọi bằng slash command
- Autopilot handles entire projects from idea to working codeAutopilot xử lý toàn bộ dự án từ ý tưởng đến code hoạt động
- You can create custom skills for your specific workflowsBạn có thể tạo skill tùy chỉnh cho workflow riêng
- Keywords can automatically trigger skillsTừ khóa có thể tự động kích hoạt skill
Practice
Test your understanding of this chapter
What is the purpose of the /autopilot skill?
Mục đích của skill /autopilot là gì?
Skills can only be invoked with slash commands.
Skills chỉ có thể được gọi bằng slash command.
Complete the command to create a commit with auto-generated message
Hoàn thành lệnh để tạo commit với message tự động
/Where are custom skills defined?
Skill tùy chỉnh được định nghĩa ở đâu?