Bundled rogrep skill
Rendered from the skill embedded by the CLI. Raw source!
name: rogrep description: Search and analyze local coding-agent session history (Claude Code, Codex, Cursor, Grok, Hermes, opencode) with rogrep. Use when you need to enumerate past agent work, search conversations, inspect exchanges or turns, review git/GitHub activity, compute usage statistics, or answer questions like “how did we get to PR 48?”, “what led to this branch?”, “what did we work on last week?”, or “which sessions touched this file?”. #
rogrep — local rollout search #
rogrep indexes every coding-agent session on this machine (fully local; nothing leaves the box) and answers evidence questions about past work. Every command auto-refreshes the index first, so results are always current. Prefer concise text output while exploring; add --json when exact fields matter.
Core concepts #
- Conversation (
rg_…id): one agent session. - Exchange (
rg_…#eN, 1-based): one real user prompt plus every agent action until the next prompt — the primary unit for “what did the agent do when I asked X”. Harness echoes (task notifications, scheduled prompts, compactions) never open exchanges. - Turn (index within a conversation): a single message, tool call, or tool result.
Start Broad #
rogrep ls— recent conversations across all agents;--cwd .scopes to the current checkout,--project KEYto a normalized project key.rogrep stats projects— per-project activity (conversations, exchanges, tokens, last active).rogrep stats daily/weekly/monthly— usage tables;rogrep stats heatmap— hour-of-week activity;rogrep stats top --by tokens|duration|turns|tools— the biggest exchanges;rogrep stats tools— tool call/failure counts;rogrep stats git— daily commits/pushes/PR actions.
Search And Drill In #
rogrep search QUERY(or barerogrep QUERY) searches all turns. Include exact identifiers when known: PR number, branch, file path, error text. A barerg_…id resolves directly;rg_…#eNshows that exchange; userogrep -- rg_…to instead search for the id as literal text (e.g. find conversations mentioning it).- Query grammar: bare terms AND together;
"quoted phrases"match in order;key:valuefacets filter. Unknownkey:tokens (URLs,data:URIs) are treated as literal text — only known facet keys activate. - Facets:
provider:(claude|codex|cursor|grok|hermes|opencode),model:,project:,cwd:,file:,role:,tool:(tool name),tool_cmd:(shell executable, e.g.tool_cmd:git),tool_status:(succeeded|failed|rejected),tool_mutating:true,git_cmd:(commit|push|…),git_pr:(create|merge|…),git_pr_num:N,git_commit:SHA,git_branch:,is:(interrupted|compacted|notification),origin:(interactive|subagent|scheduled|auxiliary),since:/before:(YYYY-MM-DD or Nd, e.g.since:7d). rogrep find CONVERSATION_ID QUERY— conjunction find inside one conversation. Reports strict turn hits first; when no single turn has every term, it reports exchanges where all terms appear (“passage” hits, with ready-to-runrogrep show rg_…#eNcommands); per-term counts show which term narrowed the query.rogrep show ID— render turns.--turn Nfor one turn,--around N --limit 40for context,rg_…#eNor--exchange Nfor one exchange. Text output truncates long turns at ~2400 bytes; use--jsonor--rawfor exact payloads.
Interpret Missing Data #
- Corpus search covers user-visible turns of real work: harness-injected context blocks and machine-evaluation sessions (codex auto-review judges,
origin:auxiliary) are excluded by default. Usefindto grep context blocks inside one conversation, or an explicitorigin:auxiliaryfacet to search evaluation sessions. - “no matches” from search means nothing INDEXED matched — differently-phrased, unparsed, or out-of-band work is not ruled out. Retry with broader or alternative terms before concluding absence.
- An empty
rogrep gittimeline means no indexed git/GitHub facets matched. It does not rule out filesystem edits, shell work, or SSH work. - Token totals labeled
estare length-based estimates for turns with no provider accounting; some providers (cursor, grok) never report usage. rogrep doctorreports discovery roots, per-provider file counts, and parse health when results seem incomplete.
Answer Trajectory Questions #
For “how did we get to PR 48?”:
rogrep trajectory --pr 48(add--branch NAME,--commit SHA,--cwd ., or a text query). The[origin]entry created the PR; entries are ranked by real git evidence and ordered chronologically.rogrep git CONVERSATION_ID --pr 48 --mutating-onlyfor the git timeline of a candidate.- Follow each result’s
inspect:line (rogrep show rg_… --around N --limit 40); in--jsonthe same command is in theinspectfield withnext_turn. - Search again for missing evidence:
pull/48, the branch name,git_pr:create,git_pr_num:48, commit title, or feature wording. - Answer as a chronology grounded in evidence: conversation ids, exchange refs, turn indexes, branch names, PR URLs. Say when evidence is partial instead of filling gaps.
Output Discipline #
- Do not claim causality unless turns or git operations support it.
- Prefer short quoted snippets; paraphrase the rest.
- Cite
rg_…ids with turn indexes or#eNexchange refs so another agent can reproduce the path. - Rank competing trajectories by direct evidence: PR URL > branch name > exact title/text > broad keyword match.
- Never run
rogrep tuifrom a non-interactive session; it is for humans.