deja-vu: Command for Claude Code

.claude/commands/harness.md

harness is a command for Claude Code from vshulcz/deja-vu. It costs 17 tokens per session (1,521 once invoked), scanned A, original, MIT.

A workflow for improving a harness, the setup that connects an agent to useful machine or project context. It checks whether the context reaches the model, helps prevent repeated mistakes, and measures its cost.

In plain words
What is it for?
Use it to inspect available harness sources, connect one on the machine, and verify its memory, usefulness, and overhead.
Why use it?
It turns a merely connected integration into one that visibly improves the agent’s decisions without adding unnecessary delay or text.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions subagents.

This is vshulcz/deja-vu's own configuration. It tells Claude Code how to work on deja-vu itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything deja-vu configures →

About the project

deja-vu is a local memory system that indexes coding-agent session histories and makes relevant past work available to other agents. It helps users share fixes and context across Claude Code, Codex, Cursor, Copilot CLI, and other coding agents without using a language model or embeddings. The catalogue contains hooks, commands, MCP components, skills, plugins, and instructions for connecting agents to that memory.

vshulcz/deja-vu · 1,314 stars · on GitHub · vshulcz.github.io

Reuse

Borrowing it

Nothing to install: this file belongs to vshulcz/deja-vu. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/vshulcz/deja-vu/main/.claude/commands/harness.md
Clone the repo
git clone --depth 1 https://github.com/vshulcz/deja-vu

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for harness

README.md
[![agentmods](https://agentmods.dev/badge/commands/vshulcz/deja-vu/harness/github.svg)](https://agentmods.dev/commands/vshulcz/deja-vu/harness)
Your own site
<a href="https://agentmods.dev/commands/vshulcz/deja-vu/harness"><img src="https://agentmods.dev/badge/commands/vshulcz/deja-vu/harness/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for harness

Your own site · 80×15
<a href="https://agentmods.dev/commands/vshulcz/deja-vu/harness"><img src="https://agentmods.dev/badge/commands/vshulcz/deja-vu/harness.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,521 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00017 $0.01521
Opus 5.5 $0.00007 $0.00608
Sonnet 5.5 $0.00003 $0.00304
Haiku 4.5 $0.00002 $0.00152

Measured 2d ago against content hash c35c9c3330a3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

harness scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/harness.md · 124 lines

How it starts

The opening of the file, as written. The whole thing — 124 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/harness

<name> is one harness. deja sources lists every one deja reads and deja install names the ones it can wire on this machine; those two lists are the authority, not a copy of them here. With no argument, take the harness with the most sessions in deja doctor that has not been through this recently.

What this is for

deja is not a CLI for a person to run. Its value is that an agent gets smarter without being asked: it starts a session already knowing what this machine settled, and it is reminded at the moment it is about to repeat a mistake. A harness is finished when that happens by itself, looks right on screen, and costs almost nothing.

Three things are being judged, in this order:

  1. Does the memory reach the model. Not "the hook is wired" — the bytes.
  2. Is it worth reading. A count is not a decision. "You have run this before" changes nothing; "last time this wiped the staging queue, and the flag that fixed it" changes the next tool call.
  3. What it costs. Latency on every action and tokens in every turn.

The bar

A harness is done when all of these are true and you have seen each one yourself, on this machine:

  • Every channel the harness offers is wired: session start, per prompt, before a tool runs, after one fails, on compaction, and whatever it calls spawning a subagent. deja doctor reports no row out of date.
  • The recall is in the request the harness actually sent, read out of the bytes, not inferred from the hook printing something.
  • A question whose answer exists only in history is answered from history. Use an invented token — a real answer cannot be a guess.
  • The slash command runs a search. It must not hand the query to deja as its first word, and it must survive a query that names one of deja's own flags.
  • A second copy of the plugin, or a plugin whose peer is missing, degrades. It never takes the profile down.
  • The output looks right where the user sees it — the TUI, the toast, the collapsed row. Render it and look at it.
  • The cost is measured and stated: milliseconds per action, bytes per turn.

Read the full file on GitHub · 124 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago Changed · -5 lines c35c9c3330a3
  2. 1mo ago First seen · 129 lines · 17 tokens per session scan A 8866db39e176

Subscribe to this mod's changes

harness is a command published in the GitHub repository vshulcz/deja-vu (1,314 stars, last pushed today), licensed MIT. It adds 17 tokens to every session and 1,521 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.