skill/rg_history/SKILL.md
Search your conversation history using ripgrep. Use when you need to find previous messages, file edits, tool calls, or decisions from earlier in the session.
npx skillsauth add backnotprop/rg_history rg_historyInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Search your session history with ripgrep.
Each event is one long JSON line. Full output will overwhelm you. Always start broad with limited output, then narrow in.
# 1. COUNT first - how many matches?
rg -c 'search_term' session.jsonl
# 2. SNIPPETS - get context around matches (not full lines)
rg -o '.{0,60}search_term.{0,60}' session.jsonl | head -20
# 3. NARROW - pipe to filter further
rg -o '.{0,60}search_term.{0,60}' session.jsonl | rg 'new_string'
# 4. FULL CONTEXT - only when you know what you want
rg '"name":"Edit".*search_term' session.jsonl -M 500
Never run raw rg 'pattern' file.jsonl - you'll get walls of JSON.
Always use one of:
-c to count matches-o '.{0,60}pattern.{0,60}' for snippets-M 200 to truncate lines| head -20 to limit resultsRun the helper script:
scripts/list-sessions.sh /path/to/project # defaults to cwd
Or construct manually:
~/.claude/projects/{encoded_project_path}/{session_id}.jsonl
Where encoded_project_path = project path with / replaced by -.
~/.claude/projects/-Users-ramos-my-project/
├── abc123-def4-5678-....jsonl # Main session (UUID format)
├── agent-a1b2c3d.jsonl # Sub-agent spawned by Task tool
└── ...
agent-{7-char-id}.jsonl, from Task tool"agentId": "a1b2c3d"Each line is one JSON object. Key fields:
Message types:
"type":"user" + "userType":"external" = actual human input"type":"assistant" = Claude's responses"type":"tool_result" = tool outputTool calls (in assistant messages):
"name":"Edit" → "input":{"file_path":"...", "old_string":"...", "new_string":"..."}"name":"Write" → "input":{"file_path":"...", "content":"..."}"name":"Bash" → "input":{"command":"..."}"name":"Task" → "input":{"prompt":"...", "subagent_type":"..."}Content blocks:
"type":"text" - message text"type":"thinking" - Claude's reasoning"type":"tool_use" - tool invocationOther fields:
"timestamp":"2025-12-20T..." - when it happened"agentId":"..." - links to agent file"isCompactSummary":true - compacted contextRemember: always use snippets or limit output!
# Find human messages (not tool results)
rg -o '.{0,40}"userType":"external".{0,40}' session.jsonl | head -10
# Find file edits
rg -c '"name":"Edit"' session.jsonl # count first
rg -o '.{0,50}"name":"Edit".{0,50}' session.jsonl | head -10
# Find edits to specific file
rg -o '.{0,30}auth.{0,30}' session.jsonl | rg 'file_path'
# Find commands that were run
rg -o '.{0,80}"command":".{0,80}' session.jsonl | head -10
# Find code in file writes
rg -o '.{0,60}function.{0,60}' session.jsonl | rg 'new_string\|content'
| Goal | Command |
|------|---------|
| Count matches | rg -c 'pattern' file |
| Snippets | rg -o '.{0,60}pattern.{0,60}' file |
| Limit output | \| head -20 |
| Truncate lines | -M 200 |
| Case insensitive | -i |
| Chain filters | rg 'a' \| rg 'b' |
tools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
A CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.