agentleFS
ofershapofershap/conversation-memory/.agents/skills/conversation-memory/SKILL.md

conversation-memory

Skill1 starsChanged 9 months agoMITView on GitHub

Use this skill when you need to recall something from a previous conversation session. This includes finding past debugging sessions, remembering architectural decisions, locating code changes from earlier work, or continuing a task you started days ago. Works with both Claude Code (~/.claude/history.jsonl) and Cursor (~/.cursor/projects/*/agent-transcripts/). Claude Code saves every conversation in two locations: Cursor stores full conversation transcripts per workspace: Never read an entire history file. They can be massive. Then read only the matching session transcript. Claude Code…

4 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions4 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 4

    1. Fandry96/k3-agentic-skills★ 27same name
    2. xfstudio/skills★ 9same name
    3. ai4brands-design/claude-skills★ 2same name
    4. lauren-framework/lauren-ai★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. About 0 are common, 15 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈15

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when you need to recall something from a previous conversation session.

    line 12
  2. Distinctive:

    Use this for searching across all projects by keyword

    line 27
  3. Very specific:

    Search ~/.claude/history.jsonl by keyword/date to find the session ID

    line 37
  4. Very specific:

    Read the full session from ~/.claude/projects/<project>/<session-id>.jsonl

    line 38
  5. Distinctive:

    Don't try to read the entire file at once for large conversations

    line 61
  6. Distinctive:

    Search for specific keywords, error messages, or file paths mentioned

    line 62
  7. Distinctive:

    Never read an entire history file.

    line 68
  8. Distinctive:

    When you find a relevant past conversation, extract only the key decisions, code changes, and conclusions.

    line 114
  9. Distinctive:

    When a search returns multiple sessions, present them as options:

    line 145
  10. Distinctive:

    Only search history for the current user's home directory

    line 159
  11. Distinctive:

    Don't expose full session contents unprompted — summarize first

    line 160
  12. Distinctive:

    If a session contains sensitive data (API keys, passwords visible in logs), note that without repeating the values

    line 161
  13. Distinctive:

    Search history by keyword and approximate date

    line 169
  14. Distinctive:

    Read the relevant portion (last 50-100 lines, or grep for specific terms)

    line 171
  15. Distinctive:

    Search for the decision point in history

    line 178
  16. Distinctive:

    Search history for git commands: "checkout -b", "branch", "pr create"

    line 185
  17. Distinctive:

    Verify it still exists with git/gh commands in the current session

    line 187

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

When to use

Use this skill when you need to recall something from a previous conversation session. This includes finding past debugging sessions, remembering architectural decisions, locating code changes from earlier work, or continuing a task you started days ago. Works with both Claude Code (~/.claude/history.jsonl) and Cursor (~/.cursor/projects/*/agent-transcripts/).

How Conversation History is Stored

Claude Code

Claude Code saves every conversation in two locations:

  1. Global index — ~/.claude/history.jsonl
    • One JSON object per line, each representing a single user prompt
    • Fields: prompt text, timestamp, project path, session ID
    • Grows indefinitely, never auto-deleted
    • Use this for searching across all projects by keyword
  2. Full session transcripts — ~/.claude/projects/<project-path>/
    • Project directory names use dashes replacing path slashes (e.g., -Users-me-Code-myproject/)
    • Each session is a .jsonl file named by session ID
    • Contains the complete conversation: user messages, assistant responses, tool calls, results
    • sessions-index.json has metadata: summaries, message counts, git branches, timestamps
    • memory/MEMORY.md holds auto-memory
  3. Session lookup flow:
    • Search ~/.claude/history.jsonl by keyword/date to find the session ID
    • Read the full session from ~/.claude/projects/<project>/<session-id>.jsonl
    • Or read sessions-index.json for summaries without loading full transcripts

Cursor

