degit
Skill này làm gì
Chỉ cách sao chép một template dự án hoặc ảnh chụp repository vào thư mục mới bằng degit, không kèm lịch sử git đầy đủ. Dành cho lập trình viên muốn bắt đầu dự án nhanh từ một template.
Khi nào nên dùng
- ✓Khi lập trình viên muốn bắt đầu dự án mới từ một template GitHub hoặc GitLab.
- ✓Khi lập trình viên muốn một bản sao repository mà không có lịch sử git.
- ✓Khi lập trình viên chỉ muốn một số file hoặc thư mục nhất định từ repository.
Liên kết skill
https://github.com/Rich-Harris/degit/blob/master/skills/degit/SKILL.mdSao 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
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tôi muốn bắt đầu một dự án mới từ một template khởi đầu trên GitHub. Hãy giúp tôi sao chép nó.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill đưa ra lệnh để sao chép ảnh chụp repository vào một thư mục, và giúp với nhánh cũng như thư mục con. Nó hoạt động với GitHub, GitLab, Bitbucket, Sourcehut và Gist.
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.
Help the user scaffold a project with degit. Use npx degit@latest unless they have installed degit globally.
Start with the smallest command that matches their request:
npx degit@latest user/repo
npx degit@latest user/repo my-project
npx degit@latest user/repo#branch my-project
Sources can be GitHub (user/repo, github:user/repo, or a GitHub URL), GitLab (gitlab:user/repo, a GitLab URL, or gitlab://host/user/repo), Bitbucket (bitbucket:user/repo or URL), Sourcehut (git.sr.ht/user/repo, SSH form, or URL), or Gist (https://gist.github.com/<id>, https://gist.github.com/<user>/<id>, git@gist.github.com:<id>.git, or ssh://git@gist.github.com/<id>). A #ref can name a branch, tag, or commit. A source may include a subdirectory path.
- The destination defaults to the current directory and must be empty. Do not suggest
--forceunless the user explicitly wants to overwrite its contents. - Use
--cacheto require a cached copy (no network). Without--cache, degit tries the network first and falls back to the cached copy if the network is unreachable. Use--verboseto diagnose failures.--mode=gitstill works but is unnecessary; tar snapshots are the default. - Use
--files <paths>or-F <paths>to clone only specific files or directories; separate multiple paths with commas or repeat the flag. - Private repositories are handled automatically, with SSH fallback when needed. SSH/private use requires
gitonPATHand working repository credentials. - For reusable shortcuts, use
degit alias <repo> <name>, thendegit <name>; usedegit lsanddegit unalias <name>to manage aliases. - If a template needs post-download changes, explain that its top-level
degit.jsoncan useclone,search_replace, andremoveactions.search_replaceuses a named environment variable for its replacement value. - A downloaded
degit.jsonruns automatically and is template-controlled. For untrusted templates, prefer--no-actionsto skip actions, or--allow-env <names>to limit which environment variablessearch_replacemay read.
If source, ref, destination, or whether the destination is empty is unknown, ask before giving a potentially destructive command.
Câu hỏi thường gặp
Bản sao có bao gồm lịch sử git không?
Không. Skill mô tả degit là sao chép một ảnh chụp, nên lịch sử không được đưa vào.
Tôi có thể chỉ sao chép một số file không?
Có. Skill giải thích cách chỉ sao chép các file hoặc thư mục cụ thể.
Tôi có thể dùng nó trong thư mục đã có file không?
Skill nói thư mục đích phải trống, và nó không gợi ý ghi đè bắt buộc trừ khi bạn thực sự muốn.
Chi tiết
Độ phổ biến
- Sao GitHub
- 8.0k
- Vị trí xếp hạng
- #12654
- Giấy phép
- MIT
- Cập nhật
- 21/10/2026
Bình luận
- …
Skill tương tự
diffs
394kGiúp agent của bạn tạo một diff có thể chia sẻ về các chỉnh sửa, dưới dạng liên kết xem hoặc file ảnh, thay vì một bản tóm tắt viết tay.
coding-agent
394kGiúp agent của bạn giao một việc lập trình lớn cho Codex, Claude Code hoặc OpenCode chạy nền, rồi theo dõi tiến độ của nó.
gh-issues
394kGiúp agent của bạn tìm issue trên GitHub, chọn những issue cần xử lý và mở pull request với bản sửa, kể cả theo dõi nhận xét đánh giá.