agentleFS
claude-worldclaude-world/claude-agent/.claude/skills/session-logs/SKILL.md

session-logs

Skill5 starsChanged 8 months agoMITView on GitHub

Search and analyze past Claude Code session logs using jq and ripgrep (rg). Find conversations by date, keyword, or topic. Extract decisions, code changes, and key moments from session history. Use when user says "search past sessions", "what did we discuss about X", "find old conversation", or "session history".

  • Installs packages

21 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use taskflow-inbox-triage, openclaw-release-maintainer and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • AtomicBot-aiSkill

    taskflow-inbox-triage

    Also in 6 projects that use this

  • hkyutongSkill

    openclaw-release-maintainer

    Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.

    Also in 4 projects that use this

  • AtomicBot-aiSkill

    taskflow

    Also in 6 projects that use this

  • hkyutongSkill

    node-connect

    Diagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps. Use when QR/setup code/manual connect fails, local Wi-Fi works but VPS/tailnet does not, or errors mention pairing required, unauthorized, bootstrap token invalid or expired, gateway.bind, gateway.remote.url, Tailscale, or plugins.entries.device-pair.config.publicUrl.

    Also in 8 projects that use this

  • TermiX-officialSkill

    healthcheck

    Host security hardening and risk-tolerance configuration for OpenClaw deployments. Use when a user asks for security audits, firewall/SSH/update hardening, risk posture, exposure review, OpenClaw cron scheduling for periodic checks, or version status checks on a machine running OpenClaw (laptop, workstation, Pi, VPS).

    Also in 16 projects that use this

  • TermiX-officialSkill

    xurl

    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.

    Also in 13 projects that use this

  • +4 more from hkyutong

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 21 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Search and analyze past Claude Code session and conversation logs using jq and rg (ripgrep).

    line 24
  2. Very specific:

    Always check if jq and rg are installed first before running searches

    line 131
  3. Distinctive:

    If not installed, show the install commands and stop

    line 132
  4. Distinctive:

    Never read or expose raw API keys, tokens, or credentials found in logs

    line 133
  5. Very specific:

    Default to searching memory/ and workspace/ first (faster).

    line 135
  6. Very specific:

    When results are large, save to workspace/session-search-<query>.md and summarize inline

    line 136

“Common” is measured: kept by at least 6 in 10 of the 21 edited versions of this file we could read. “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

Session Logs

Search and analyze past Claude Code session and conversation logs using jq and rg (ripgrep). No external CLI beyond jq and rg needed.

Prerequisites

# Install jq (JSON processor)
brew install jq          # macOS
sudo apt install jq      # Ubuntu/Debian

# Install ripgrep
brew install ripgrep     # macOS
sudo apt install ripgrep # Ubuntu/Debian

# Verify
jq --version && rg --version

Common Log Locations

LocationDescription
~/.claude/Claude Code settings and memory
~/.claude/projects/Per-project session data
workspace/Saved session outputs
memory/Agent memory files

Commands

List recent session files:

ls -lt ~/.claude/projects/ | head -20

Search session logs by keyword:

rg "keyword" ~/.claude/projects/ --type json -l

Search with context lines:

rg -C 3 "keyword" ~/.claude/projects/ --type json

Search memory files:

rg "topic" memory/ -l
rg -i "topic" memory/learned-today.md

Parse JSONL session file:

# Show all user messages from a session file
cat <session-file.jsonl> | jq -r 'select(.role=="user") | .content'

# Show assistant messages
cat <session-file.jsonl> | jq -r 'select(.role=="assistant") | .content[:200]'

# Extract tool uses
cat <session-file.jsonl> | jq -r 'select(.type=="tool_use") | {name, input}'

Search by date range:

# Find files modified in the last 7 days
find ~/.claude/projects/ -name "*.json" -newer $(date -d "7 days ago" +%Y-%m-%d 2>/dev/null || date -v-7d +%Y-%m-%d) 2>/dev/null

# macOS: files from today
find ~/.claude/projects/ -name "*.json" -newer $(date -v-1d +%Y-%m-%d)

Search workspace saved outputs:

rg -i "keyword" workspace/ -l
rg -i -C 2 "keyword" workspace/

Analyze memory for a topic:

rg -i "keyword" memory/ --type md

Usage Examples

Find past discussion about a feature:

rg -i "authentication" memory/ workspace/ --type md -l

Search all session files for a decision:

rg -i "decided to use" ~/.claude/projects/ --type json -C 2 | head -40

Extract key points from a session file:

# Summarize assistant responses from a specific session
jq -r 'select(.role=="assistant") | .content' <session.jsonl> | head -100

Review today's memory learnings:

cat memory/learned-today.md

Rules

  • Always check if jq and rg are installed first before running searches
  • If not installed, show the install commands and stop
  • Never read or expose raw API keys, tokens, or credentials found in logs
  • Redact sensitive patterns (tokens, passwords, API keys) before showing output
  • Default to searching memory/ and workspace/ first (faster); escalate to ~/.claude/projects/ if needed
  • When results are large, save to workspace/session-search-<query>.md and summarize inline
  • Limit inline output to 20-30 lines; always offer to save full results to workspace
  • Confirm searches with: "Found <N> matches for '<query>'"

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.