ワンクリックで
rp-investigate
Deep investigation with RepoPrompt MCP tools: tools gather evidence, follow-up reasoning synthesizes selected context
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Deep investigation with RepoPrompt MCP tools: tools gather evidence, follow-up reasoning synthesizes selected context
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Build with rp-cli context builder plan → implement
Build with RepoPrompt MCP tools context builder plan → implement
Deep investigation with rp-cli commands: tools gather evidence, follow-up reasoning synthesizes selected context
Export a ChatGPT-ready Question / Plan / Review prompt using rp-cli
Export a ChatGPT-ready Question / Plan / Review prompt using RepoPrompt MCP tools
Refactoring assistant using rp-cli to analyze and improve code organization
| name | rp-investigate |
| description | Deep investigation with RepoPrompt MCP tools: tools gather evidence, follow-up reasoning synthesizes selected context |
| repoprompt_managed | true |
| repoprompt_skills_version | 30 |
| repoprompt_variant | mcp |
Investigate: $ARGUMENTS
You are now in deep investigation mode for the issue described above. Follow this protocol rigorously.
This workflow leverages three complementary capabilities:
context_builder): Explores the codebase and populates the file selection — choosing full files or slices of files relevant to the task. This is its primary output: a curated selection the chat can analyze.oracle_send): Deep analytical reasoning over the current file selection. It sees selected files completely (full content, not summaries), but it only sees what's in the selection — nothing else. It excels at synthesizing patterns, spotting architectural issues, and forming hypotheses from the big picture. It is not a lookup tool: if a question can be answered by reading files, searching, or running git/tool calls, do that yourself first.The file selection is the shared context between you, the context builder, and the chat:
context_builder populates the selection with relevant files/slices it discoversmanage_selection to augment or refine what the chat seesImportant: The context builder operates with a large token budget and works hard to maximize useful context. Don't constrain it — build on its selection with targeted add/remove calls rather than replacing it.
Before any investigation, bind to the target codebase using its working directory:
{"tool":"bind_context","args":{"op":"bind","working_dirs":["/absolute/path/to/project"]}}
This auto-resolves to the window containing your project. No need to list windows first.
If binding succeeds → proceed to Phase 1 If no match → the codebase isn't loaded. Find and open the workspace:
{"tool":"manage_workspaces","args":{"action":"list"}}
{"tool":"manage_workspaces","args":{"action":"switch","workspace":"<workspace_name>","open_in_new_window":true}}
Then retry the working_dirs bind.
Keep this short — save deep exploration for after context_builder.
context_builder — REQUIRED)⚠️ Do NOT skip this step. The context builder discovers relevant files across the codebase that you'd miss with manual searching. It populates the file selection with full files or targeted slices.
Use context_builder with detailed instructions describing what to investigate and why:
mcp__RepoPrompt__context_builder:
instructions: |
<task>Describe the specific issue or question to investigate</task>
<context>
Symptoms observed:
- <concrete symptom 1>
- <concrete symptom 2>
Hypotheses to test:
- <theory 1>
- <theory 2>
Areas likely involved:
- <specific files, patterns, or subsystems>
</context>
response_type: question
Use response_type: question so the chat immediately analyzes the gathered context and returns its initial assessment.
The chat's response will contain hypotheses and analytical pointers. Your job is to verify them with precision:
Build a concrete evidence list: file paths, line numbers, git commits, actual code snippets.
If a factual gap can be closed with read_file, file_search, git, or another direct tool call, do that before going back to the chat.
Update the selection to focus the chat on what matters now, then ask targeted questions that require synthesis rather than direct lookup:
// Add files the chat hasn't seen yet
mcp__RepoPrompt__manage_selection:
op: add
paths: [<additional files relevant to the current hypothesis>]
// Or add a slice of a large file
mcp__RepoPrompt__manage_selection:
op: add
slices:
- path: "Root/large/file.swift"
ranges: [{start_line: 100, end_line: 250}]
// Then ask a focused question — the chat will see the updated selection
mcp__RepoPrompt__`oracle_send`:
chat_id: <from context_builder>
message: |
Based on my investigation, here's what I found:
- <concrete evidence 1 with file:line>
- <concrete evidence 2 with file:line>
Given this evidence, <specific analytical question>
mode: chat
Repeat Phases 3–4 as needed, but be judicious. The chat is slow and resource-intensive — do substantial reasoning and evidence gathering on your own between calls. Don't invoke it just to ask a quick question you could answer yourself with read_file, file_search, git, or other direct tool calls. Reserve it for moments when you need deep analytical synthesis, competing explanations, or cross-file reasoning across the selected context.
You write the final report with precise references. The chat reasons about patterns but can't produce exact line numbers — that's your job.
Document:
| Capability | Agent (you) | Context Builder | Chat (oracle_send) |
|---|---|---|---|
| Discover relevant files broadly | ❌ Limited | ✅ Primary | ❌ |
| Populate file selection | ❌ | ✅ Primary | ❌ |
| Read exact file contents & lines | ✅ Primary | ❌ | Sees full selected files |
| Run git blame/log/diff | ✅ | ❌ | ❌ |
| Search across codebase | ✅ | ✅ | ❌ |
| Synthesize patterns & architecture | ⚠️ OK | ❌ | ✅ Primary |
| Form & refine hypotheses | ⚠️ OK | ❌ | ✅ Primary |
| Produce line-number evidence | ✅ Primary | ❌ | ❌ |
| Mutate selection to refocus chat | ✅ | ❌ | ❌ |
Create a findings report as you investigate:
# Investigation: [Title]
## Summary
[1-2 sentence summary of findings]
## Symptoms
- [Observed symptom 1]
- [Observed symptom 2]
## Investigation Log
### [Phase] - [Area Investigated]
**Hypothesis:** [What you were testing]
**Findings:** [What you found]
**Evidence:** [Exact file paths, line numbers, code snippets, git commits]
**Conclusion:** [Confirmed/Eliminated/Needs more investigation]
## Root Cause
[Detailed explanation with precise evidence]
## Recommendations
1. [Fix 1 — specific file and location]
2. [Fix 2 — specific file and location]
## Preventive Measures
- [How to prevent this in future]
context_builder and attempting to investigate by reading files manually — you'll miss critical contextcontext_builder — initial assessment should be briefread_file, file_search, git, or other direct tool calls — reserve it for deep analytical synthesismanage_selection with op:"clear" or op:"set" — this undoes context_builder's carefully curated selection; use op:"add" and op:"remove" to build on itNow begin the investigation. Read any provided context, form initial hypotheses, then immediately use context_builder to gather broad context. After that, alternate between your own evidence gathering and refocused chat deep dives.