Path Resolution
<skill-root> is the directory containing this SKILL.md. Resolve scripts/... relative to it, not the caller's current working directory.
GitHub Clone Workspace
Scope
Use this skill to clone a public GitHub repository into a temporary directory, then inspect it locally with read/search/bash tools.
Supported URLs:
https://github.com/owner/repohttps://github.com/owner/repo/tree/<ref>/<directory>
Unsupported URLs:
/blob/...file URLs- SSH URLs such as
git@github.com:owner/repo.git - non-GitHub hosts
Workflow
Run the bundled script:
python <skill-root>/scripts/github_clone_workspace.py 'https://github.com/owner/repo'Optional local clone directory name:
python <skill-root>/scripts/github_clone_workspace.py 'https://github.com/owner/repo/tree/main/packages/app' --directory-name repo-copyRead the printed
path:value.Use that absolute path for subsequent
Read,Grep,Glob, or read-onlyBashcommands such asfind/ls.Tell the user the workspace name/path you used.
When finished, run the printed cleanup command. If using
--json, remove the printedtempRootpath.
Behavior
The script:
- clones with
git clone --depth 1 --filter=blob:none --single-branch; - resolves
/tree/<ref>/<directory>refs usinggit ls-remote --heads --tags; - uses the tree subdirectory as the effective inspection path;
- rejects unsafe owner/repo/ref values and unsafe
--directory-namevalues; - rejects URL subpaths that escape the cloned repository or do not resolve to directories;
- times out git operations after 30 seconds;
- does not fetch submodules.
Error Handling
- If a
/blob/URL is provided, explain that file URLs are unsupported and ask for the repository URL or a/tree/<ref>/<directory>URL. - If
git ls-remoteorgit clonefails because the repository is private or inaccessible, tell the user this skill only supports public repositories unless their local git credentials already permit access. - If the script exits with an error, report the exact error and stop rather than guessing a path.