rekal

A memory system for repositories with Rekal installed. It separates current code, current written knowledge, past session decisions, and project structure so an agent can look in the right place.

In plain words
What is it for?
Use it to find code locations, read project conventions, recover decisions from previous AI sessions, and understand the repository's structure.
Why use it?
It reduces wasted searching and helps distinguish what is true now from why an earlier change was made or rejected. It also prevents treating old conversation details as current code.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/rekal-dev/rekal-cli/rekal
Any agent
npx skills add rekal-dev/rekal-cli --skill rekal
Clone the repo
git clone --depth 1 https://github.com/rekal-dev/rekal-cli

Made for: Claude Code, Codex.

Per session 91 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,069 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00091 $0.02069
Opus 5 $0.00046 $0.01035
Sonnet 5 $0.00018 $0.00414
Haiku 4.5 $0.00009 $0.00207

Measured 3d ago against content hash c3774d215dc2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

rekal 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 3d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/map.sh, scripts/wiki-gate.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

cmd/rekal/cli/skill/skills/rekal/SKILL.md · 146 lines

How it starts

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

Rekal — which substrate answers this?

Most wasted effort is the wrong substrate. Decide before you grep or recall.

Substrate Holds Tense Reach it with Answers
Tree current code now grep / read what does X do, where is it
Knowledge current prose now rekal "<q>" → Read HEAD convention / what we know
Ledger session intent past rekal "<q>", drill rekal query --session why, tried, rejected
Map structure map.sh + workflow how is it built

Boundary

  1. Is it true now, or something that was?
    • Was — a reason, a rejected path, a past correction, or a fact whose only record is a past conversation → Ledger. (On a pure-dialogue corpus only the ledger has content — go there.)
  2. If now — code or prose?
    • Code (path/symbol, present tense) → Tree. Grep; do not recall.
    • ProseKnowledge. Never invent an episode when HEAD prose answers.

grep for code that is · knowledge for prose that is · ledger for the why that was.

Commands — text by default, --json for machines

Rekal's read commands print compact agent-readable text; add --json only when a program needs to parse it.

  • rekal "<q>" — recall. Prints a seed digest: line 1 is the verdict (INJECT / KNOWLEDGE / SILENCE), then per-seed sid conf=… t<n> "snippet". One call already widens itself — it fuses several deterministic reformulations of your query (keyword-only, clause splits, a temporal variant) so you get the full picture in one go; still reformulate by hand only when the answer needs a genuinely different angle the mechanical variants miss. A seed may carry [reached N× drilled M×· "past query"] before its snippet — a usage hint. reached counts how often the search surfaced it, which is the engine quoting itself: on a small store nearly everything is reached, so a bare high count means little. drilled counts how often an agent opened it — that is the load-bearing signal and a good first drill. The echoed query is the one that most often surfaced this memory, so it shows how the need is usually framed. Neither raises conf= — judge relevance from conf= + content as always. No tag just means newly surfaced, not worse.
  • rekal find "<term>" [role] — every ledger mention of a term, complete and in time order (the "all / every / how many" sweep). A partial list is a wrong answer to a set question — this is the set.
  • rekal query --session <sid|ulid> [--offset N --limit 5 --role …] — drill a session into readable turns. rekal query --sql "SELECT …" for analytical / complete-set SQL (see references/reference.md for the full schema; ts is a TIMESTAMP — use BETWEEN, not LIKE).

Read the full file on GitHub · 146 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. 3d ago First seen · 146 lines · 91 tokens per session scan A c3774d215dc2

Subscribe to this mod's changes

rekal is a skill published in the GitHub repository rekal-dev/rekal-cli (152 stars, last pushed 29d ago), licensed Apache-2.0. It adds 91 tokens to every session and 2,069 once invoked, about $0.0005 per session on Opus 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-08-30.

Related

Other skills, from other repositories