en un clic
rp-oracle-export-v2
// Export a ChatGPT-ready Question / Plan / Review prompt using RepoPrompt MCP tools
// Export a ChatGPT-ready Question / Plan / Review prompt using RepoPrompt MCP tools
Use for Codex multi_agent_v2 subagent orchestration: delegation decisions, spawn_agent prompts, custom agent_type roles, reasoning_effort choices, safe parallelism, wait/list/send/followup/close handling, commit discipline, receipts, and root-thread coordination.
Build with RepoPrompt MCP tools context builder plan → implement
Deep planning workflow using RepoPrompt MCP tools: map seams, draft, critique, polish — produces a ready-to-execute plan document
Deep investigation with RepoPrompt MCP tools: tools gather evidence, follow-up reasoning synthesizes selected context
Iterative performance optimization loop using RepoPrompt MCP tools: instrument with debug-only metrics, establish a baseline, then plan → delegate one optimize+harden cycle → re-measure → ask oracle for next plan, looping until the oracle is satisfied or the target metric is met
Plan, decompose, and delegate complex tasks across multiple agents using RepoPrompt MCP tools
| name | rp-oracle-export-v2 |
| description | Export a ChatGPT-ready Question / Plan / Review prompt using RepoPrompt MCP tools |
| repoprompt_managed | true |
| repoprompt_skills_version | 61 |
| repoprompt_variant | mcp |
Raw request: $ARGUMENTS
Your job: select the right files and export a prompt file that another model can act on directly.
Before you do anything else, extract the real task from the raw request above. Users often phrase this as "export a prompt for X" or "write a prompt about Y" — strip away any meta-framing about exporting/prompting and identify the underlying problem. For example:
Use the extracted task (not the raw request) for all downstream steps — intent classification, context_builder instructions, and the final exported prompt.
context_builder is the default path.context_builder is the default path.context_builder.context_builder here, keep response_type: "clarify".context_builder, trust its curated selection, budget, and generated prompt by default; only re-check or adjust prompt/selection/tokens if you noticed a concrete issue.prompt-exports/.Before any building context, 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 Step 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.
Infer the prompt type from the request:
If the request is vague:
context_builderAsk one specific question only if needed, and base it on the repo state you found. Good question shapes:
main?”If the scope is still unclear, STOP and ask the user. Do not ask generic workflow questions when you could ask a concrete scope question instead.
Because this prompt does not expose the workflow export budget directly, prefer context_builder unless the review scope is obviously tiny.
Start by checking git state:
{"tool":"git","args":{"op":"status"}}
{"tool":"git","args":{"op":"diff","detail":"files"}}
Determine the comparison scope from the user's request and git state.
If the user already specified a clear comparison target (e.g., "review against main", "compare with develop", "review last 3 commits"), skip confirmation and proceed using the scope they specified.
If the scope is ambiguous or not specified, ask the user to clarify:
uncommitted – All uncommitted changes vs HEAD (default)staged – Only staged changes vs HEADback:N – Last N commitsmain or master – Compare current branch against trunk<branch_name> – Compare against specific branchExample prompt to user (only if scope is unclear):
"You're on branch
feature/xyz. What should I compare against?
uncommitted(default) - review all uncommitted changesmain- review all changes on this branch vs main- Other branch name?"
If you need to ask, STOP and wait for user confirmation before proceeding.
This prompt does not expose the workflow export-mode budget directly. Lean on context_builder unless the uncommitted review scope is clearly tiny, obviously bounded, and safe to include in full.
For Review, the fast path is the exception, not the default. It is allowed only when the confirmed scope is uncommitted changes and the full changed-file review scope is obviously tiny and safe to include in full. Otherwise require context_builder.
For Review, this is the default path. If the review is not a tiny uncommitted-change export that is obviously safe to include in full, context_builder is required.
For review exports, explicitly reference the diff / changed files in the context you build.
Always include the phrase "code review" in your context_builder instructions for Review exports. This phrase activates diff analysis in the discovery agent. Without it, the builder treats the request as a general exploration.
Default to context_builder for any request that is broad, architectural, evaluative, redesign-oriented, or likely to touch multiple files.
Do not spend tool calls proving that these requests are complex. If the user is asking you to evaluate logic, assess a design, rethink a flow, or reason about behavior across a system, call context_builder immediately.
Use the fast path only when the request is already small and obvious:
{"tool":"file_search","args":{"pattern":"<key term>","mode":"both"}}
{"tool":"manage_selection","args":{"op":"add","paths":["RootName/path/to/FileA.swift","RootName/path/to/FileB.swift"]}}
If there is any real doubt that the fast path will fully cover the task, use context_builder.
Otherwise use context_builder:
{"tool":"context_builder","args":{
"instructions":"<task>The actual problem to solve — not about exporting or prompting</task>\n<context>Scope: <what you found>.</context>",
"response_type":"clarify"
}}
{"tool":"context_builder","args":{
"instructions":"<task>Code review of changes against <confirmed_scope>.</task>\n<context>Intent: code review. Branch: <branch_name>.</context>",
"response_type":"clarify"
}}
context_builder)If you used context_builder, skip this step entirely and go straight to Step 4. The builder already curated the selection, managed the token budget, and wrote the prompt. Do not read the prompt back, do not inspect the selection, do not check token counts, and do not critique, rewrite, or "improve" the generated prompt text. Treat the builder's output as the final payload for export.
If you used the fast path, check the selection and prompt text before exporting:
{"tool":"manage_selection","args":{"op":"get","view":"summary"}}
{"tool":"prompt","args":{"op":"get"}}
If available in this surface, the fast path may also inspect token state:
{"tool":"workspace_context","args":{"include":["selection","tokens"]}}
If the prompt wording or selection is off, fix it before exporting.
Use a unique repo-local relative path such as:
prompt-exports/<yyyy-mm-dd>-<hhmmss>-question-<slug-from-request>.mdprompt-exports/<yyyy-mm-dd>-<hhmmss>-plan-<slug-from-request>.mdprompt-exports/<yyyy-mm-dd>-<hhmmss>-review-<slug-from-request>.mdChoose <slug-from-request> by summarizing the user's request into a short filesystem-safe phrase. Prefer descriptive slugs like collapsing-tool-logic or agent-transcript-redesign, not generic names like export or question.
Unless the user explicitly asks for another destination, keep the export path relative and repo-local under prompt-exports/.
Preset mapping:
Question → standard (only for specific, bounded questions)Plan → plan (default for generic, open-ended, or ambiguous requests)Review → codeReview{"tool":"prompt","args":{"op":"export","path":"prompt-exports/<unique filename>.md","copy_preset":"<standard|plan|codeReview>"}}
context_builder for branch / PR / large review exportscontext_builder for a broad Question/Plan export just to prove the task is complexcontext_builder — the builder already finalized the payloadcontext_builder to review, critique, rewrite, or "improve" it — export it as-isprompt get, manage_selection get, or workspace_context after context_builder completed — go straight to exportoracle-prompt.md by defaultexport, question, or plan when the request gives you enough detail for a better filenamecontext_builder — instructions like "export a prompt for X" or "build context for a ChatGPT prompt about Y" cause the builder to write a prompt about prompting instead of a prompt that solves X. Always pass the extracted task directly.Report the final export path, prompt type, whether you used the fast path or context_builder, and token count if available.