Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions src/content/docs/skills/deep-session-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
title: Deep Session Search
description: An OpenClaw skill for recovering prior context from session logs when memory is incomplete.
---

This skill helps recover decision context (domains, PRs, deploys, commands, and error trails) from historical OpenClaw sessions when those details were discussed but never promoted into long-term memory files.

## Why this exists

Sometimes important details are discussed in earlier sessions but never distilled into `MEMORY.md` or daily notes.

This skill gives the agent a reliable fallback path:

1. Try normal memory recall first.
2. If recall is missing/unclear, search session logs under `~/.openclaw/agents/main/sessions`.
3. Extract high-signal conversation/tool evidence without dumping noisy artifacts.

## What it does

- **Deep session grep** over `*.jsonl*` logs
- **Noise control** to avoid dependency/build blobs
- **Targeted narrowing** by exact domain, PR number, repo, deployment id, etc.
- **Evidence-first summaries** with path + relevant context

## Typical trigger

Use when the user asks things like:

- “What did we do with Cloudflare today?”
- “Check earlier sessions for that domain/config”
- “Find the command we used before”

…especially when memory search has low confidence.

## Search pattern

Prefer `ag` for fast uncompressed session log scans:

```bash
ag -n --nobreak --depth 1 -G '*.jsonl' "<search-term-1>|<search-term-2>" \
~/.openclaw/agents/main/sessions
```
Comment thread
obrera marked this conversation as resolved.

For compressed/rotated logs, use one of these:

```bash
# ripgrep with compressed-file support
rg -n --search-zip --max-depth 1 "<search-term-1>|<search-term-2>" \
~/.openclaw/agents/main/sessions -g '*.jsonl*'

# or gzip-specific fallback
find ~/.openclaw/agents/main/sessions -maxdepth 1 -name '*.jsonl.gz' \
-exec zgrep -HnE "<search-term-1>|<search-term-2>" {} +
Comment thread
obrera marked this conversation as resolved.
```
Comment thread
obrera marked this conversation as resolved.

Note: these examples use regex patterns. If your search terms are literals (like domains), either escape regex special characters or use fixed-string modes (for example: `ag -Q`, `rg -F`, `zgrep -F`).

Then narrow to exact needles for stronger evidence.

## Outcome format

The skill returns concise findings with:

- whether hits were found
- strongest 1–3 examples
- where they were found (path/context)
- confidence note if results are partial/noisy
1 change: 1 addition & 0 deletions src/content/docs/skills/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ description: OpenClaw agent skills we've built and use daily.
## Available

- **[agent-git-workflow](/skills/agent-git-workflow/)** — Run clean, reviewable GitHub PR workflows with disciplined commits, review loops, and safe merges.
- **[deep-session-search](/skills/deep-session-search/)** — Recover prior context from OpenClaw session logs when memory is incomplete.
- **[deploy](/skills/deploy/)** — Detect, generate, and deploy projects to Dokploy — fully automated.
- **[gh-repo-setup](/skills/gh-repo-setup/)** — Standardize GitHub repository settings with branch protection, metadata, and best-practice defaults.
- **[static-deploy](/skills/static-deploy/)** — Deploy static sites to Dokploy with CI, domains, and auto-deploy webhooks.
Loading