From rekal-skills
Captures durable knowledge from sessions into rekal memory with deduplication. Extracts preferences, decisions, architecture, and procedures; checks for duplicates; stores or supersedes.
How this skill is triggered — by the user, by Claude, or both
Slash command
/rekal-skills:rekal-saveThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Save durable knowledge from this session into rekal. Goal: user never repeats themselves across sessions.
Save durable knowledge from this session into rekal. Goal: user never repeats themselves across sessions.
Review the conversation. Per item, apply this filter:
Would a fresh agent in a new session benefit from knowing this?
├── YES → candidate
└── NO → skip
Candidate types:
| What | Example |
|---|---|
| Preference with reasoning | "User prefers dataclasses over hand-written __init__ for less boilerplate" |
| Architecture/convention | "Auth service uses JWT, lives in services/auth, 15-min token expiry" |
| Decision + why | "Chose PostgreSQL over MySQL for JSONB support and better partial indexes" |
| Procedure | "Deploy: 1) git tag vX.Y.Z 2) git push --tags 3) wait CI 4) merge to main" |
| Bug with non-obvious cause | "OOM from unbounded LRU cache in parser — fixed with maxsize=1000" |
| Behavior correction | "Never use grep/find. Use rg/fd. Strict, no exceptions." |
Skip — do not store:
If zero candidates survive, stop here. Do not force-store.
Single-project session?
├── YES → memory_set_project(project="<name>")
│ All subsequent stores auto-scope to this project.
└── NO → Skip. Set project= per memory in step 4.
For EVERY candidate, before storing:
memory_search(query="<candidate topic in natural language>", limit=5)
Read results. Apply:
Search returned results?
├── NO match at all
│ └── Proceed to step 4 (store new)
│
├── Same topic, same info (duplicate)
│ └── SKIP. Do not store.
│
├── Same topic, new/updated info
│ └── memory_supersede(old_id="<matched memory id>", new_content="<updated content>")
│
└── Same topic, contradictory info
└── memory_supersede(old_id="<matched memory id>", new_content="<corrected content>")
Include what changed and why in the content.
Critical rule: Two memories about the same topic must never coexist. Newer supersedes older. "User's preferred formatter" appears exactly once in the database.
Per candidate that passed dedup with no match:
memory_store(
content="<self-contained content — what AND why>",
memory_type="<one of: fact, preference, procedure, context, episode>",
tags=["<tag1>", "<tag2>"], # 2-4 specific tags. Not "code", "project", "general".
project="<name>", # Omit if memory_set_project was called, or if global.
)
| Type | Use when |
|---|---|
fact | Objective truth about code, system, API |
preference | How user wants things done |
procedure | Step-by-step workflow |
context | Current project state — decays via recency scoring |
episode | Notable event, debugging session, incident |
A fresh agent with zero conversation context reads this content. It must make complete sense alone.
Good: "User prefers Ruff over Black for formatting because it's faster
and handles import sorting in a single tool"
Bad: "User prefers Ruff" — missing the why
Bad: "As discussed, switch to Ruff" — references conversation
Bad: "The formatter preference" — meaningless alone
Good: ["ruff", "formatting", "linting"]
Bad: ["code", "tools", "project"]
memory_conflicts(project="<project if scoped>")
If new conflicts appear:
"Noticed conflict: [X] vs [Y]. Want me to resolve it?"
Summarize what was saved:
"Saved 3 memories: Ruff preference, deploy procedure, auth architecture. Superseded 1 outdated API endpoint memory."
If nothing was saved (all skipped as duplicates), say so:
"Reviewed session — no new knowledge to capture. Existing memories already cover it."
/rekal-hygiene.npx claudepluginhub janbjorge/rekal --plugin rekal-skillsProactively saves decisions, conventions, bugs, discoveries, and preferences to persistent Engram memory across sessions using mem_save and related tools.
Operational guide for rekal memory tools with decision trees, query rules, and session-start procedures. Use when onboarding to a rekal workspace or asked about rekal usage.
Persists learnings into a 5-layer memory hierarchy (CLAUDE.md files, memory/MEMORY.md) and consolidates by pruning outdated entries and promoting recurring patterns. Triggers on 'extract learnings', 'remember', 'dream'.