/gmem:gmem-tidyfrom gmem
Audits gmem memory (rules, precedents, proposals, learnings, active memory) against layout rules and fixes issues like contradictory facts and broken indexes. Use when memory feels messy or outdated.
Ships in gmem. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Resolve the gmem config first, using the rules in gmem-setup. This skill uses every
kind. <memory>, <rules>, <precedents>, <learnings> and <proposals> below each
mean <location.<kind>>/<memory_dir>/<kind>/. Only if no config file exists, use
the default: all five under ~/.gmem/<kind>/ (Central memory). Mention once
that gmem-setup can change where these are kept.
Ask which part to tidy: the authority layers, active memory, or both. The answer comes from the user.
Start with gmem-check for the mechanical findings (layout, names, indexes, format),
then read every file in scope in full. Check each one against the rules below, and check facts against the real world
(the script, the code in the repository, the file a read-point names), not just against other memory. A memory line
that contradicts the code is the most expensive kind, because it reads as verified.
Report the findings grouped by rule, and count the decisions they need. Then recommend how to decide them: one
question at a time for a handful of related decisions, or a map of independent decisions for many (use /grilling
or /wayfinder if installed; gmem-setup checks and installs them). The user picks.
rules/ and precedents/: each is a folder of topic files plus an index.md (one row per file: file → when
to read it).
rules/, still reflects current practice (no later human
decision has superseded it), and is not a near-duplicate of another precedent on the same topic. Flag any that fail
one of these; never rewrite its content.learnings/: resolve via gmem-judge. Revise cheap fixes in place, or raise a proposal when a learning conflicts
with rules//precedents/, generalizes badly, or is unclear.
proposals/: live when the situation it names still exists and no rule/precedent has since answered it. Flag as
stale when the learning behind it was later revised or removed, the question was already settled elsewhere, or enough
time has passed that the context has clearly moved on.
<memory>/active/)active/ holds everything consulted as current understanding, in two categories, so one place answers every lookup:
active/
├── index.md one table per category: file → when to read it
├── correction/ what I got wrong, and what to do instead
└── reference/ how things work: mechanics, recipes, standing facts and rules
correction/: compliant when an entry states what was done wrong, the exact words that caught it, the signal
to recognize the same situation next time, and what to do instead, each as a short standalone actionable line.
Short lessons pulled out of reference files (one line each: what I did wrong → what to do instead) go together in
correction/lessons.md, tagged with the reference file they came from.
Non-compliant when it reads like an incident report (dates, a sequence of events, background) instead of a rule you
can extract in one sentence, or when it carries detail that wouldn't change what anyone does next time.
reference/: compliant when the file is:
active/ gives a different answer to the same question. When two disagree, pick
one answer (the user decides), keep it in one file and point to it from the others.correction/lessons.md.
Recipes that still work stay as written: tidy what is wrong, don't reword what is right.No topic file sits directly under active/ — move it into correction/ or reference/.
Out of scope: the ledger (<memory>/YYYY-MM-DD_HHMM_*.md), notes, retros. They are dated records; never rewrite
them to fix links.
With scope and approach chosen, work through the decisions with the user, carrying the rules above as context. Act only after the user confirms the shared understanding. When applying:
~/.gmem/... folders, which is where every kind lives when there is no config), copy it
aside first, e.g. cp -R <folder> <folder>.pre-tidy-YYYY-MM-DD_HHMM, and tell the user where the copy is.git mv files you are moving (when source and target are in the same git repo), so history follows them; then edit.<memory>/YYYY-MM-DD_HHMM_memory-tidy.md: what moved where, what was removed and why, and
where to recover anything from: the pre-tidy commit (git show <sha>:<path>) for folders in git, or the
pre-tidy copy's path for folders that are not. Do not copy removed content into it.active/index.md: both categories, every file, a "when to read" column. Fix the rules/index.md and
precedents/index.md rows the user confirmed.active/, rules/ and precedents/ resolves, then commit each folder that is in a git repo.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub thaitype/gmem --plugin gmem13 skills in this plugin
/gmem-askExplains gmem — why it exists, every kind of memory, the memory lifecycle, which skill to use when, and the four install modes. Use when the user asks "what is gmem", "how does gmem work", "which gmem skill should I use", "what is the difference between learn / memory / retro / note", "explain gmem memory types", "explain the install modes", or when gmem-setup calls it for a user who does not know gmem yet. Read-only — it explains and points to the skills that write; it changes nothing./gmem-byeEnd-of-session checkpoint that checks whether anything from the session belongs in a note, memory, retro, or learning, and records only what qualifies. Use proactively on any wrap-up or goodbye signal in Thai or English — "จบแล้ว", "พอแค่นี้ก่อน", "บาย", "done for now", "wrapping up", "good night", or "note/memory/retro if needed" — even if the user doesn't mention memory. Not for logging a correction — use gmem-stop./gmem-checkChecks gmem memory without changing it — whether files follow gmem's rules (layout, file names, complete indexes, one note per topic) and whether their format is right (required frontmatter, links that resolve), using typdoc when it is set up. Reports each finding with the skill that fixes it. Use before committing memory, after hand edits, at the start of gmem-tidy, or when the user asks to "check memory", "validate memory", "lint memory", or "is my memory OK". Read-only — to fix what it finds, use gmem-tidy, gmem-judge or gmem-migrate./gmem-judgeReviews the captured learnings and acts on each one — fixes small problems in place, or raises a proposal when a learning should be promoted, conflicts with a rule or precedent, or is unclear. Use when asked to "judge", "review the learnings", "triage learnings", "vet the inbox", or "clean up captured facts", or after many gmem-learn captures have piled up. Not for writing rules or precedents (a human acts on proposals), not for retros, and not for a full memory audit — use gmem-tidy./gmem-learnSaves one durable, timeless fact that was learned from the work itself — a gotcha hit, a constraint discovered, a mistake that turned out to have a general cause — as a learning card in gmem memory. Use whenever something like that turns up mid-work, when pulling lasting facts out of a retro, or when the user says "TIL" or "lesson learned", even if they never say "learning". Not for what happened in a session — use gmem-retro; not for how the project works when the user tells you, or for revising what a topic already says — use gmem-memory./gmem-mapThe map of the whole gmem garden — what kinds of memory exist, which layer wins on conflict, when to recall and validate, which skill records what, and the everyday rhythm. Open it at the start of a session or before non-trivial work in a project that uses gmem, when unsure which gmem skill fits, or when the user asks how memory works here. Read-only; it points to the skills that read and write.