glhf
glhf — Conversation History Search
Search your Claude Code conversation history using hybrid search (text + semantic).
When invoked as /glhf <query>, run: glhf search "$ARGUMENTS" --mode semantic --compact
Quick Examples
# Find past solutions (semantic search)
glhf search "authentication" --mode semantic --compact
# Find commands you've run
glhf search "docker" -t Bash --compact
# Regex search for exact error messages
glhf search -e "ECONNREFUSED|ETIMEDOUT" --compact
# Search with context (like grep -C)
glhf search "panic" -C 2 --compact
# Check recent sessions
glhf recent -l 10
# Get session overview then dive deeper
glhf session abc123 --summary
glhf session abc123 --limit 50
Commands
| Command | Purpose |
|---|---|
search |
Find content across all sessions |
session |
View a specific session's content |
related |
Find sessions similar to a given one |
recent |
List recent sessions |
projects |
List all indexed projects |
status |
Show index stats |
index |
Rebuild the search index |
Key Search Flags
| Flag | Purpose |
|---|---|
--compact |
One-line output, fewer tokens |
--mode semantic |
Conceptual search (how to X, patterns) |
--mode text |
Exact keyword matching |
-e/--regex |
Regex pattern matching (like grep -e) |
-i/--ignore-case |
Case-insensitive (for regex mode) |
-A N/-B N/-C N |
Context lines after/before/around matches |
-t Bash |
Filter by tool (Bash, Read, Edit, Grep, etc.) |
-p . |
Filter to current project |
-X name |
Exclude a project by name (repeatable) |
--since 1d |
Time filter (1h, 2d, 1w, or date) |
--errors |
Only show error results |
--messages-only |
Exclude tool calls |
--tools-only |
Exclude messages |
--show-session-id |
Include session IDs for follow-up |
--json |
Machine-readable JSON output |
--scores |
Show relevance scores |
--oldest |
Reverse sort (oldest first) |
--include-this-project |
Override auto-exclusion of current project |
--include-this-session |
Override auto-exclusion of current session |
--this-session |
Filter to current session only |
Recommended Patterns
Find past solutions:
glhf search "problem description" --mode semantic --compact
glhf search "specific keyword" --show-session-id --compact
glhf session <id> --summary
Recall commands:
glhf search "git rebase" -t Bash --compact
glhf search "cargo" -t Bash --since 1w --compact
Regex search for exact errors:
glhf search -e "thread.*panicked" --compact
glhf search -e "error\[E\d+\]" -i --compact
Find similar work:
glhf recent -l 10
glhf related <session-id> --limit 5
Debug past errors:
glhf search "error" --errors --since 1d --compact
Cross-project search (override auto-exclusion):
glhf search "auth" --include-this-project --compact
glhf search "deploy" -X stable -X dotfiles --compact
Tips
- Always use
--compact— significantly reduces output tokens - Use
--mode semanticfor "how to" questions and conceptual searches - Use
-e(regex) for exact error messages and patterns - Chain commands: search → get session ID → view summary → get full context
- Current project/session auto-excluded when running inside Claude Code — use
--include-this-projector--include-this-sessionto override - Use
-p .to filter to current project when you want to include it - Use
--jsonwhen piping to other tools or processing programmatically - Index with
--skip-embeddingsfor fast text-only reindex
More from trevors/dot-claude
jj-workflow
Jujutsu (jj) version control, load skill when hook output shows vcs=jj-colocated or vcs=jj in the system-reminder.
93notion-formatter
Format markdown content for Notion import with proper syntax for toggles, code blocks, and tables. Use when formatting responses for Notion, creating Notion-compatible documentation, or preparing markdown for Notion paste/import.
47book-reader
Read and search digital books (PDF, EPUB, MOBI, TXT). Use when answering questions about a book, finding quotes or passages, navigating to specific pages or chapters, or extracting information from documents.
44using-jj
Advanced jj/jujutsu workflows — revsets, absorb, evolog, op restore/undo, immutable_heads bypass, divergent-change resolution, jj split, parallel jj new, conflict-after-rebase, force-push recovery. Contains non-obvious rules (e.g., always `-m` to avoid editor) that prevent broken workflows. Skip for simple commit/push/rebase.
43svelte5
Svelte 5 syntax reference. Use when writing ANY Svelte component. Svelte 5 uses runes ($state, $derived, $effect, $props) instead of Svelte 4 patterns. Training data is heavily Svelte 4—this skill prevents outdated syntax.
39maintaining-claude-code
Create, validate, and improve Claude Code configuration — SKILL.md files, CLAUDE.md, rules, hooks, and settings.json. Use when creating a new skill, writing a SKILL.md, adding a hook, editing rules, auditing skill descriptions, checking config quality, debugging hook behavior, or deciding between skills vs rules vs CLAUDE.md. Also auto-loads when working in ~/.claude/ on skills, rules, hooks, or settings.
32