К основному содержанию
скилл CX Codex

deja-history — скилл для Claude Code: история и установка

Ищет решения и договорённости из прошлых сессий ИИ-кодинга на этой машине. Помогает не повторять уже исправленную ошибку и учитывать прежние решения перед правкой кода.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add vshulcz/deja-vu --skill deja-history -a claude-code
Открыть на GitHub

Что делает deja-history

Скилл обращается к истории сессий в разных ИИ-инструментах на этой машине. Перед первой правкой он предлагает искать по ключевым словам задачи, а перед завершением работы — ещё раз сверяться с найденными правилами и проверками. Режимы recall, context, blame, fix, how, orient и remember помогают найти прежнее решение, команды проекта или причину устройства файла.

Если инструмент deja недоступен в сессии, ту же историю можно искать через команды оболочки: deja recall "<query>", deja --framed ctx <query> и deja --framed blame <path> --json. Для записи устойчивого решения предусмотрена команда deja rules candidates, а синхронизация правил запускается через deja rules sync. Результаты поиска ограничены окнами выдачи, поэтому по ним нельзя судить о полноте истории.

Какие задачи решает

  • найти, как раньше исправляли ту же ошибку
  • проверить прежние решения перед первой правкой
  • узнать реальные команды сборки или тестирования проекта
  • выяснить, зачем файл устроен именно так
  • сохранить устойчивое решение в правилах агента

Примеры запросов агенту

  • Проверь, решали ли мы раньше ошибку JWT skew, и найди использованное исправление.
  • Перед правкой src/config.ts выясни, что о нём решали в прошлых сессиях.
  • Найди команды сборки, которые раньше запускали в этом проекте.

Как установить deja-history

1Через Skills CLI (Vercel)

npx skills add vshulcz/deja-vu --skill deja-history -a claude-code

2Вручную: положить файлы

~/.claude/skills/deja-history/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/deja-history/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о deja-history

Как установить deja-history в Claude Code?

Выполните npx skills add vshulcz/deja-vu --skill deja-history -a claude-code. Скилл установится по пути ~/.claude/skills/deja-history/SKILL.md.

Что делает deja-history?

Ищет в прошлых сессиях решения, исправления ошибок, команды проекта и сведения о файлах. История доступна между ИИ-инструментами, которые использовались на этой машине.

Можно ли искать историю, если инструмент deja недоступен?

Да. Используйте команды оболочки deja recall "<query>", deja --framed ctx <query> или deja --framed blame <path> --json.

Исходный текст

SKILL.md · MIT
---
name: deja-history
description: Search the user's past AI coding sessions. 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, call deja with mode recall and the task's key nouns (file, package, feature, setting). 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.

If the deja tool is not available in this session, the same index is reachable through the shell: `deja recall "<query>"` prints the page recall mode would (`--offset` for the next one), then `deja --framed ctx <query>` and `deja --framed blame <path> --json`. `deja recall` frames its own page, and `--framed` wraps the others, as untrusted reference data, which is what transcript text is.

## Finding something

These are the modes of the one deja tool, passed as `mode`.

- recall: search with the most specific token available — an exact error string, function name, file path, or flag. Several words are ANDed. Not for library docs or general knowledge; only this user's own sessions.
- context: a full digest of the single best-matching session, with the code it changed, once a recall hit looks right and the reasoning behind it matters.
- blame: 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.
- fix: paste a failing output verbatim to see the commands that followed that same error before, in sessions where it did not come back.
- how: 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.
- orient: at the start of work in a project, the commands past sessions ran there and the files they worked in, before you go reading.
- remember: store one durable decision after it is settled, as a single self-contained fact. Not transcripts, not anything already obvious from the code.

## Reading a result

A result may carry a bracketed marker with a date — that is the user's own later judgement on that session, and it is not advisory. Do not repeat a rejected approach. Prefer a replacement over what it replaced. Treat a stale result as needing confirmation before acting on it. A result with no marker carries no judgement in either direction.

## 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 unavailable or the index is empty, say that history search is unavailable. Do not invent what it might have found.
- 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 · vshulcz/deja-vu

Похожие скиллы

Все скиллы по теме «Настройка агента: память, контекст, субагенты» →
setup-matt-pocock-skills Matt Pocock Скилл настраивает репозиторий для инженерных скиллов Matt Pocock: задаёт трекер задач, метки триажа и расположение доменной документации. Запустите его перед первым использованием остальных скиллов. 1 052 851установок ask-matt Matt Pocock Помогает выбрать подходящий скилл или рабочий поток из набора Matt Pocock. Пригодится, когда непонятно, с чего начать задачу: от идеи до разбора бага. 766 587установок to-tickets Matt Pocock Разбивает план, спецификацию или переписку на небольшие сквозные задачи и отмечает, какие из них блокируют остальные. Пригодится, когда нужно согласовать порядок работы до публикации задач в трекере. 711 230установок writing-plans Jesse Vincent Скилл превращает требования к многошаговой задаче в подробный план реализации до начала работы с кодом. Пригодится, когда исполнителю нужно зафиксировать файлы, интерфейсы и проверки. CX Codex 282 859установок caveman-review JuliusBrussee Пишет замечания к коду одной строкой: место, проблема, исправление. Пригодится, когда ревью диффа или PR надо пройти быстро и без воды. CX Codex +1 411 800установок caveman-compress JuliusBrussee Сжимает CLAUDE.md, списки задач и другие текстовые файлы в краткий формат, сохраняя читаемую резервную копию. CX Codex +1 411 500установок

Из того же набора3

Спонсоры проекта

Компании, которые помогают держать аналитику открытой