Cursor stores full conversation transcripts per workspace:

  1. Agent transcripts — ~/.cursor/projects/<workspace-path>/agent-transcripts/
    • Workspace path uses dashes replacing slashes (e.g., Users-me-Code-myproject/)
    • Each conversation is a directory named by UUID
    • Inside: <uuid>.jsonl with full conversation data
    • Messages alternate between "role":"user" and "role":"assistant"
    • User prompts are inside <user_query> tags in the message content
    • Tool calls appear as [Tool call] and [Tool result] blocks
  2. Finding the right workspace:
    • List ~/.cursor/projects/ to see all workspace directories
    • Match by project name in the directory name
    • List the agent-transcripts/ subdirectory to see all conversations
    • Sort by modification time to find recent ones
  3. Reading transcripts:
    • Files can be large — search with grep/rg first, then read relevant chunks
    • Don't try to read the entire file at once for large conversations
    • Search for specific keywords, error messages, or file paths mentioned

Critical Rules

1. Search Before Reading

Never read an entire history file. They can be massive.

Wrong:

Read ~/.claude/history.jsonl
(loads thousands of lines, blows context window)

Correct:

grep -i "authentication bug" ~/.claude/history.jsonl | tail -20

Then read only the matching session transcript.

2. Use the Right Search Strategy per Tool

Claude Code — keyword search across all projects:

grep -i "search term" ~/.claude/history.jsonl | tail -20

Claude Code — find sessions for a specific project:

ls ~/.claude/projects/-Users-me-Code-myproject/
cat ~/.claude/projects/-Users-me-Code-myproject/sessions-index.json

Cursor — find recent conversations in a workspace:

ls -lt ~/.cursor/projects/Users-me-Code-myproject/agent-transcripts/

Cursor — search across all workspaces:

rg -l "search term" ~/.cursor/projects/*/agent-transcripts/*/*.jsonl

3. Extract Context, Don't Dump Transcripts

When you find a relevant past conversation, extract only the key decisions, code changes, and conclusions. Don't paste the entire transcript into current context.

Wrong:

Here's the full previous conversation (4000 lines)...

Correct:

From session on Feb 18 (project: myapp):
- We found the auth bug was caused by expired JWT refresh tokens
- Fix: added token rotation in middleware/auth.ts
- Branch: fix/jwt-refresh (PR #47, merged)
- Open follow-up: rate limiting on the refresh endpoint

4. Match User Intent to Search Scope

User says...Search strategy
"yesterday we looked at..."Filter by date in history.jsonl or sort transcripts by mtime
"we had a bug in the auth..."Keyword search for "auth" + "bug" across history
"continue what we started on feature X"Find session by feature name, extract last state
"what branch did we create for..."Search for "branch" or "git checkout" in transcripts
"remember when we discussed..."Broad keyword search, then read matching sessions

5. Handle Multiple Matches Gracefully

When a search returns multiple sessions, present them as options:

Found 3 sessions mentioning "auth":

1. Feb 18, 15:30 — myapp — "Debug JWT refresh token expiry"
2. Feb 12, 09:15 — myapp — "Add OAuth2 Google login"
3. Jan 28, 14:00 — api-service — "Auth middleware refactor"

Which one are you referring to?

6. Respect Privacy Boundaries

  • Only search history for the current user's home directory
  • Don't expose full session contents unprompted — summarize first
  • If a session contains sensitive data (API keys, passwords visible in logs), note that without repeating the values

Patterns

Resuming a Previous Task

  1. User mentions something from a past session
  2. Search history by keyword and approximate date
  3. Find the session ID / transcript UUID
  4. Read the relevant portion (last 50-100 lines, or grep for specific terms)
  5. Summarize: what was done, what was the conclusion, what's left
  6. Continue the work in the current session

Cross-Referencing Decisions

  1. User asks "why did we do X?"
  2. Search for the decision point in history
  3. Find the conversation where X was discussed
  4. Extract the reasoning and alternatives considered
  5. Present the rationale without loading the full transcript

Finding a Lost Branch or PR

  1. Search history for git commands: "checkout -b", "branch", "pr create"
  2. Extract the branch name and PR number
  3. Verify it still exists with git/gh commands in the current session

Anti-Patterns

  • Reading entire history files into context (context window explosion)
  • Searching without date/keyword constraints (too many results)
  • Dumping raw JSONL into the conversation (unreadable)
  • Assuming conversation history exists for all tools (only Claude Code and Cursor store it)
  • Searching other users' history directories
  • Treating history as authoritative (code may have changed since the conversation)

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.