Deja — Development skill for Claude Code
Déjà vu for your coding agent: cache-safe back-reference compression that stops Claude Code from paying twice for context it has already seen.
How to install Deja
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open Neal006/deja and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Deja does
Déjà vu for your coding agent: cache-safe back-reference compression that stops Claude Code from paying twice for context it has already seen.
Alternatives in Development
- Epic Publish — Publish a validated epic update back to the issue and local cache 243.5k ★
- Dense Compression Protocol — Astryx Translation Protocol 30.7k ★
- Claude-code-safety-net Rules Reference — Custom rules reference for defining safe/dangerous command patterns 1.2k ★
README
deja
**Your coding agent pays for the same context over and over. deja stops that, and doesn't break your prompt cache doing it.**
npx dejactx audit # what did stale context cost you? (reads local history, sends nothing)
npx dejactx claude # run Claude Code through deja
On 48 real Claude Code sessions (2,740 API requests), replayed request by request with exact prompt-cache billing:
| strategy | input bill | average prompt |
|---|---|---|
| as it happened | $202 | 87.6k tokens |
| eager pruning (what context pruners do) | −14.1% | |
| deja | −31.0% | 55.9k |
Run `npx dejactx audit` to get this table for your own history.
The problem nobody measures
Every API request an agent makes resends the **entire** conversation. A 400-line `npm test` log the agent glanced at once rides along in every request after that. In the sessions above, tool output alone was **1.3M tokens when counted once, but 76M tokens actually sent**, because each result was resent about **58 times** on average.
Prompt caching makes those resends cheaper (0.1× price), but not free. They also fill the context window, which triggers lossy auto-compaction sooner.
The obvious fix is to prune old tool output. **It backfires.** The prompt cache matches on an exact prefix, so editing an old message invalidates everything after it, and the whole tail is re-billed at 1.25×. Prune eagerly and you keep paying for cache rewrites. In the replay, eager pruning that waits 20 requests before pruning cost **28% more than doing nothing at all**:
| output counts as stale after | eager pruning | deja |
|---|---|---|
| 5 requests | −14.1% | −31.0% |
| 10 requests | +4.2% | −26.9% |
| 20 requests | +28.4% | −21.7% |
(Reproduce with `npx dejactx audit --min-age 20`.)
How deja works
deja is a local proxy between your agent and the Anthropic API (`ANTHROPIC_BASE_URL`). It has two engines.
1. Dedup: back-references that never touch the cache
Each new
Related Skills
Vulyk Pause
Pause the loop - creates the PAUSE semaphore so it stops at its next safe point and hands the tree back
Afk Timer
Claude Code mod: shows how long you've been AFK and warns when the prompt cache has likely expired, so you can
Deja Vu
Prior-art hunt skill for Claude Code — most problems are already solved; the gap is seeing them. 10-stage loop
Skill Prompt Optimize
A Claude Code agent skill with lossless prompt compression, role-based tool description rewrites, and placehol
Claude Code Pwsh Guard
Claude Code hook pack that stops the agent firing Bash-only syntax at a Windows PowerShell session. Detects ex
Cognikernel
Persistent, structured project memory for Claude Code and Codex - event-sourced, typed, fail-open. Your agent
Related Agents
Tracker Integrator
Creates epics/tasks in the team's issue tracker (currently Jira, via the Atlassian MCP) from an already-approv
Paying Client
The one isolated review in this plugin. Invoke it EXACTLY ONCE per finished build, at the quality stage, and o
X402 Archivist
Cache layer for x402 operations. Use proactively BEFORE any paid fetch (cache check) and AFTER any payment (ca