Claude Code đọc skill trong .claude/skills của dự án hoặc ~/.claude/skills của người dùng. Chọn đúng phạm vi giúp tránh việc một hướng dẫn riêng của dự án vô tình được áp dụng ở nơi khác.
Claude Code reads project skills from .claude/skills and personal skills from ~/.claude/skills. Choosing the right scope keeps project-specific workflows from appearing in unrelated work.
Trong bài nàyOn this page
1. Chọn nơi skill được sử dụng1. Choose where the skill applies
Dùng phạm vi dự án cho quy trình gắn với cấu trúc kho, lệnh test hoặc tiêu chuẩn của nhóm. Dùng phạm vi cá nhân cho kỹ năng bạn cần ở nhiều repository. Tệp trên máy không tự đồng bộ tới mọi phiên cloud hoặc ứng dụng Claude khác; kiểm tra môi trường thực sự chạy tác vụ.
Theo tài liệu Claude Code, cấu trúc là .claude/skills/ten-skill/SKILL.md. Đừng đặt trực tiếp mọi runbook vào .claude/skills/SKILL.md. Với monorepo, thư mục làm việc và phạm vi thư mục con cũng ảnh hưởng việc nạp skill.
Use project scope for repository-specific layouts, test commands and team standards. Use personal scope for workflows needed across repositories. Local files do not automatically reach every cloud session or other Claude application; check where the task actually runs.
The Claude Code documentation uses .claude/skills/skill-name/SKILL.md. Do not flatten multiple runbooks into .claude/skills/SKILL.md. Working directories and nested scopes also matter in monorepos.
2. Cài đủ tệp bằng CLI VAS2. Install the complete skill with VAS
Chuẩn bị Python 3.9+ và bản clone VAS. Chạy các lệnh sau từ gốc kho VAS, thay đường dẫn bằng dự án thật. Ví dụ dùng webapp-testing để có một tác vụ kiểm tra nhỏ sau khi cài.
Prepare Python 3.9+ and a VAS clone. Run these commands from the VAS root and replace the destination with your project. The example uses webapp-testing for a small verification task.
./vas show webapp-testing
./vas install webapp-testing --target claude --mode copy --dest "/absolute/path/to/project/.claude/skills"
./vas status --target claude --dest "/absolute/path/to/project/.claude/skills"
Đích cài là thư mục chứa các skill. CLI đặt runbook vào thư mục con đúng ID, giữ các tệp phụ trợ và receipt quản lý. Để cài cá nhân trong Bash/Zsh, chọn đích khác:
The destination contains skill folders. The CLI creates the individual skill directory, retains supporting files and records the installation. For personal scope in Bash/Zsh, choose a different destination:
./vas install webapp-testing --target claude --mode copy --dest "$HOME/.claude/skills"
./vas status --target claude --dest "$HOME/.claude/skills"
Chỉ chọn phạm vi cần dùng; hai nhóm lệnh trên là hai lựa chọn. copy phù hợp khi muốn bản cài độc lập. link tiện cho chỉnh sửa nguồn nhưng cần giữ clone tại chỗ. Trên Windows, có thể thay ./vas bằng python3 vas.py và dùng đường dẫn tuyệt đối phù hợp.
Nếu dùng website, mở skill, chọn Claude rồi xem prompt trước khi sao chép. Xác nhận thư mục đích và yêu cầu agent tải đủ inventory. Hướng dẫn cài tệp không đồng nghĩa với cho phép chạy scripts, cài runtime hoặc kết nối MCP.
Choose the required scope; the two command groups are alternatives. copy provides an independent installation. link helps when editing the source but requires that clone to remain in place. On Windows, use python3 vas.py and the appropriate absolute path.
For the website flow, open the skill, select Claude and inspect the prompt before copying it. Confirm its destination and ask the agent to fetch the complete inventory. Installing files does not authorize script execution, runtime installation or MCP connections.
3. Gọi skill rõ ràng trước khi dựa vào tự nhận diện3. Invoke explicitly before relying on automatic matching
Mở Claude Code trong đúng repository. Nếu skill mới chưa xuất hiện, mở phiên mới theo cách ứng dụng hỗ trợ. Với skill cho phép người dùng gọi, nhập /webapp-testing và yêu cầu lập kế hoạch trước. Tên lệnh lấy từ tên skill, không phải tiêu đề bài blog.
Claude cũng có thể chọn skill khi tác vụ khớp description. Các trường riêng của Claude như disable-model-invocation hoặc user-invocable có thể thay đổi cách gọi. Kiểm tra frontmatter nếu một skill có tệp đầy đủ nhưng không xuất hiện như mong đợi.
Open Claude Code in the intended repository. Start a new session using the supported application flow if a newly installed skill is absent. For a user-invocable skill, enter /webapp-testing and request a plan first. The command name comes from the skill, not the blog title.
Claude can also match a task against the skill description. Claude-specific frontmatter such as disable-model-invocation or user-invocable changes invocation behavior. Inspect these fields when the files exist but discovery does not match your expectations.
/webapp-testing
Lập kế hoạch kiểm tra trang chủ tại http://127.0.0.1:3000.
Đọc runbook và báo các công cụ còn thiếu.
Chưa sửa mã nguồn hoặc cài thêm dependency.
Sau khi thống nhất phạm vi, kiểm tra điều hướng và lưu bằng chứng lỗi.
/webapp-testing
Plan checks for the homepage at http://127.0.0.1:3000.
Read the runbook and report missing tools.
Do not modify source or install dependencies yet.
Once scope is agreed, check navigation and record evidence of failures.
Kiểm tra ba kết quả riêng: đúng thư mục, đúng runbook được đọc và tác vụ chạy được trong môi trường thực. Nếu Playwright chưa có, agent nên báo thiếu công cụ thay vì kết luận website đã được kiểm thử.
Check three separate outcomes: the correct folder, the intended runbook being read and a task that runs in the actual environment. If Playwright is absent, the agent should report that prerequisite instead of claiming the website was tested.
4. Giữ bản cài có thể quản lý4. Keep the installation manageable
Trước khi cập nhật, xem thay đổi nguồn và giữ lại chỉnh sửa cục bộ. Không xóa receipt để bỏ qua xung đột. Khi gỡ bản do CLI quản lý, dùng cùng target và đích ban đầu:
Review source changes and preserve local edits before updating. Do not delete receipts to bypass conflicts. Remove a CLI-managed copy using its original target and destination:
./vas uninstall webapp-testing --target claude --dest "/absolute/path/to/project/.claude/skills"
Nếu vẫn không thấy skill, dùng checklist kiểm tra discovery. Quy tắc dự án lâu dài của Claude Code nên nằm trong cơ chế CLAUDE.md và cấu hình Claude; xem thêm cách phân biệt hướng dẫn dự án, skill và MCP.
If discovery still fails, use the troubleshooting checklist. Persistent Claude Code project instructions belong in its CLAUDE.md and configuration mechanisms; compare project instructions, skills and MCP.