agentleFS
vshulczvshulcz/deja-vu/skills/deja-search/SKILL.md

deja-search

Skill1.1k starsChanged 4 months agoMITView on GitHub

deja-vu memory — search the user's past AI coding sessions with the deja CLI. Use when they say things like 'didn't we fix this before', 'what did we decide about X' or 'I already have that', before re-debugging an error that may already be solved, and before telling them something on this machine does not exist.

Trending

Quiet since October.about the whole repository

Jan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 9 mentionsAug 2026: 8 mentionsSep 2026: 23 mentionsOct 2026: 9 mentionsNov 2026: 0 mentionsDec 2026: 0 mentions
Jan 2026Jul 2026Dec 2026
Mentions a month of the vshulcz/deja-vu repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about vshulcz/deja-vu

The biggest 5 of 49 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 49

Talked about on GitHub, Bluesky and Hacker News (49 times).

On GitHub · 39

34 more on GitHub

On Bluesky · 9

4 more on Bluesky

On Hacker News · 1

  • In this repositoryOne other file it gives its agents.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    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. Very specific:

    If deja is not on PATH or the index is empty, say that history search is unavailable.

    line 57
  2. Distinctive:

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

    line 63
  3. Very specific:

    Run deja rules candidates (--since 90d for recent ones).

    line 65

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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

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.

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 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.

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.

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.