{"id":"418020f6-7655-426a-adce-37612c8fd32b","shortId":"SXkYj2","kind":"skill","title":"repo-explorer","tagline":"Explore and analyze any repository (local path or remote GitHub/GitLab URL) by delegating to Claude Code CLI (`claude -p`) in non-interactive mode with read-only access. Use when the user asks to explore, analyze, investigate, or research a repository or codebase. Triggers on \"ex","description":"# Repo Explorer\n\nLaunch a separate Claude Code CLI process (`claude -p --model haiku`) with read-only\ntools to explore a repository and answer questions about it. Supports both local\nrepositories and remote URLs.\n\n## Workflow\n\n### 1. Determine repo source and question\n\nFrom the user's message extract:\n\n- **source**: one of:\n  - **local path** (`~/projects/foo`, `/opt/services/bar`, `.` or omitted = cwd)\n  - **remote URL** (`https://github.com/owner/repo`, `git@github.com:owner/repo.git`)\n  - **shorthand** (`owner/repo` — treat as `https://github.com/owner/repo`)\n- **question**: what to find out about the repository.\n\n### 2. For remote repos — clone to temp directory\n\nIf the source is a remote URL or shorthand, clone it first:\n\n```bash\nREPO_DIR=$(mktemp -d) && git clone --depth 1 <url> \"$REPO_DIR\" && echo \"$REPO_DIR\"\n```\n\n- Use `--depth 1` for speed (shallow clone, only latest commit)\n- If the user asks about a specific branch/tag: `git clone --depth 1 --branch <ref> <url> \"$REPO_DIR\"`\n- Store `$REPO_DIR` to clean up later\n\n### 3. Run the CLI command\n\nUse the Bash tool with **timeout: 600000** (10 min) since exploration of large repos\ncan take several minutes.\n\n```\ncd <repo_path> && CLAUDECODE= claude -p \"<question>\" \\\n  --model haiku \\\n  --output-format text \\\n  --max-turns 15 \\\n  --allowedTools \"Read\" \"Grep\" \"Glob\" \"Bash(find *)\" \"Bash(ls *)\" \"Bash(wc *)\" \"Bash(git log *)\" \"Bash(git show *)\" \"Bash(git diff *)\" \"Bash(git branch *)\" \"Bash(head *)\" \"Bash(tail *)\" \\\n  --append-system-prompt \"You are a code exploration expert. Thoroughly explore the repository to answer the user's question. Strategy: 1) Glob to discover project structure. 2) Grep to find patterns, definitions, routes, classes. 3) Read to examine key files. Always cite file paths and line numbers. Give a structured answer based on code facts.\"\n```\n\n**IMPORTANT:** The `CLAUDECODE=` prefix (setting the env var to empty) is required to allow\nlaunching Claude Code as a subprocess. Without it, the nested session will be blocked.\n\nRules:\n- **Always** include `CLAUDECODE=` directly before `claude -p` (no `&&`, it's an inline env override)\n- Escape double quotes in the question with `\\\"`\n- Wrap repo paths containing spaces in quotes\n- For very large repos, increase `--max-turns` to 25\n- If user explicitly requests sonnet or opus, replace `--model haiku`\n\n### 4. Clean up (remote repos only)\n\nAfter presenting the result, remove the temp directory:\n\n```bash\nrm -rf \"$REPO_DIR\"\n```\n\n### 5. Present the result\n\nDisplay the CLI output to the user. If empty or error, report the issue and suggest\nretrying with a more specific question.\n\n## Examples\n\n**Local repo:**\n```\ncd ~/projects/my-api && CLAUDECODE= claude -p \"What REST endpoints are defined? List each with HTTP method, path, and handler.\" --model haiku --output-format text --max-turns 15 --allowedTools \"Read\" \"Grep\" \"Glob\" \"Bash(find *)\" \"Bash(ls *)\" \"Bash(wc *)\" \"Bash(git log *)\" \"Bash(git show *)\" \"Bash(git diff *)\" \"Bash(git branch *)\" \"Bash(head *)\" \"Bash(tail *)\" --append-system-prompt \"You are a code exploration expert. Thoroughly explore the repository to answer the user's question. Strategy: 1) Glob to discover project structure. 2) Grep to find patterns, definitions, routes, classes. 3) Read to examine key files. Always cite file paths and line numbers. Give a structured answer based on code facts.\"\n```\n\n**Remote repo (GitHub URL):**\n```bash\nREPO_DIR=$(mktemp -d) && git clone --depth 1 https://github.com/expressjs/express \"$REPO_DIR\"\n```\nThen:\n```\ncd \"$REPO_DIR\" && CLAUDECODE= claude -p \"How is routing implemented? Describe the Router class and middleware chain.\" --model haiku --output-format text --max-turns 15 --allowedTools \"Read\" \"Grep\" \"Glob\" \"Bash(find *)\" \"Bash(ls *)\" \"Bash(wc *)\" \"Bash(git log *)\" \"Bash(git show *)\" \"Bash(git diff *)\" \"Bash(git branch *)\" \"Bash(head *)\" \"Bash(tail *)\" --append-system-prompt \"You are a code exploration expert. Thoroughly explore the repository to answer the user's question. Strategy: 1) Glob to discover project structure. 2) Grep to find patterns, definitions, routes, classes. 3) Read to examine key files. Always cite file paths and line numbers. Give a structured answer based on code facts.\"\n```\nThen: `rm -rf \"$REPO_DIR\"`\n\n**Shorthand (owner/repo):** treat `vercel/next.js` as `https://github.com/vercel/next.js`.\n\n**Current directory (no path):** run `claude -p` without `cd`.","tags":["repo","explorer","driven","development","codealive-ai","agent-safety","agent-skills","ai-coding","ai-driven-development","ai-safety","antigravity","bash"],"capabilities":["skill","source-codealive-ai","skill-repo-explorer","topic-agent-safety","topic-agent-skills","topic-ai-coding","topic-ai-driven-development","topic-ai-safety","topic-antigravity","topic-bash","topic-claude-code","topic-codex-cli","topic-cursor","topic-developer-tools","topic-gemini-cli"],"categories":["ai-driven-development"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/CodeAlive-AI/ai-driven-development/repo-explorer","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add CodeAlive-AI/ai-driven-development","source_repo":"https://github.com/CodeAlive-AI/ai-driven-development","install_from":"skills.sh"}},"qualityScore":"0.483","qualityRationale":"deterministic score 0.48 from registry signals: · indexed on github topic:agent-skills · 67 github stars · SKILL.md body (4,406 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T18:57:07.425Z","embedding":null,"createdAt":"2026-05-04T06:56:23.701Z","updatedAt":"2026-05-18T18:57:07.425Z","lastSeenAt":"2026-05-18T18:57:07.425Z","tsv":"'/expressjs/express':565 '/opt/services/bar':104 '/owner/repo':112,121 '/projects/foo':103 '/projects/my-api':441 '/vercel/next.js':690 '1':86,158,166,185,280,515,562,643 '10':208 '15':232,467,595 '2':130,286,521,649 '25':381 '3':196,294,529,657 '4':392 '5':411 '600000':207 'access':32 'allow':328 'allowedtool':233,468,596 'alway':300,344,535,663 'analyz':6,40 'answer':74,274,310,509,545,637,673 'append':260,495,623 'append-system-prompt':259,494,622 'ask':37,177 'base':311,546,674 'bash':150,203,237,239,241,243,246,249,252,255,257,406,472,474,476,478,481,484,487,490,492,554,600,602,604,606,609,612,615,618,620 'block':342 'branch':186,254,489,617 'branch/tag':181 'cd':219,440,569,699 'chain':585 'cite':301,536,664 'class':293,528,582,656 'claud':18,21,56,60,221,330,349,443,573,696 'claudecod':220,317,346,442,572 'clean':193,393 'cli':20,58,199,417 'clone':134,147,156,170,183,560 'code':19,57,266,313,331,501,548,629,676 'codebas':47 'command':200 'commit':173 'contain':368 'current':691 'cwd':107 'd':154,558 'defin':449 'definit':291,526,654 'deleg':16 'depth':157,165,184,561 'describ':579 'determin':87 'diff':251,486,614 'dir':152,160,163,188,191,410,556,567,571,682 'direct':347 'directori':137,405,692 'discov':283,518,646 'display':415 'doubl':359 'echo':161 'empti':324,423 'endpoint':447 'env':321,356 'error':425 'escap':358 'ex':50 'examin':297,532,660 'exampl':437 'expert':268,503,631 'explicit':384 'explor':3,4,39,52,70,211,267,270,502,505,630,633 'extract':97 'fact':314,549,677 'file':299,302,534,537,662,665 'find':125,238,289,473,524,601,652 'first':149 'format':227,462,590 'git':155,182,244,247,250,253,479,482,485,488,559,607,610,613,616 'git@github.com':113 'github':552 'github.com':111,120,564,689 'github.com/expressjs/express':563 'github.com/owner/repo':110,119 'github.com/vercel/next.js':688 'github/gitlab':13 'give':307,542,670 'glob':236,281,471,516,599,644 'grep':235,287,470,522,598,650 'haiku':63,224,391,459,587 'handler':457 'head':256,491,619 'http':453 'implement':578 'import':315 'includ':345 'increas':376 'inlin':355 'interact':26 'investig':41 'issu':428 'key':298,533,661 'larg':213,374 'later':195 'latest':172 'launch':53,329 'line':305,540,668 'list':450 'local':9,80,101,438 'log':245,480,608 'ls':240,475,603 'max':230,378,465,593 'max-turn':229,377,464,592 'messag':96 'method':454 'middlewar':584 'min':209 'minut':218 'mktemp':153,557 'mode':27 'model':62,223,390,458,586 'nest':338 'non':25 'non-interact':24 'number':306,541,669 'omit':106 'one':99 'opus':388 'output':226,418,461,589 'output-format':225,460,588 'overrid':357 'owner/repo':116,684 'owner/repo.git':114 'p':22,61,222,350,444,574,697 'path':10,102,303,367,455,538,666,694 'pattern':290,525,653 'prefix':318 'present':399,412 'process':59 'project':284,519,647 'prompt':262,497,625 'question':75,91,122,278,363,436,513,641 'quot':360,371 'read':30,66,234,295,469,530,597,658 'read-on':29,65 'remot':12,83,108,132,143,395,550 'remov':402 'replac':389 'repo':2,51,88,133,151,159,162,187,190,214,366,375,396,409,439,551,555,566,570,681 'repo-explor':1 'report':426 'repositori':8,45,72,81,129,272,507,635 'request':385 'requir':326 'research':43 'rest':446 'result':401,414 'retri':431 'rf':408,680 'rm':407,679 'rout':292,527,577,655 'router':581 'rule':343 'run':197,695 'separ':55 'session':339 'set':319 'sever':217 'shallow':169 'shorthand':115,146,683 'show':248,483,611 'sinc':210 'skill' 'skill-repo-explorer' 'sonnet':386 'sourc':89,98,140 'source-codealive-ai' 'space':369 'specif':180,435 'speed':168 'store':189 'strategi':279,514,642 'structur':285,309,520,544,648,672 'subprocess':334 'suggest':430 'support':78 'system':261,496,624 'tail':258,493,621 'take':216 'temp':136,404 'text':228,463,591 'thorough':269,504,632 'timeout':206 'tool':68,204 'topic-agent-safety' 'topic-agent-skills' 'topic-ai-coding' 'topic-ai-driven-development' 'topic-ai-safety' 'topic-antigravity' 'topic-bash' 'topic-claude-code' 'topic-codex-cli' 'topic-cursor' 'topic-developer-tools' 'topic-gemini-cli' 'treat':117,685 'trigger':48 'turn':231,379,466,594 'url':14,84,109,144,553 'use':33,164,201 'user':36,94,176,276,383,421,511,639 'var':322 'vercel/next.js':686 'wc':242,477,605 'without':335,698 'workflow':85 'wrap':365","prices":[{"id":"f95acc9e-ada8-4ab7-92ea-50618beefe1f","listingId":"418020f6-7655-426a-adce-37612c8fd32b","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"CodeAlive-AI","category":"ai-driven-development","install_from":"skills.sh"},"createdAt":"2026-05-04T06:56:23.701Z"}],"sources":[{"listingId":"418020f6-7655-426a-adce-37612c8fd32b","source":"github","sourceId":"CodeAlive-AI/ai-driven-development/repo-explorer","sourceUrl":"https://github.com/CodeAlive-AI/ai-driven-development/tree/main/skills/repo-explorer","isPrimary":false,"firstSeenAt":"2026-05-04T06:56:23.701Z","lastSeenAt":"2026-05-18T18:57:07.425Z"}],"details":{"listingId":"418020f6-7655-426a-adce-37612c8fd32b","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"CodeAlive-AI","slug":"repo-explorer","github":{"repo":"CodeAlive-AI/ai-driven-development","stars":67,"topics":["agent-safety","agent-skills","ai-coding","ai-driven-development","ai-safety","antigravity","bash","claude-code","codex-cli","cursor","developer-tools","gemini-cli","hooks","mcp","multi-agent","opencode","plugins","prompt-engineering","skills","subagents"],"license":"mit","html_url":"https://github.com/CodeAlive-AI/ai-driven-development","pushed_at":"2026-05-12T20:04:46Z","description":"Practices, protocols, and skills for AI-driven software development. 18 skills + 1 Bash safety hook for Claude Code, Codex CLI, OpenCode, Cursor, Gemini CLI, Antigravity, and any agent supporting the Agent Skills standard.","skill_md_sha":"073f50f641d6dcf78b43a96bac382a1d38d834c2","skill_md_path":"skills/repo-explorer/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/CodeAlive-AI/ai-driven-development/tree/main/skills/repo-explorer"},"layout":"multi","source":"github","category":"ai-driven-development","frontmatter":{"name":"repo-explorer","description":"Explore and analyze any repository (local path or remote GitHub/GitLab URL) by delegating to Claude Code CLI (`claude -p`) in non-interactive mode with read-only access. Use when the user asks to explore, analyze, investigate, or research a repository or codebase. Triggers on \"explore repo\", \"analyze repo\", \"investigate repo\", \"research codebase\", \"what does this repo do\", \"how does this codebase work\", \"ask about repo\", \"codebase question\", \"explore repository\", \"what API does this project have\", \"analyze this GitHub repo\", \"explore https://github.com/...\", or any request to understand a repository's structure, API, architecture, or implementation details. Works with both local paths and remote URLs (GitHub, GitLab, Bitbucket)."},"skills_sh_url":"https://skills.sh/CodeAlive-AI/ai-driven-development/repo-explorer"},"updatedAt":"2026-05-18T18:57:07.425Z"}}