session-search
session-search Skill
Search your complete conversation history stored in job session JSONL files. Use this when you need to find how similar problems were solved in past jobs, reference previous code patterns, or answer questions about past agent work.
Trigger
Use this skill when:
- User asks about "what was done before" or "how was X solved"
- You need to reference solutions from past autonomous jobs
- Searching for code patterns, tools used, or approaches taken
- Reviewing cost/token usage across jobs
Location
Session logs live at: /job/logs/<JOB_ID>/*.jsonl
Each job folder contains:
job.md- The original task prompt*.jsonl- Full conversation transcripts (multiple sessions per job)job.config.json- Job configuration
Structure
Each .jsonl file contains messages with:
type: "session" (metadata), "message", "thinking_level_change", or "model_change"timestamp: ISO timestampmessage.role: "user", "assistant", or "toolResult"message.content[]: Text, thinking, or tool calls (filtertype=="text"for human-readable content)message.usage.cost.total: Cost per response
Commands
List all jobs by date and size
for dir in /job/logs/*/; do
if [ -d "$dir" ]; then
job_id=$(basename "$dir")
first_log=$(ls -t "$dir"/*.jsonl 2>/dev/null | head -1)
if [ -n "$first_log" ]; then
date=$(head -1 "$first_log" | jq -r '.timestamp' | cut -dT -f1)
size=$(du -sh "$dir" | cut -f1)
echo "$date $size $job_id"
fi
fi
done | sort -r
Find jobs from a specific day
for dir in /job/logs/*/; do
ls "$dir"/*.jsonl 2>/dev/null | while read f; do
head -1 "$f" | jq -r '.timestamp' 2>/dev/null | grep -q "2026-02-25" && echo "$dir"
done
done | sort -u
Extract user prompts from a session
jq -r 'select(.message.role == "user") | .message.content[]? | select(.type == "text") | .text' <session>.jsonl
Search for keyword in assistant responses
jq -r 'select(.message.role == "assistant") | .message.content[]? | select(.type == "text") | .text' <session>.jsonl | rg -i "keyword"
Get total cost for a job
cat /job/logs/<JOB_ID>/*.jsonl | jq -s '[.[] | .message.usage.cost.total // 0] | add'
Search across ALL sessions for a phrase
rg -l "phrase" /job/logs/*/*.jsonl
Find jobs where a specific tool was used
for dir in /job/logs/*/; do
if grep -q '"toolName":"bash"' "$dir"/*.jsonl 2>/dev/null; then
echo "$(basename "$dir")"
fi
done
Get tool usage breakdown for a job
cat /job/logs/<JOB_ID>/*.jsonl | jq -r '.message.content[]? | select(.type == "toolCall") | .name' | sort | uniq -c | sort -rn
Find the job prompt for a job
cat /job/logs/<JOB_ID>/job.md
Search job prompts for a topic
rg -l "topic" /job/logs/*/job.md
Find most recent job on a topic
for dir in $(ls -t /job/logs/*/); do
if rg -q "topic" "$dir"/*.jsonl 2>/dev/null; then
echo "$dir"
break
fi
done
Tips
- Sessions are append-only JSONL (one JSON object per line)
- Large jobs can have many session files (each represents a model switch or thinking level change)
- Use
head -1to sample the first message of a session for metadata - The
job.mdfile contains the original task prompt - always check this first for context - Costs accumulate across all session files in a job folder
Fast text-only hint (low noise)
cat /job/logs/<JOB_ID>/*.jsonl | jq -r 'select(.type=="message") | .message.content[]? | select(.type=="text") | .text' | rg 'keyword'
Example: Find how a similar task was solved
# 1. Find jobs about "email" or "send"
rg -l "email|send" /job/logs/*/job.md
# 2. Look at the most recent result
head -50 /job/logs/<found_job_id>/job.md
# 3. Search the session for the solution pattern
cat /job/logs/<found_job_id>/*.jsonl | jq -r 'select(.message.role == "assistant") | .message.content[]? | select(.type == "text") | .text' | rg -A 10 -B 2 "send_email"
More from winsorllc/upgraded-carnival
vector-memory
Vector-based semantic memory using embeddings for intelligent recall. Store and search memories by meaning rather than keywords. Use when you need semantic search, similar document retrieval, or context-aware memory.
131model-router
Route requests between different LLM providers and models. Configure routing rules, fallback providers, and model-specific parameters inspired by ZeroClaw and OpenClaw model routing systems.
63rss-monitor
Monitor RSS/Atom feeds and blogs for new content using feedparser.
59rss-reader
Read and parse RSS/Atom feeds. Use when: user wants to subscribe to feeds, get latest articles, or monitor news sources.
54video-frames
Production-grade video frame extraction with thumbnail grids, GIF creation, and batch frame processing. Includes intelligent quality presets, progress tracking, and comprehensive error handling.
39elevenlabs-tts
Convert text to speech using ElevenLabs API. Use when you need to generate voice audio for messages, narrations, or accessibility.
25