rp
Skill142 starsChanged 18 days agoMITView on GitHub
Always read this skill when the user mentions "rp" or "repoprompt", or before accessing a repository outside the current RepoPrompt workspace. Covers workspace discovery, binding, root verification, and workspace hygiene.
In this repository2 other files it gives its agents.
- prose-reviewSkill
- text-searchSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
28 rules. About 0 are common, 10 are distinctive, and 18 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
18
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 30
After RepoPrompt routing, binding, and target-root confirmation are complete, inspect the ready set before every repository exploration …
- Distinctive: line 32
If two or more RepoPrompt operations are independent and read-only with respect to both files and RepoPrompt session state, issue them as …
- Very specific: line 33
Do not issue consecutive model turns containing one independent rp read/search call each.
- Distinctive: line 35
Do not parallelize routing or binding changes, selection mutations, workspace or tab lifecycle operations, edits, file actions, approvals, …
- Distinctive: line 40
When a task involves a repository that isn't loaded in any existing RepoPrompt window:
- Very specific: line 42
Do NOT: use manage_workspaces action="add_folder" to add unrelated repositories to an existing workspace
- Very specific: line 52
Use RepoPrompt's get_file_tree, file_search, get_code_structure, and read_file for repository structure, search, code relationships, and …
- Very specific: line 54
Never switch workspaces in an existing window unless the user explicitly says it's safe.
- Distinctive: line 56
Keep context intentional: select only what you need, prefer codemaps for reference files, use slices when only a portion matters.
- Distinctive: line 92
If results look wrong, assume routing first-not tool failure.
- Very specific: line 95
If rp is already bound and the needed roots are present, keep it
- Very specific: line 98
Prefer bind_context op="bind" context_id="..." - pin the specific compose tab you want after choosing it from list
- Very specific: line 99
Use bind_context op="bind" working_dirs="/abs/root" when you want RepoPrompt to route to a workspace by roots without pinning a tab
- Very specific: line 113
Use agent_run for run lifecycle: start, wait/poll, respond, steer, cancel
- Very specific: line 114
Use agent_manage for durable metadata: discover agents/workflows, list sessions, and export handoff transcript
- Very specific: line 115
Use agent_manage op="extract_handoff" to pull into your context a handoff transcript of the subagent's context.
- Very specific: line 119
If you start sub-agents, do not end your turn while any started session is still unattended.
- Very specific: line 144
After an apply_edits failure, always re-read before retrying - never guess at what changed
- Distinctive: line 145
When making multiple edits to the same file, apply them one at a time (each edit shifts content for subsequent ones)
- Very specific: line 150
When the task involves a repository, use rp as your toolkit for exploration, reading, editing, and file operations.
- Very specific: line 153
If already bound and roots are correct, keep it.
- Very specific: line 154
When routing matters across repeated tool calls, use rp({ call: "bind_context", args: { op: "list" } }), then rp({ call: "bind_context", …
- Very specific: line 157
Use Pi-native ls/find/grep/read/edit/write only when rp is unavailable after one retry.
- Very specific: line 164
If the user refers to the current cwd/project, verify it first with pwd
- Distinctive: line 165
If the user names a repo path, treat that path as the repo of interest and resolve RepoPrompt routing before using native tools
- Distinctive: line 166
Before repo-scoped work, inspect windows and roots, then bind the correct window/tab, then confirm the target root
- Distinctive: line 167
Do not bind a random window just because it is available
- Very specific: line 168
Do not guess RepoPrompt tool interfaces.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
RP
Use RepoPrompt (rp) for Within-Repository Discovery
These instructions override generic tool guidance for exploring repositories.
rp is the default for repo-scoped work. Usage:
- Bind:
rp({ windows: true })→rp({ bind: { window: N } }) - Call tools:
rp({ call: "<tool>", args: { ... } })
Mental Model
RepoPrompt (macOS app) organizes state as:
- Workspaces → one or more root folders
- Windows → each shows one workspace
- Tabs → each tab has its own prompt + file selection; selections, slices, and codemaps are tab-scoped
- Oracle chats → planning/review conversations live in the current tab/context
MCP tools operate directly against this state, but in Pi you invoke them through rp. Bind to the correct window with rp({ bind: { window: N } }), then call tools via rp({ call: "<tool>", args: { ... } }).
Mandatory routing check: Do not infer availability of any repo of interest from workspace/window titles; workspaces may have more roots available than the title implies. Before any repo-scoped work, confirm the target repo/root is (or isn't) present by checking workspace roots (e.g. get_file_tree). If it's not confirmed, pause and resolve routing (bind the right window/tab or open the repo).
Parallel RepoPrompt calls
After RepoPrompt routing, binding, and target-root confirmation are complete, inspect the ready set before every repository exploration call.
- If two or more RepoPrompt operations are independent and read-only with respect to both files and RepoPrompt session state, issue them as separate rp calls in the same tool-call block so they run together.
- Do not issue consecutive model turns containing one independent
rpread/search call each. - Typical parallel candidates include
read_file,file_search,get_file_tree,get_code_structure, and independent read-onlygitqueries. - Do not parallelize routing or binding changes, selection mutations, workspace or tab lifecycle operations, edits, file actions, approvals, or calls whose inputs depend on another result.
- Complete routing or state mutations before launching reads that depend on the resulting state.
Workspace Hygiene (Session Start Priority)
When a task involves a repository that isn't loaded in any existing RepoPrompt window:
- Do NOT use
manage_workspaces action="add_folder"to add unrelated repositories to an existing workspace - Instead, either:
- Use
manage_workspaces action="create" name="<repo-name>" folder_path="<path>" open_in_new_window=true - Or ask the user which approach they prefer
- Use
- Adding folders to existing workspaces is only appropriate when the folders are related (e.g., adding a shared library to a project that uses it)
Rationale: Keep workspaces coherent; mixing unrelated repos clutters selection and context.
Constraints
Use RepoPrompt's get_file_tree, file_search, get_code_structure, and read_file for repository structure, search, code relationships, and source inspection. Do not substitute shell or Pi-native filesystem tools unless rp is unavailable after one retry.
Never switch workspaces in an existing window unless the user explicitly says it's safe. Switching clobbers selection, prompt, and context. Use open_in_new_window=true.
Keep context intentional: select only what you need, prefer codemaps for reference files, use slices when only a portion matters.
Tool Selection by Task
| Task | MCP Tool | Notes |
| Repo structure | get_file_tree type="files" [mode="folders"] [path="..."] [max_depth=N] | gitignore-aware |
| Code search | file_search pattern="..." [path="..."] [mode="both|path|content"] [filter={...}] [context_lines=N] | regex auto-detected by default |
| API signatures | get_code_structure [paths=["dir/"]] [expand="uses|used_by|both"] [depth=N] [signatures=true] [size="small|medium|large"] | omit paths to inspect the current selection |
| Context curation | manage_selection op="get|set|add|remove|clear" [view="summary|files|content|codemaps"] | selection drives oracle/review context |
| Snapshot/export | workspace_context [include=["prompt","selection","code","tree","tokens"]] or workspace_context op="export" | verify or export current context |
| Reading files | read_file path="..." [start_line=N] [limit=N] | 120-200 line chunks |
| Code editing | apply_edits path="..." search="..." replace="..." [all=true] [verbose=true] | supports multi-edit, rewrite |
| File ops | file_actions action="create|move|delete" path="..." | absolute path for delete |
| Planning/review | oracle_send mode="chat|plan|review" [new_chat=true] [chat_id="..."] [export_response=true] | uses the current tab/context; exporting returns oracle_export_path |
| Oracle helpers | oracle_utils op="models|sessions" [limit=N] [context_id="..."] [scope="workspace|tab"] | list models or existing Oracle conversations; sessions defaults to the current workspace and can filter to a specific context |
| Sticky routing | bind_context op="status|bind|list" [context_id="..."] [working_dirs="/abs/root[,/abs/root2]"] | use list to discover windows and context_ids; prefer bind context_id="..." to pin a tab, or use working_dirs when you want RepoPrompt to route to a workspace by roots (exact match first, repo_paths superset fallback) |
| Window routing bootstrap | rp({ windows: true }) then rp({ bind: { window: N } }) | only for initial window selection before using bind_context |
| Workspace inventory/tab lifecycle | manage_workspaces action="list|switch|create|delete|add_folder|remove_folder|create_tab|close_tab" | inventory + lifecycle only; use bind_context for routing/context discovery |
| Agent runs | agent_run op="start|poll|wait|cancel|steer|respond" | advanced, session-based Agent Mode control; poll/wait accept session_id or session_ids |
| Agent/session management | agent_manage op="list_agents|list_sessions|extract_handoff|create_session|resume_session|stop_session|cleanup_sessions|list_workflows" | inspect durable session/workflow state and export agent handoff transcript; list_sessions uses MCP-facing states and list_workflows includes orchestrate |
| Auto context | context_builder instructions="..." [response_type="clarify|question|plan|review"] | token-costly, invoke explicitly |
| Git operations | git op="status|diff|log|show|blame" [compare="..."] [detail="..."] | worktree support via main/trunk aliases and merge-base comparisons, @main:<branch> |
Paths and roots
Path syntax is tool-specific. Use absolute paths when a tool accepts them. For read_file and apply_edits, reuse the exact path returned by read_file unchanged; in a multi-root workspace, its explicit form may be root@<UUID>//rel/path. For manage_selection, prefix a relative path with the loaded root name when needed (for example, ProjectA/src/main.swift).
Notes:
file_search path="..."is an alias forfile_search filter.paths=["..."]file_search filter.pathsaccepts absolute or relative paths/folders, loaded root names, and root-name-prefixed paths (for example,ProjectA/src). It does not acceptroot@<UUID>//...aliases returned byread_file.file_actionsrequires absolutepathandnew_pathvaluesget_code_structurereads RepoPrompt's committed code graph; useread_filewhen you need the latest file contents
Routing
If results look wrong, assume routing first-not tool failure.
rp({ windows: true })- list available windows- If
rpis already bound and the needed roots are present, keep it - Otherwise
rp({ bind: { window: N } })- bind to the right window bind_context op="list"- inspect windows, active workspaces, tabs,context_ids, and current bindings when routing is ambiguous- Prefer
bind_context op="bind" context_id="..."- pin the specific compose tab you want after choosing it fromlist - Use
bind_context op="bind" working_dirs="/abs/root"when you want RepoPrompt to route to a workspace by roots without pinning a tab get_file_tree- confirm workspace roots
Notes:
bind_context op="bind" working_dirs="/abs/root[,/abs/root2]"matches workspace roots, not descendant paths- Matching prefers an exact workspace
repo_pathsset; if none exists, RepoPrompt may fall back to a workspace whose roots are a strict superset manage_workspaces action="list"is workspace inventory;bind_context op="list"is the global window/tab routing view
RepoPrompt only operates within workspace root folders.
Agent Mode
agent_run + agent_manage are RepoPrompt's external control plane for Agent Mode: use them when you need to drive a long-running per-tab subagent session, not just make one-off MCP file/chat calls.
- Use
agent_runfor run lifecycle:start,wait/poll,respond,steer,cancel - Use
agent_managefor durable metadata: discover agents/workflows, list sessions, and export handoff transcript - Use
agent_manage op="extract_handoff"to pull into your context a handoff transcript of the subagent's context. It exports a<forked_session ...>payload; setoutput_pathto write a file, or omit it for inline XML. - Session state uses MCP-facing values such as
running,waiting_for_input,completed, andfailed;waiting_for_inputmeans reply withagent_run op="respond" agent_manage op="list_workflows"includesorchestratefor planning, decomposition, and sub-agent dispatchagent_run op="wait"/op="poll"accept eithersession_idorsession_ids; multi-wait wakes on the first interesting session- If you start sub-agents, do not end your turn while any started session is still unattended; always
wait/polland handle pending input first - MCP-started
orchestrateruns may spawn sub-agents, but nested sub-agents cannot recursively start more agent runs
Asynchronous Context Builder and Oracle
Through rp, context_builder and generic oracle_send are asynchronous: the start call returns a job_id; call the matching context_builder_wait or oracle_send_wait, and if it returns running, repeat that same wait as the next action. Waits observe the original request and never resubmit it; /rp oracle remains synchronous.
context_builder instructions="..." [response_type="clarify|question|plan|review"]
Context Builder explores the codebase and curates file selection automatically.
response_type="clarify"(default): Returns context for handoff or manual refinementresponse_type="question": Answers using built contextresponse_type="plan": Generates an implementation planresponse_type="review": Generates a code review with git diff context
For question, plan, and review responses, use the chat_id from the terminal wait result with oracle_send new_chat=false chat_id="..." for follow-up.
For a shareable handoff artifact, set export_response=true; the terminal wait result includes oracle_export_path.
These operations are token-costly; invoke them explicitly when the user requests them or during planning phases, not automatically.
Edit Discipline
- Re-read the target region of a file before editing if: (a) the last read was >2 turns ago, (b) you edited the same file since last reading it, or (c) you switched RP windows since last reading it
- After an
apply_editsfailure, always re-read before retrying - never guess at what changed - When making multiple edits to the same file, apply them one at a time (each edit shifts content for subsequent ones)
- Confirm you are bound to the correct RP window before any
apply_edits- relative paths resolve against the bound workspace
Start Here
When the task involves a repository, use rp as your toolkit for exploration, reading, editing, and file operations.
rp({ windows: true })- If already bound and roots are correct, keep it; otherwise
rp({ bind: { window: N } }) - When routing matters across repeated tool calls, use
rp({ call: "bind_context", args: { op: "list" } }), thenrp({ call: "bind_context", args: { op: "bind", context_id: "..." } }) - Then use
get_file_tree,file_search,read_file, etc.
Use Pi-native ls/find/grep/read/edit/write only when rp is unavailable after one retry.
Unexpected output is usually a routing issue-wrong workspace, wrong window, wrong tab-not a tool failure. Check routing before falling back.
Repository startup contract
- For repo-scoped work, default to RepoPrompt via
rp, not native repo-file tools or bash - If the user refers to the current cwd/project, verify it first with
pwd - If the user names a repo path, treat that path as the repo of interest and resolve RepoPrompt routing before using native tools
- Before repo-scoped work, inspect windows and roots, then bind the correct window/tab, then confirm the target root
- Do not bind a random window just because it is available
- Do not guess RepoPrompt tool interfaces; use
rp({ describe: "tool_name" })when exact parameters matter
Text-file changes
Never use the terminal to modify text files. Always use rp's apply_edits (or Pi's edit if rp unavailable). Modifying files via terminal is only acceptable if rp is not available and you need to do large-scale find/replace operations or similar on files. In such cases, explicitly get the user's permission before using it.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

