clonedeps
Skill này làm gì
Skill này sao chép mã nguồn của các thư viện phụ thuộc quan trọng vào một thư mục cục bộ mà dự án bỏ qua. Skill dành cho developer cần hiểu một thư viện hoạt động bên trong như thế nào.
Khi nào nên dùng
- ✓Khi bạn cần hiểu một thư viện hoặc SDK hoạt động ra sao từ mã nguồn của nó.
- ✓Khi một lỗi phụ thuộc vào hành vi bên trong của thư viện mà tài liệu không giải thích.
- ✓Khi bạn muốn các kho phụ thuộc cốt lõi có thể đọc được ở máy cục bộ cho một dự án đang phát triển.
Liên kết skill
https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/skills/clonedeps/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
“Sao chép mã nguồn của các thư viện chính mà dự án này dùng để bạn giải thích cách chúng xử lý việc thử lại.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill trước tiên kiểm tra danh sách kho đã sao chép và dùng lại những gì còn hữu ích. Sau đó skill chọn các phụ thuộc quan trọng cho công việc rồi mới sao chép.
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.
Clonedeps Skill
You help users make a small set of important dependency source repositories locally readable to OpenCode.
This is a workflow skill, not a command wrapper. Do not use a helper script for
dependency detection, ref validation, cloning, status, or cleanup. The
orchestrator and @explorer do the repo-specific thinking; the orchestrator
performs the approved filesystem/git operations directly.
Workflow
Step 1: Check Existing State
First check whether .slim/clonedeps.json exists.
If it exists:
- Read it before asking explorer for a new plan.
- Check whether each listed
pathexists under.slim/clonedeps/repos/. - Reuse existing cloned repos when they already satisfy the user's task.
- Only ask explorer for new recommendations if the existing manifest is missing, stale, or insufficient for the current task.
Do not rescan/re-plan from scratch when the manifest already has useful entries.
Step 2: Ask Explorer for the Clone Plan
Delegate dependency discovery and source resolution to @explorer.
Use this prompt:
Understand this project first, then recommend remote source repos that would
help a developer work on it.
Read enough of the current repo to understand:
- what the project does
- its main architecture
- the important integration points
- what external systems or libraries it depends on in practice
Think like a developer trying to debug or extend this project.
Which remote repositories, if cloned locally, would actually help understand the
codebase or solve likely implementation/debugging tasks?
Do not make a dependency dump. Most dependencies are not worth cloning.
Recommend a repo only when its source code would be more useful than docs or the
current repo alone.
For each recommendation, include:
- repo name
- repo URL
- suggested ref/tag/commit if known
- why cloning this source would help
- when it would be useful
- caveats
Also include:
- current-repo files/folders to inspect first
- repos/dependencies you considered but would not clone
Keep it small. Prefer 0–3 strong recommendations over 5 weak ones. If nothing
clearly needs cloning, say so.
Explorer should return a small plan with:
- dependency name;
- current version/range if discoverable;
- official source repository URL;
- tag/commit/ref to check out;
- package subdirectory if the source is a monorepo;
- reason local source helps;
- caveats such as huge repo, missing tag, or uncertain version mapping.
Prefer at most 3-5 core dependencies. Include user-mentioned dependencies and central frameworks, SDKs, ORMs, runtime/plugin APIs, or build/runtime tools. Do not clone tiny utilities, transitive dependencies, or dev-only tools unless they are directly relevant to the active task.
Step 3: Verify and Confirm the Plan
The orchestrator owns final approval. Before cloning:
- Verify refs manually where possible with
git ls-remote. - Prefer pinned tags or commit SHAs. If no exact tag exists, ask explorer to find the correct module-specific tag/commit or explain the fallback.
- Only use HTTPS GitHub/GitLab-style repository URLs by default. Reject
file://, SSH URLs, local paths, URLs with embedded credentials, and private or auth-required repositories unless the user explicitly approves that case. - Present the plan to the user with dependency, repo URL, ref, reason, and caveats.
- Ask for confirmation before network cloning unless the user explicitly asked to clone immediately.
Step 4: Update Ignore Files
Before cloning artifacts or cleaning cloned dependencies, inspect existing
.gitignore and .ignore. Update the managed block in place when present;
otherwise append it. Add only the missing exact lines below, never duplicate
entries or modify unrelated rules. These blocks keep cloned artifacts git-local
while the .ignore allowlist keeps them readable to OpenCode.
.gitignore:
# BEGIN oh-my-opencode-slim clonedeps
.slim/clonedeps/repos/
# END oh-my-opencode-slim clonedeps
.ignore:
# BEGIN oh-my-opencode-slim clonedeps
!.slim/
!.slim/clonedeps.json
!.slim/clonedeps/
!.slim/clonedeps/repos/
!.slim/clonedeps/repos/**
.slim/clonedeps/repos/**/.git/
.slim/clonedeps/repos/**/.git/**
# END oh-my-opencode-slim clonedeps
Step 5: Clone Sources Manually
Create one folder per source repository under:
.slim/clonedeps/repos/<safe-repo-name>/
Derive the safe name from the repository owner/name, not from the package
Câu hỏi thường gặp
Các kho đã sao chép được lưu ở đâu?
Trong một thư mục bên trong thư mục .slim của dự án, mà dự án bỏ qua.
Khi nào không nên dùng?
Với các câu hỏi thông thường về API hoặc tài liệu, khi đọc tài liệu là đủ.
Skill có dùng lại các bản sao cũ không?
Có. Nếu danh sách hiện có có kho hữu ích, skill sẽ dùng chúng thay vì bắt đầu lại từ đầu.
Chi tiết
Mô tả gốc của tác giả
Clone important project dependency source code into an ignored local workspace so OpenCode can inspect library internals. Use when the user asks to clone dependencies, inspect dependency/source internals, understand SDK/framework behavior from source, debug library implementation details, or make core dependency repos locally readable. Do not use for ordinary API/docs questions where @explorer is enough.
Độ phổ biến
- Sao GitHub
- 10k
- Vị trí xếp hạng
- #12011
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
cli-review
10kGiúp agent của bạn chạy đánh giá code Greptile trên nhánh hiện tại trước khi bạn mở pull request, rồi tóm tắt các phát hiện bằng lời đơn giản.
ai-estimates
10kGiúp agent của bạn ước tính thời gian làm việc khi có AI hỗ trợ, tách phần AI làm nhanh khỏi phần chờ đợi do con người hoặc bên ngoài gây ra.
codemap
10kTạo bản đồ có cấu trúc cho dự án code lạ, giúp agent tìm nhanh các phần chính. Nên dùng khi bạn yêu cầu bản đồ code.
deanchor
10kGiúp agent của bạn học từ các ví dụ mà không sao chép chúng, bằng cách tìm nguyên tắc chung phía sau chúng rồi viết nội dung mới theo nguyên tắc đó.
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á.