Agent skill

Deja Session Memory Search

by vshulcz in vshulcz/deja-vu

Searches your own past AI coding sessions across every tool on this machine with the deja CLI, before you re-debug something already solved or deny that it exists.

MITAuto-check passedAgent Workflows

Install Deja Session Memory Search

skills CLI
$ npx skills add vshulcz/deja-vu --skill deja-search -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install vshulcz/deja-vu deja-search --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/vshulcz/deja-vu.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/deja-search .claude/skills/deja-search && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
deja-search
GitHub stars
1.2k
Token cost
~2k tokens
SKILL.md length
1,223 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Searches your own past AI coding sessions across every tool on this machine with the deja CLI, before you re-debug something already solved or deny that it exists.

  • Works in 3 steps: Run deja rules candidates (--since 90d… → Find the standing rules in that list:… → Show the list and stop. Write nothing…
  • Before re-debugging an error that may already have been solved before
  • SKILL.md covers Finding something, Reading a result, Saying what you used and Limits worth respecting, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

The skill is meant to run before debugging an error, before changing code, a config, a dependency or a schedule, and before telling the user that something does not exist, since absence from the code in front of the agent is not absence from the machine's session history and a wrong denial can send someone to rebuild what they already have. Two easy-to-miss triggers are when a user states, rather than asks, that something already exists, such as I already have X or we use Y for this, and when the agent is about to claim a command, file, setting or past decision does not exist.

A search command runs with the task's most specific token, such as an exact error string, function name or file path, ANDing multiple words and searching only the user's own past sessions, never library docs; a context command gives a full digest of the best-matching session once a hit looks right; a show command pages the actual turns of a session by its id and harness; and a blame command shows, before editing or deleting a file, the prior sessions that discussed it, optionally narrowed to one line. A dedicated MCP tool, when wired into the harness, offers the same index through one tool with several modes instead of shelling out.

When your agent uses it

  • Before re-debugging an error that may already have been solved before
  • Before telling the user that a file, command or setting doesn't exist on their machine
  • Checking why a file is shaped the way it is before editing or deleting it

Example prompts

  • “Search deja for whether we already fixed this exact error before.”
  • “Before I delete this config file, check deja blame for why it was added.”
  • “What did we decide about the retry logic last time we touched this?”

Requirements

  • The deja CLI, or its MCP tool if the harness has it wired in

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Run deja rules candidates (--since 90d for recent ones). It lists turns where the user corrected an agent, across every tool on this…
  2. Find the standing rules in that list: preferences the user would want applied in every future session, stated in at least two different…
  3. Show the list and stop. Write nothing until the user picks. Then show the exact lines you will append to the rules file deja rules names…

What it can do on your machine

Read from SKILL.md and the folder at commit 2cba7ef. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Deja Session Memory Search loads about 2k tokens when it runs. Until then it costs about 157 tokens; SKILL.md has 1,223 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~157
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from vshulcz/deja-vu at commit 2cba7ef, republished under its MIT licence (© vshulcz). 1,223 words, ~2,050 tokens.

Download SKILL.mdSave it as .claude/skills/deja-search/SKILL.md (or your agent's skills folder).
name
deja-search
description
deja-vu memory — search the user's past AI coding sessions with the deja CLI. Holds what they already settled and never wrote into the repo (naming rules, banned or already-tried tools, required checks before merge, preferred values, who owns what). Use before your first edit in a task, before you call a change done or ready to merge, before you recommend a tool, library, design or reviewer, before re-debugging an error that may already be solved, when they say 'didn't we fix this before', 'what did we decide about X' or 'I already have that', and before telling them something on this machine does not exist.

Search deja before re-deriving past work: when the user refers to earlier sessions or decisions, before debugging an error, and before implementing something that may already exist. It searches this machine's own history across every AI coding tool used on it, going back further than deja itself was installed.

Before your first edit in a task, and again before you call a change done, ready or safe to merge, run deja recall "<key nouns>" with the task's key nouns (file, package, feature, setting). It prints a short page, this project first. A rule, a rejected option or a check it returns outranks your defaults: follow it and say so in one line.

Two triggers are easy to miss because they are not questions:

  • The user states that something of theirs already exists and you have no record of it — "I already have X", "we use Y for this", "that's what Z is for". They are not asking; they are telling you the history exists, which is a stronger reason to search than a question is.
  • You are about to tell the user that something on this machine does not exist — a command, a file, a setting, a past decision. Recall first. Absence from the code in front of you is not absence from the machine, and a wrong denial sends them to rebuild what they have.

This skill drives the deja binary through the shell. If the deja MCP tool is available in this session — one tool with a mode of recall, context, blame, fix, how, orient or remember — use that instead: same index, one less hop. It appears only when deja install has wired this harness.

Finding something

  • deja recall "<query>": a short page of the sessions that bear on the query, this project first, sized for an agent to read whole. Start here.
  • deja search --json "<query>": the most specific token available — an exact error string, function name, file path, or flag. Several words are ANDed. Only this user's own sessions, never library docs or general knowledge.
  • deja ctx <query|id-prefix>: a full digest of the single best-matching session, once a hit looks right and the reasoning behind it matters. Takes no flags.
  • deja show <id-prefix> --harness <name> --json: the turns themselves, paged with --offset and --limit. Use the id and harness a hit printed.
  • deja blame <path> --json: before editing, refactoring or deleting a file, the prior sessions that discussed it, so you know why it is shaped the way it is. Session history, not git authorship. deja blame <path>:<line> narrows it to one line: the commit that last changed it and the session whose edit replaced the text that commit deleted, or one sentence saying why neither can be named.
  • deja fix "<pasted error>": the commands that followed that same error before, in sessions where it did not come back. Paste the failing output verbatim.
  • deja how <what>: the real command with the real flags this machine runs for a build, test, deploy or script, ordered by how many sessions ran it. A guessed invocation is plausible and fails on this setup. It answers from this project; --all-projects asks the machine, which is what to use when the answer is a tool rather than a repository's own wrapper.
  • deja remember "<text>": store one durable decision after it is settled, as a single self-contained fact. Not transcripts, not anything already obvious from the code.
  • deja wip: what the last session in this directory was doing — the task, what it settled, the files in flight, the last command and whether it failed. Ask it when you have lost the thread of your own work, after a compaction or on a fresh session in a repository you were just in.

Useful flags on search: --harness, --project, --since 30d, --role user|assistant|tool|files|command|edit|summary, --session <id>, --limit 1-100, --all, --re for a regular expression.

Reading a result

--json returns an envelope: tier, total, capped, hits.

  • tier: "relevance" means nothing matched — those are the nearest sessions deja could find, and counting them as hits overstates what is there. tier: "error" IS a match: the query was an error and those sessions hit it, matched by signature rather than by words.
  • total is how many sessions matched; capped says a cap hid some of them. Read those two for coverage, never the length of hits.
  • policy_withheld, when present, is how many matching sessions this machine's trust policy kept out of the answer — an empty result and a rule are different answers.
  • A hit may carry superseded with a date: the user's own later judgement on that session. Do not repeat a rejected approach, prefer a replacement over what it replaced, and treat a stale result as needing confirmation before acting on it. A hit without it carries no judgement either way.
Show full SKILL.md (428 more words)Show less

Saying what you used

When recalled history genuinely helps — a reused fix, a skipped re-debug, even a partial hint that changed your approach — tell the user in one short line at the start of your reply, naming the session: "déjà vu: we hit this JWT skew in March — reusing that fix (deja:a1b2c3d4-e5f)". Say nothing about recalls that did not help. This is provenance, not advertising; a note on every call would be noise.

Limits worth respecting

  • Result windows are bounded. Do not report corpus-wide counts, or claim a complete audit, from the number of hits you got back.
  • If deja is not on PATH or the index is empty, say that history search is unavailable. Do not invent what it might have found.
  • Work a subagent did is in the index as its task, its answer and the edits it made, not in full. A Claude Task or a Cursor subagent writes its turns and tool calls to its own transcript, and the parent keeps only the launch and a summary — so a hit on the parent can look complete while the run itself is elsewhere. DEJA_INCLUDE_SUBAGENTS=1 takes the whole child transcript in; Cursor's are still left out by default.
  • Vary the wording and try a second query before concluding nothing is there. Exact tokens match best, so an error string beats a paraphrase of it.

Rules the user keeps repeating

When the user asks you to find or suggest their standing rules — the things they keep having to tell their agents:

  1. Run deja rules candidates (--since 90d for recent ones). It lists turns where the user corrected an agent, across every tool on this machine, each numbered #n with the session it came from. It writes nothing.
  2. Find the standing rules in that list: preferences the user would want applied in every future session, stated in at least two different sessions. Ignore one-off corrections about a specific task. For each rule give one imperative sentence, the #n that state it, and how many distinct sessions. At most 15, most recurring first.
  3. Show the list and stop. Write nothing until the user picks. Then show the exact lines you will append to the rules file deja rules names, append only those, and run deja rules sync, which copies the file into every installed agent's global rules file.

This takes a strong model: on one machine's 236 candidates a frontier model found the user's recurring rules with real citations, and a 9B local model invented candidate numbers. On a small model, say so rather than guess.

© vshulcz, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/deja-search of vshulcz/deja-vu.

Open the folder on GitHubat commit 2cba7ef

Compare with similar skills

Deja Session Memory Search next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Deja Session Memory Search compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Deja Session Memory Search this skillvshulcz/deja-vu1.2k—~2kAutomated safety check: PassMIT
Beads Task Memorygastownhall/beads28k—~1.2kAutomated safety check: PassMIT
Session History Searchslopus/happy24k—~3.1kAutomated safety check: PassMIT
Memori Long-Term MemoryMemoriLabs/Memori17k—~2kAutomated safety check: NotesCustom licence
Coding Agent Session Findercode-yeongyu/oh-my-openagent70k—~2.8kAutomated safety check: PassCustom licence
Memori MCP Memory UsageMemoriLabs/Memori17k—~3.8kAutomated safety check: PassMIT

Similar skills

  • Beads Task Memory

    gastownhall/beads

    Tracks multi-session work with dependencies in the bd issue tracker so the agent can find ready tasks and recover its context after conversation compaction.

    28k GitHub stars~1.2k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Searches past Claude Code, Codex and Cursor sessions and summarizes what was worked on, tried or decided, using extraction scripts instead of reading raw logs.

    24k GitHub stars~3.1k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Memori Long-Term Memory

    MemoriLabs/Memori

    Connects Claude Code to Memori Cloud for long-term memory, recalling stored context before substantive replies and saving new context afterward.

    17k GitHub stars~2k tokensUpdated 8 days ago
    Agent WorkflowsAuto-check: notes
  • Coding Agent Session Finder

    code-yeongyu/oh-my-openagent

    Finds, reads and reconstructs past coding-agent sessions across Codex, Claude, OpenCode, Senpi and many other local agent logs.

    70k GitHub stars~2.8k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Memori MCP Memory Usage

    MemoriLabs/Memori

    Teaches an MCP-connected agent when and how to call Memori's recall, summary, compaction, augmentation, feedback and quota tools to keep context across sessions.

    17k GitHub stars~3.8k tokensUpdated 8 days ago
    Agent WorkflowsAuto-check passed
  • Ourmem

    ourmem/omem

    Shared memory that never forgets. An agent skill from ourmem/omem.

    174 GitHub starsUsed in 1 repo~3.4k tokens
    Agent WorkflowsAuto-check passed

More from vshulcz/deja-vu

  • Deja History Search

    vshulcz/deja-vu

    Searches this machine's own history of past AI coding sessions across every tool used on it, before work is redone or something is denied.

    1.2k GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check passed

Categories

Questions about Deja Session Memory Search

What does Deja Session Memory Search do?

Searches your own past AI coding sessions across every tool on this machine with the deja CLI, before you re-debug something already solved or deny that it exists. The skill is meant to run before debugging an error, before changing code, a config, a dependency or a schedule, and before telling the user that something does not exist, since absence from the code in front of the agent is not absence from the machine's session history and a wrong denial can send someone to rebuild what they already have. Two easy-to-miss triggers are when a user states, rather than asks, that something already exists, such as I already have X or we use Y for this, and when the agent is about to claim a command, file, setting or past decision does not exist.

When should I use Deja Session Memory Search?

Deja Session Memory Search fits situations like: before re-debugging an error that may already have been solved before; before telling the user that a file, command or setting doesn't exist on their machine; checking why a file is shaped the way it is before editing or deleting it.

How do I install Deja Session Memory Search in Claude Code?

Run `npx skills add vshulcz/deja-vu --skill deja-search -a claude-code`. Or copy the skill folder (skills/deja-search in vshulcz/deja-vu) into .claude/skills/deja-search in your project. Claude Code loads it when a task matches its description.

How do I install Deja Session Memory Search in Codex?

Run `npx skills add vshulcz/deja-vu --skill deja-search -a codex`. Or copy the skill folder (skills/deja-search in vshulcz/deja-vu) into .agents/skills/deja-search in your project. Codex loads it when a task matches its description.

Can I use Deja Session Memory Search in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add vshulcz/deja-vu --skill deja-search -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/deja-search, .gemini/skills/deja-search, .github/skills/deja-search and .opencode/skills/deja-search in your project.

What does Deja Session Memory Search need to run?

SKILL.md names no scripts, command-line tools or credentials: Deja Session Memory Search is instructions for the agent only. Our summary lists: The deja CLI, or its MCP tool if the harness has it wired in.

Does Deja Session Memory Search access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Deja Session Memory Search safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Deja Session Memory Search use?

Deja Session Memory Search is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Deja Session Memory Search use?

About 2k tokens (SKILL.md is roughly 8.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Deja Session Memory Search?

Skills that share tags, products or a category with Deja Session Memory Search: Beads Task Memory (gastownhall/beads, 28k stars), Session History Search (slopus/happy, 24k stars), Memori Long-Term Memory (MemoriLabs/Memori, 17k stars) and Coding Agent Session Finder (code-yeongyu/oh-my-openagent, 70k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Deja Session Memory Search?

vshulcz (a GitHub user) maintains it in vshulcz/deja-vu, which has 1,169 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 10, 2026.

Source: vshulcz/deja-vu on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.