From 39b14390e2206e65e12ccee86abf5672e861d248 Mon Sep 17 00:00:00 2001 From: Diego Nul Date: Sun, 11 Jan 2026 23:23:36 -0300 Subject: [PATCH 1/2] feat: add repo command for cross-repository exploration Spawns a sub-agent to explore other repositories (defined in ~/.claude/repos.json) without polluting the current context. Co-Authored-By: Claude Opus 4.5 --- .claude/commands/repo.md | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .claude/commands/repo.md diff --git a/.claude/commands/repo.md b/.claude/commands/repo.md new file mode 100644 index 0000000..512a02b --- /dev/null +++ b/.claude/commands/repo.md @@ -0,0 +1,42 @@ +# Repository Explorer + +Spawn a sub-agent to explore another repository without polluting the current context. + +## Usage + +``` +/repo "" +``` + +Examples: +- `/repo pay-core "how is authentication implemented?"` +- `/repo data-lake "find the Glue table definitions"` + +## Arguments + +$ARGUMENTS + +## Instructions + +1. Parse the arguments to extract the repo alias (first word) and the prompt (remaining text, quotes optional) + +2. Read `~/.claude/repos.json` to get the repository mappings + +3. Look up the provided alias in the mappings: + - If not found, list available aliases and ask the user to pick one + - If found, get the full path + +4. Use the Task tool to spawn an Explore agent: + - Set `subagent_type` to `Explore` + - Set the prompt to include: + - The working directory path from repos.json + - The user's question/prompt + - Instruction to be concise and return only relevant findings + - Use `model: haiku` for quick lookups, or `sonnet` for deeper analysis + +5. Return a concise summary of what was found, including: + - Key file paths (relative to the repo) + - Brief explanation of findings + - Code snippets only if directly relevant + +Keep the response focused - the goal is minimal context pollution. From 825b38ddd91b01166921b097f7d7fd41e89ff56f Mon Sep 17 00:00:00 2001 From: Diego Nul Date: Tue, 13 Jan 2026 10:24:18 -0300 Subject: [PATCH 2/2] refactor: rename repo command to ask-repo for clarity The generic "repo" name was too vague. Renamed to "ask-repo" to better describe its purpose of asking questions to other repositories. Co-Authored-By: Claude Opus 4.5 --- .claude/commands/{repo.md => ask-repo.md} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename .claude/commands/{repo.md => ask-repo.md} (88%) diff --git a/.claude/commands/repo.md b/.claude/commands/ask-repo.md similarity index 88% rename from .claude/commands/repo.md rename to .claude/commands/ask-repo.md index 512a02b..4d3b6fc 100644 --- a/.claude/commands/repo.md +++ b/.claude/commands/ask-repo.md @@ -5,12 +5,12 @@ Spawn a sub-agent to explore another repository without polluting the current co ## Usage ``` -/repo "" +/ask-repo "" ``` Examples: -- `/repo pay-core "how is authentication implemented?"` -- `/repo data-lake "find the Glue table definitions"` +- `/ask-repo pay-core "how is authentication implemented?"` +- `/ask-repo data-lake "find the Glue table definitions"` ## Arguments