Clone external repositories into work/ directory for examination and source code research. Use when needing to understand third-party dependency implementations, debug upstream issues, or research API usage patterns. (project)
Clone external repositories into the work/ directory for examination without affecting the main repository. This workflow enables source code research, dependency exploration, and upstream debugging while keeping external code isolated and gitignored.
Use this skill when:
Determine the Git URL for the repository to examine. Common sources:
https://github.com/owner/repohttps://gitlab.com/owner/repoUse jj git clone to clone the repository into work/:
jj git clone <repository-url> work/<descriptive-name>
Examples:
# Clone tokio to understand async runtime internals
jj git clone https://github.com/tokio-rs/tokio work/tokio
# Clone serde to examine serialization implementation
jj git clone https://github.com/serde-rs/serde work/serde
# Clone Buck2 to understand build system behavior
jj git clone https://github.com/facebook/buck2 work/buck2
Important: The clone is completely isolated from the main repository's history. It's stored under work/ which is gitignored, so it won't affect version control.
Navigate into the cloned directory and use standard tools:
cd work/<repo-name>
# Search for specific functions or patterns
rg "pattern" .
# Read specific files
cat path/to/file
# Explore directory structure
tree -L 2
Alternatively, use absolute paths from the repository root:
# Search without changing directory
rg "pattern" work/<repo-name>
# Read files using absolute paths
cat work/<repo-name>/path/to/file
Remove the cloned repository when the examination is complete:
rm -rf work/<repo-name>
The repository is not tracked by version control, so deletion won't affect the main repository.
Choose clear directory names that indicate the purpose:
work/tokio - Good: immediately clear what it containswork/async-research - Better if examining multiple async librarieswork/temp - Poor: unclear purposePrefer absolute paths from the repository root over changing directories:
# Preferred: stay in repo root
rg "Runtime::new" work/tokio/tokio/src
# Alternative: change directory
cd work/tokio && rg "Runtime::new" tokio/src
Use Read, Grep, and Glob tools to examine cloned code efficiently:
When examining third-party code to solve a problem, document key findings before cleanup:
work/ until manually deletedjj-graft-third-party skill insteadjj-graft-third-party - For integrating third-party repos to test patchesjj-workspace-experiments - For creating isolated workspaces to test changesnpx skills add thoughtpolice/jj-clone-third-party下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer