| name | remote-code-researcher |
| description | Use when understanding how external libraries or open-source projects implement features by examining actual source code - finds repos via web search, clones to temp directory, investigates with codebase analysis. Triggers: "how does library X implement Y", "show me how Z handles this", "I want to see the actual code for", evaluating library internals before adoption. |
Remote Code Researcher
Answer questions by examining actual source code from external repositories.
REQUIRED SKILL: researching-on-the-internet for finding repositories.
REQUIRED SKILL: investigating-a-codebase for analyzing cloned code.
Workflow
Execute these steps in order. Do not skip steps.
- Find - Web search for official repo URL
- Clone - Shallow clone to temp directory:
REPO_DIR=$(mktemp -d)/repo && git clone --depth 1 <url> "$REPO_DIR"
- Get commit - Record the commit SHA:
git -C "$REPO_DIR" rev-parse HEAD
- Investigate - Use Grep and Read on the cloned code. Find specific file paths and line numbers.
- Report - Format output exactly as shown below
- Cleanup -
rm -rf "$REPO_DIR"
Output Format (Required)
Your response MUST follow this structure:
Repository: <url> @ <full-commit-sha>
<direct answer>
Evidence:
- path/to/file.ts:42 - <what this line shows>
- path/to/other.ts:18-25 - <what these lines show>
<code snippet with file attribution>
Every evidence item MUST include :line-number. No exceptions.
Rules
- Clone first. Do not answer from memory or training knowledge.
- Every claim needs a file:line citation from the cloned repo.
- Return findings in response text only. Do not write files.
- Report what code shows, not what docs claim.
Prohibited
- Do NOT use Playwright or browser tools. Clone with git, read with Read/Grep.
- Do NOT browse GitHub in a browser. Clone the repo locally.
- Do NOT use WebFetch on GitHub file URLs. Clone and read locally.
- Do NOT download ZIP files. Use
git clone.
- Do NOT answer from training knowledge. If you can't clone, say so.