agentleFS
w-winterw-winter/dot314/skills/rp/SKILL.md

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.

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
  1. Distinctive:

    After RepoPrompt routing, binding, and target-root confirmation are complete, inspect the ready set before every repository exploration …

    line 30
  2. Distinctive:

    If two or more RepoPrompt operations are independent and read-only with respect to both files and RepoPrompt session state, issue them as …

    line 32
  3. Very specific:

    Do not issue consecutive model turns containing one independent rp read/search call each.

    line 33
  4. Distinctive:

    Do not parallelize routing or binding changes, selection mutations, workspace or tab lifecycle operations, edits, file actions, approvals, …

    line 35
  5. Distinctive:

    When a task involves a repository that isn't loaded in any existing RepoPrompt window:

    line 40
  6. Very specific:

    Do NOT: use manage_workspaces action="add_folder" to add unrelated repositories to an existing workspace

    line 42
  7. Very specific:

    Use RepoPrompt's get_file_tree, file_search, get_code_structure, and read_file for repository structure, search, code relationships, and …

    line 52
  8. Very specific:

    Never switch workspaces in an existing window unless the user explicitly says it's safe.

    line 54
  9. Distinctive:

    Keep context intentional: select only what you need, prefer codemaps for reference files, use slices when only a portion matters.

    line 56
  10. Distinctive:

    If results look wrong, assume routing first-not tool failure.

    line 92
  11. Very specific:

    If rp is already bound and the needed roots are present, keep it

    line 95
  12. Very specific:

    Prefer bind_context op="bind" context_id="..." - pin the specific compose tab you want after choosing it from list

    line 98
  13. Very specific:

    Use bind_context op="bind" working_dirs="/abs/root" when you want RepoPrompt to route to a workspace by roots without pinning a tab

    line 99
  14. Very specific:

    Use agent_run for run lifecycle: start, wait/poll, respond, steer, cancel

    line 113
  15. Very specific:

    Use agent_manage for durable metadata: discover agents/workflows, list sessions, and export handoff transcript

    line 114
  16. Very specific:

    Use agent_manage op="extract_handoff" to pull into your context a handoff transcript of the subagent's context.

    line 115
  17. Very specific:

    If you start sub-agents, do not end your turn while any started session is still unattended.

    line 119
  18. Very specific:

    After an apply_edits failure, always re-read before retrying - never guess at what changed

    line 144
  19. Distinctive:

    When making multiple edits to the same file, apply them one at a time (each edit shifts content for subsequent ones)

    line 145
  20. Very specific:

    When the task involves a repository, use rp as your toolkit for exploration, reading, editing, and file operations.

    line 150
  21. Very specific:

    If already bound and roots are correct, keep it.

    line 153
  22. Very specific:

    When routing matters across repeated tool calls, use rp({ call: "bind_context", args: { op: "list" } }), then rp({ call: "bind_context", …

    line 154
  23. Very specific:

    Use Pi-native ls/find/grep/read/edit/write only when rp is unavailable after one retry.

    line 157
  24. Very specific:

    If the user refers to the current cwd/project, verify it first with pwd

    line 164
  25. Distinctive:

    If the user names a repo path, treat that path as the repo of interest and resolve RepoPrompt routing before using native tools

    line 165
  26. Distinctive:

    Before repo-scoped work, inspect windows and roots, then bind the correct window/tab, then confirm the target root

    line 166
  27. Distinctive:

    Do not bind a random window just because it is available

    line 167
  28. Very specific:

    Do not guess RepoPrompt tool interfaces.

    line 168

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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 rp read/search call each.
  • Typical parallel candidates include read_file, file_search, get_file_tree, get_code_structure, and independent read-only git queries.
  • 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:

  1. Do NOT use manage_workspaces action="add_folder" to add unrelated repositories to an existing workspace
  2. 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
  3. 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

TaskMCP ToolNotes
Repo structureget_file_tree type="files" [mode="folders"] [path="..."] [max_depth=N]gitignore-aware
Code searchfile_search pattern="..." [path="..."] [mode="both|path|content"] [filter={...}] [context_lines=N]regex auto-detected by default
API signaturesget_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 curationmanage_selection op="get|set|add|remove|clear" [view="summary|files|content|codemaps"]selection drives oracle/review context
Snapshot/exportworkspace_context [include=["prompt","selection","code","tree","tokens"]] or workspace_context op="export"verify or export current context
Reading filesread_file path="..." [start_line=N] [limit=N]120-200 line chunks
Code editingapply_edits path="..." search="..." replace="..." [all=true] [verbose=true]supports multi-edit, rewrite
File opsfile_actions action="create|move|delete" path="..."absolute path for delete
Planning/revieworacle_send mode="chat|plan|review" [new_chat=true] [chat_id="..."] [export_response=true]uses the current tab/context; exporting returns oracle_export_path
Oracle helpersoracle_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 routingbind_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 bootstraprp({ windows: true }) then rp({ bind: { window: N } })only for initial window selection before using bind_context
Workspace inventory/tab lifecyclemanage_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 runsagent_run op="start|poll|wait|cancel|steer|respond"advanced, session-based Agent Mode control; poll/wait accept session_id or session_ids
Agent/session managementagent_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 contextcontext_builder instructions="..." [response_type="clarify|question|plan|review"]token-costly, invoke explicitly
Git operationsgit 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 for file_search filter.paths=["..."]
  • file_search filter.paths accepts absolute or relative paths/folders, loaded root names, and root-name-prefixed paths (for example, ProjectA/src). It does not accept root@<UUID>//... aliases returned by read_file.
  • file_actions requires absolute path and new_path values
  • get_code_structure reads RepoPrompt's committed code graph; use read_file when you need the latest file contents

Routing

If results look wrong, assume routing first-not tool failure.

  1. rp({ windows: true }) - list available windows
  2. If rp is already bound and the needed roots are present, keep it
  3. Otherwise rp({ bind: { window: N } }) - bind to the right window
  4. bind_context op="list" - inspect windows, active workspaces, tabs, context_ids, and current bindings when routing is ambiguous
  5. Prefer bind_context op="bind" context_id="..." - pin the specific compose tab you want after choosing it from list
  6. Use bind_context op="bind" working_dirs="/abs/root" when you want RepoPrompt to route to a workspace by roots without pinning a tab
  7. 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_paths set; 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_run for run lifecycle: start, wait/poll, respond, steer, cancel
  • Use agent_manage for 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; set output_path to write a file, or omit it for inline XML.
  • Session state uses MCP-facing values such as running, waiting_for_input, completed, and failed; waiting_for_input means reply with agent_run op="respond"
  • agent_manage op="list_workflows" includes orchestrate for planning, decomposition, and sub-agent dispatch
  • agent_run op="wait" / op="poll" accept either session_id or session_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/poll and handle pending input first
  • MCP-started orchestrate runs 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 refinement
  • response_type="question": Answers using built context
  • response_type="plan": Generates an implementation plan
  • response_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_edits failure, 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.

  1. rp({ windows: true })
  2. If already bound and roots are correct, keep it; otherwise rp({ bind: { window: N } })
  3. When routing matters across repeated tool calls, use rp({ call: "bind_context", args: { op: "list" } }), then rp({ call: "bind_context", args: { op: "bind", context_id: "..." } })
  4. 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.