ask-matt
MAmattpocock/skills336k4,217 new stars in the last 7 days
Save, organize, and curate persistent memories (MEMORY.md index plus topic files) across sessions. Load before writing detailed notes, topic files, or when asked to remember context that should outlive this session.
Shai keeps persistent memory as plain markdown you manage with the standard file tools plus two index tools. Memories are loaded into every future session, so they must stay small, durable, and curated.
Two scopes exist, each with the same shape:
~/.config/shai/memory/ (global — personal, cross-project)
├── MEMORY.md # index: one line per memory
└── <topic>.md # detail files, one topic each
.shai/memory/ (project — knowledge shared for this repo)
├── MEMORY.md
└── <topic>.md
MEMORY.md) is the only thing auto-injected into the prompt.
One bullet per memory: - [YYYY-MM-DD HH:MM:SS] short fact, optionally
ending with a pointer like (see testing.md).read tool when the index line is relevant.Save when the information would be useful in a future session and cannot be derived from the codebase, git history, or AGENTS.md:
Do not save: anything readable from the code or AGENTS.md, file paths or architecture the repo already shows, one-off debugging fixes, or session task state (that belongs in the todo list).
memory_write (add scope only for global facts).
Keep it under ~120 characters. Deduplicate first: if the index already says
it, do not write it again.write/edit
tools. Name it after the topic (testing.md, deploy.md,
user_preferences.md). Then add or update a single index line pointing at
it: memory_write {"content": "Testing conventions and commands (see testing.md)"}.memory_write — it rejects
newlines by design.The index is capped (200 lines / 25KB per scope). If memory_write reports the
cap, or the injected index says it is truncated, curate before adding more:
memory_remove.memory_remove the variants, memory_write one
consolidated line.edit — keep each focused on one
topic and short enough to read on demand.Prefer updating an existing memory over stacking a new one that contradicts it.
User says "we deploy with the cds pipeline, not kubectl":
{"name": "memory_write"}
{"content": "Deployment goes through CDS pipelines, not kubectl (see deploy.md)"}
then write the pipeline names/links into .shai/memory/deploy.md.
User says "stop adding emojis to commit messages" (personal preference):
{"name": "memory_write"}
{"content": "No emojis in commit messages or answers", "scope": "global"}
An index line is now wrong:
{"name": "memory_remove"}
{"content": "Deployment goes through CDS pipelines"}
MAmattpocock/skills336k4,217 new stars in the last 7 days
MAmattpocock/skills336k4,217 new stars in the last 7 days
MAmattpocock/skills336k4,217 new stars in the last 7 days
OBobra/superpowers331k5,030 new stars in the last 7 days
AFaffaan-m/ECC314k3,503 new stars in the last 7 days
AFaffaan-m/ECC314k3,503 new stars in the last 7 days