Skip to content
Skillpedia
General coding10k · #12011

clonedeps

What it does

This skill copies the source code of important dependency libraries into a local folder that the project ignores. It is for developers who need to understand how a library works internally.

When to use it

  • ✓When you need to understand how a library or SDK works from its source code.
  • ✓When a bug depends on internal library behavior that the documentation does not explain.
  • ✓When you want the core dependency repositories readable locally for an ongoing project.

Skill link

https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/skills/clonedeps/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/skills/clonedeps/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Copy the source code of the main libraries this project depends on so you can explain how they handle retries.”

5 new skills a week. 1 minute to read.

How it works

The skill first checks any existing list of cloned repositories and reuses what already works. It then picks which dependencies matter for the task before cloning them.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

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:

  1. Read it before asking explorer for a new plan.
  2. Check whether each listed path exists under .slim/clonedeps/repos/.
  3. Reuse existing cloned repos when they already satisfy the user's task.
  4. 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:

  1. Verify refs manually where possible with git ls-remote.
  2. 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.
  3. 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.
  4. Present the plan to the user with dependency, repo URL, ref, reason, and caveats.
  5. 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

FAQ

Where are the cloned repositories stored?

In a local folder inside the project's .slim directory, which the project ignores.

When should I not use it?

For ordinary API or documentation questions, where reading the docs is enough.

Does it reuse earlier clones?

Yes. If the existing list has useful repositories, the skill uses them instead of starting over.

Details

Original description by the author

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.

repo: alvinunreal/oh-my-opencode-slim

Popularity

GitHub stars
10k
Ranking position
#12011
License
MIT
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills