Agent Skills: glhf — Conversation History Search

>-

UncategorizedID: trevors/dot-claude/searching-history

Install this agent skill to your local

pnpm dlx add-skill https://github.com/TrevorS/dot-claude/tree/HEAD/skills/searching-history

Skill Files

Browse the full folder contents for searching-history.

Download Skill

Loading file tree…

skills/searching-history/SKILL.md

Skill Metadata

Name
searching-history
Description
Search past Claude Code sessions to recall prior solutions, commands, fixes, and decisions. Use when the user references earlier work ("how did I fix", "last time we", "pick up where we left off", "a few months ago", "what was that … I set up", "didn't I once").

glhf — Conversation History Search

Search your Claude Code conversation history using hybrid search (text + semantic).

How to run it (read this first)

Figure out the search query yourself, then run glhf searchnever run it empty and never bounce the question back to the user.

  • Explicit /glhf <query> → use $ARGUMENTS as the query: glhf search "$ARGUMENTS" --compact
  • Auto-triggered from the conversation$ARGUMENTS is empty. Derive concise search terms from what the user is trying to recall (the topic, error text, command, or project they referenced) and run the search with those. Do not ask them to restate it.

Example: user says "what was that cargo alias I set up?" → run glhf search "cargo alias" -t Bash --compact. Then read the hits and answer; chain into glhf session <id> --summary if you need fuller context.

Quick Examples

# Find past solutions
glhf search "authentication" --compact

# Find commands you've run
glhf search "docker" -t Bash --compact

# Filter by project and time
glhf search "bug" -p myapp --since 1w --compact

# Find errors
glhf search "failed" --errors --compact

# Check recent sessions
glhf recent -l 10

# Get session overview then dive deeper
glhf session abc123 --summary
glhf session abc123 --limit 30

Commands

| Command | Purpose | | --------- | ------------------------------------- | | search | Find content across all sessions | | session | View a specific session's content | | recent | List recent sessions | | status | Show index stats | | index | Update index (incremental by default) |

Search Flags

| Flag | Purpose | | ---------------- | --------------------------------------------------- | | --compact | One-line output, fewer tokens | | -l/--limit | Max results to return (default 10) | | -t/--tool | Filter by tool (Bash, Read, Edit, Grep, etc.) | | -p/--project | Filter by project name (substring match, . = cwd) | | --since | Time filter (1h, 2d, 1w, or date) | | --errors | Only show error results | | --json | Machine-readable JSON output |

Session Flags

| Flag | Purpose | | -------------- | ------------------------------------ | | --summary | Show session summary without content | | -l/--limit | Show only first N messages | | --json | Machine-readable JSON output |

Recommended Patterns

Find past solutions:

glhf search "problem description" --compact
glhf search "specific keyword" --compact
glhf session <id> --summary

Recall commands:

glhf search "git rebase" -t Bash --compact
glhf search "cargo" -t Bash --since 1w --compact

Find errors:

glhf search "error" --errors --since 1d --compact

Browse recent work:

glhf recent -l 10
glhf recent -p myproject

Tips

  1. Always use --compact — significantly reduces output tokens
  2. Chain commands: search, find session ID in output, then glhf session <id> --summary for full context
  3. Use -p . to filter to current project
  4. Use --json when piping to other tools or processing programmatically
  5. Index is incrementalglhf index only re-processes changed files. Use --full to rebuild, --skip-embeddings for text-only indexing
  6. Search shows staleness hints — if the index is behind, it prints how many files changed. Run glhf index to update