All skills
obra avatar

/remembering-conversations

@bb6346c
by Jesse Vincentobra/clank41 stars
27

Search previous Claude Code conversations for facts, patterns, decisions, and context using semantic or text search

Use this Skill: https://skilld.dev/gh/obra/clank/remembering-conversations

This session only. Nothing lands on disk.

toolpromptssearch-agent.md

≈1.3k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Conversation Search Agent

You are searching historical Claude Code conversations for relevant context.

Your task:

  1. Search conversations for: {TOPIC}
  2. Read the top 2-5 most relevant results
  3. Synthesize key findings (max 1000 words)
  4. Return synthesis + source pointers (so main agent can dig deeper)

Search Query

{SEARCH_QUERY}

What to Look For

{FOCUS_AREAS}

Example focus areas:

  • What was the problem or question?
  • What solution was chosen and why?
  • What alternatives were considered and rejected?
  • Any gotchas, edge cases, or lessons learned?
  • Relevant code patterns, APIs, or approaches used
  • Architectural decisions and rationale

How to Search

Run:

~/.claude/skills/collaboration/remembering-conversations/tool/search-conversations "{SEARCH_QUERY}"

This returns:

  • Project name and date
  • Conversation summary (AI-generated)
  • Matched exchange with similarity score
  • File path and line numbers

Read the full conversations for top 2-5 results to get complete context.

Output Format

Required structure:

Summary

[Synthesize findings in 200-1000 words. Adapt structure to what you found:

  • Quick answer? 1-2 paragraphs.
  • Complex topic? Use sections (Context/Solution/Rationale/Lessons/Code).
  • Multiple approaches? Compare and contrast.
  • Historical evolution? Show progression chronologically.

Focus on actionable insights for the current task.]

Sources

[List ALL conversations examined, in order of relevance:]

1. [project-name, YYYY-MM-DD] - X% match Conversation summary: [One sentence - what was this conversation about?] File: ~/.clank/conversation-archive/.../uuid.jsonl:start-end Status: [Read in detail | Reviewed summary only | Skimmed]

2. [project-name, YYYY-MM-DD] - X% match Conversation summary: ... File: ... Status: ...

[Continue for all examined sources...]

For Follow-Up

Main agent can:

  • Ask you to dig deeper into specific source (#1, #2, etc.)
  • Ask you to read adjacent exchanges in a conversation
  • Ask you to search with refined query
  • Read sources directly (discouraged - risks context bloat)

Critical Rules

DO:

  • Search using the provided query
  • Read full conversations for top results
  • Synthesize into actionable insights (200-1000 words)
  • Include ALL sources with metadata (project, date, summary, file, status)
  • Focus on what will help the current task
  • Include specific details (function names, error messages, line numbers)

DO NOT:

  • Include raw conversation excerpts (synthesize instead)
  • Paste full file contents
  • Add meta-commentary ("I searched and found...")
  • Exceed 1000 words in Summary section
  • Return search results verbatim

Example Output

### Summary

developer needed to handle authentication errors in React Router 7 data loaders
without crashing the app. The solution uses RR7's errorElement + useRouteError()
to catch 401s and redirect to login.

**Key implementation:**
Protected route wrapper catches loader errors, checks error.status === 401.
If 401, redirects to /login with return URL. Otherwise shows error boundary.

**Why this works:**
Loaders can't use hooks (tried useNavigate, failed). Throwing redirect()
bypasses error handling. Final approach lets errors bubble to errorElement
where component context is available.

**Critical gotchas:**
- Test with expired tokens, not just missing tokens
- Error boundaries need unique keys per route or won't reset
- Always include return URL in redirect
- Loaders execute before components, no hook access

**Code pattern:**
```typescript
// In loader
if (!response.ok) throw { status: response.status, message: 'Failed' };

// In ErrorBoundary
const error = useRouteError();
if (error.status === 401) navigate('/login?return=' + location.pathname);

Sources

1. [react-router-7-starter, 2024-09-17] - 92% match Conversation summary: Built authentication system with JWT, implemented protected routes File: ~/.clank/conversation-archive/react-router-7-starter/19df92b9.jsonl:145-289 Status: Read in detail (multiple exchanges on error handling evolution)

2. [react-router-docs-reading, 2024-09-10] - 78% match Conversation summary: Read RR7 docs, discussed new loader patterns and errorElement File: ~/.clank/conversation-archive/react-router-docs-reading/a3c871f2.jsonl:56-98 Status: Reviewed summary only (confirmed errorElement usage)

3. [auth-debugging, 2024-09-18] - 73% match Conversation summary: Fixed token expiration handling and error boundary reset issues File: ~/.clank/conversation-archive/react-router-7-starter/7b2e8d91.jsonl:201-345 Status: Read in detail (discovered gotchas about keys and expired tokens)

For Follow-Up

Main agent can ask me to:

  • Dig deeper into source #1 (full error handling evolution)
  • Read adjacent exchanges in #3 (more debugging context)
  • Search for "React Router error boundary patterns" more broadly

This output:
- Synthesis: ~350 words (actionable, specific)
- Sources: Full metadata for 3 conversations
- Enables iteration without context bloat

Source: SKILL.md on GitHub

1 warning4mo3 checks · Risk MEDIUM
  • Gen Agent Trust Hub4mo

    This skill provides a comprehensive system for indexing and searching past Claude conversations using semantic search and AI-generated summaries. It implements a persistence mechanism via a platform hook to automatically update its index, which is its primary functional feature. The skill uses local models for embeddings to maintain privacy while sending data to Anthropic for summarization via the official platform SDK.

  • Socket4mo

    No alerts

  • Snyk4mo

    Risk: LOW · No issues

Signed by skilld at bb6346c. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Dormantupdated last year
version
1.0.0
Other metadata
when_to_use
When your human partner mentions "we discussed this before". When debugging similar issues. When looking for architectural decisions or code patterns from past work. Before reinventing solutions. When you need to find a specific git SHA or error message.
  • Debugging
  • conversation-search
  • semantic-search
  • context-retrieval
  • claude-code
  • decision-tracking
  • architecture

README badge

README badge for obra/clank

Searches archived Claude Code conversations by semantic similarity or exact text match to recover facts, architectural decisions, code patterns, and debugging context from past sessions. Use it when your human mentions "we discussed this before" or when debugging recurring issues to avoid reinventing solutions.

Generated from the current SKILL.md.

How do I search conversations outside of Claude Code?
Use the CLI tool at ~/.claude/skills/collaboration/remembering-conversations/tool/search-conversations with a query string. Supports vector similarity (default), exact text match (--text flag), or both modes.
What's the difference between semantic and text search?
Semantic search finds conceptually similar conversations; text search matches exact strings like git SHAs or error messages. Use --text for precise matches and the default mode for topic-based lookups.
Can I filter search results by date?
Yes. Use --after YYYY-MM-DD and --before YYYY-MM-DD flags to narrow results to a specific time range.
When should I use this skill instead of searching the current conversation or codebase?
Search previous conversations when looking for architectural decisions, past code patterns, or context from earlier sessions. Use Grep/Read for info already in the current conversation or codebase.
Does this skill require setup?
Yes. Refer to INDEXING.md in the skill directory for initial setup instructions before using the search tool.

Generated from the current SKILL.md. These answers refresh after source changes.