Chuyển đến nội dung
Skillpedia
Lập trình chung7.8k · #13090

verify-directory-structure

Skill này làm gì

Skill này cung cấp một phương pháp đơn giản để sửa lỗi truy cập file. Nó bắt đầu bằng việc kiểm tra thư mục, rồi thử lại tác vụ. Skill dành cho bất kỳ ai có agent không mở hoặc lưu được file ở nơi nó mong đợi.

Khi nào nên dùng

  • ✓Khi một script hoặc thao tác file thất bại vì có vẻ thư mục đã bị mất.
  • ✓Khi bạn nghi ngờ vấn đề quyền đang chặn việc đọc hoặc lưu file.
  • ✓Khi bạn muốn kiểm tra bố cục thư mục trước khi chạy một tác vụ.

Liên kết skill

https://github.com/HKUDS/AgentPilot/blob/main/openspace/legacy/v1/showcase/skills/verify-directory-structure/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/HKUDS/AgentPilot/blob/main/openspace/legacy/v1/showcase/skills/verify-directory-structure/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Bạn có thể kiểm tra xem thư mục tôi chỉ ra có tồn tại không, và sửa nếu không có không?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent liệt kê thư mục và nội dung của nó, tạo thư mục nếu bị thiếu hoặc sửa quyền truy cập, rồi thử lại bước ban đầu.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Verify Directory Structure

This skill provides a systematic approach to diagnosing and resolving file access issues by first verifying the directory structure. It is particularly useful when dealing with file operations, script executions, or any task that involves accessing files.

Steps

  1. Identify the Target Path: Determine the file or directory path that is causing the access issue.
  2. Check Directory Existence: Use the list_dir tool to verify if the directory exists and inspect its contents.
  3. Verify Permissions: Ensure that the user has the necessary permissions to access the directory and its contents.
  4. Resolve Path Issues: If the directory does not exist, create it using appropriate commands or scripts. If permissions are insufficient, adjust them accordingly.
  5. Retry the Operation: After resolving the directory structure issues, retry the original operation.

Example

# Example of using the list_dir tool to verify directory structure
list_dir --path "/path/to/directory"

Best Practices

  • Always verify the directory structure before performing file operations.
  • Use absolute paths to avoid ambiguity.
  • Log the directory structure for debugging purposes if issues persist.
Câu hỏi thường gặp

Nếu thư mục bị thiếu thì sao?

Skill yêu cầu tạo thư mục rồi thử lại thao tác.

Tôi có nên dùng đường dẫn đầy đủ không?

Có. Skill khuyên dùng đường dẫn tuyệt đối để tránh nhầm lẫn.

Nếu vấn đề vẫn tiếp diễn thì sao?

Skill gợi ý ghi lại nội dung thư mục để việc tìm nguyên nhân dễ hơn.

Chi tiết

Mô tả gốc của tác giả

Diagnose and resolve file access issues by first verifying the directory structure.

repo: HKUDS/AgentPilot

Độ phổ biến

Sao GitHub
7.8k
Vị trí xếp hạng
#13090
Giấy phép
MIT
Cập nhật
1/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự