Memsaga History logo

Memsaga History

Community
grimmerk
memsaga-history

Look up the version history of Claude Code's own memory and config — global CLAUDE.md, per-project auto-memory files (MEMORY.md and topic files), and user skills — which memsaga mirrors into a git repo (`memsaga config` shows the path, for example ~/git/memories) on every turn. Use when the user asks what a memory or CLAUDE.md said last week, when a memory was added/changed/deleted and by which session, wants to diff two versions, wants to recover a deleted or overwritten memory file, or mentions memsaga, memories, or the old names memvc / ccmem. The user may ask in any language (for example 記憶の履歴, memory 歷史/版本/還原; examples only).

Overview

Publishergrimmerk
Repositorymemsaga
Skill namememsaga-history
Stars
21
Forks
0
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by grimmerk on GitHub. Read the source before you install it.

Installation

Install the Memsaga History AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/grimmerk/memsaga/tree/main/skills/memsaga-history
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/grimmerk/memsaga.git /tmp/memsaga
mkdir -p .claude/skills
cp -r /tmp/memsaga/skills/memsaga-history .claude/skills/memsaga-history
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Memsaga History in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Memsaga History on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Memsaga History is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

memsaga history

Live files stay where Claude Code keeps them (~/.claude/..., and one directory per further account, such as ~/.claude-work/...). memsaga copies an allowlist into its data repository (memsaga repo prints its path; ~/git/memories in the examples below) and commits once per turn; the repo is a mirror plus whatever earlier history memsaga init could replay from transcripts. An edit made in the mirror (or on GitHub) is kept and waits until memsaga sync (or the session-start / prompt hooks) brings it to the live file; memsaga status lists what waits. Restoring an older version is an explicit memsaga restore.

Layout of the data repository

claude/CLAUDE.md                                  global CLAUDE.md (the ~/.claude account)
claude/skills/<name>/SKILL.md                     user skills
claude/memory/<name>/{MEMORY.md,*.md}             auto-memory per project; live path is projects/<slug>/memory/
claude-work/...                                   a further account, named after its directory; files it shares through symlinks stay symlinks to claude/
paths.json                                        memory name -> real cwd, e.g. "HOME-git-webapp": "~/git/webapp"
index.md                                          browsable table of every project

A project slug (Claude Code's live directory name) is a path with every non-alphanumeric character replaced by -. For transcripts that path is the cwd; for auto-memory since Claude Code 2.1.275 it is the git common dir, so every worktree and subdirectory of ~/git/webapp shares one directory, and a non-repo directory such as ~/git keeps its own. In the repository a project under home is named without the home: claude/memory/HOME-git-webapp/ (live -Users-me-git-webapp), claude/memory/HOME-git/ for ~/git; a project outside home keeps its slug, and so does every project on a machine where another directory encodes like a path under home (/Users/me-old next to /Users/me), where the home cannot be told apart in the slug. Repositories started before October 2026 used the slugs themselves (claude/memory/-Users-me-git-webapp/); that is a rename, so use --follow. Older slugs such as -Users-me-git-webapp-<worktree>-packages-api are per-cwd leftovers from before that change; their files are still mirrored but no longer loaded.

A commit's subject is [<session title>] <account>:<area>, … (the title cut to 32 characters), or <event>: … when the session had no title. Commit messages carry trailers Event: (PostToolUse / Stop / SessionEnd / backfill / import), Account:, Session: (the Claude session id), Cwd:, Agent:, and Session-Title: (full title, since 2026-10-05).

Recipes (all read-only)

<repo> below is the data repository: read it once with memsaga repo, then write the path itself into each command (a shell variable does not survive from one tool call to the next).

bash
memsaga status                                            # last sweep, pending dirty marker, recent events
git -C <repo> log --since='7 days ago' --date=short --format='%h %ad %s' -- claude/CLAUDE.md
git -C <repo> log -p --follow -- claude/memory/HOME-git-webapp/MEMORY.md
git -C <repo> log --diff-filter=D --since='30 days ago' --name-only --format='%h %ad' -- '*/memory/*'   # deleted memories
git -C <repo> show <sha>^:claude/memory/<name>/<file>.md        # content before a commit (older commits: the slug as name)
git -C <repo> diff <sha1> <sha2> -- claude/CLAUDE.md
git -C <repo> log --format='%h %ad %s%n  %(trailers:key=Session,valueonly)' --date=short -n 20   # which session changed what
git -C <repo> log --grep='^Session-Title: <name>$' --format='%h %ad %s' --date=short   # every commit of one named session (a regex: escape . [ * in the name)

Repositories started before 2026-09-18 stored memory at claude/projects/<slug>/memory/; the commit that moved it is a pure rename, so use --follow (as above) to see history across it, and git show <old sha>:claude/projects/<slug>/memory/<file>.md for content from before it. memsaga restore --at <old sha> handles the old path by itself.

Backfilled history has gaps: an edit made through Bash is invisible to the replay, so a file may jump versions between two backfill: commits. The import: commit that memsaga init made is the first exact snapshot; everything after it is exact.

Restoring

Restoring writes into a live config directory, so: show the user the diff first, get an explicit yes, then run memsaga restore claude/memory/<name>/<file>.md --at <sha>, which shows the diff, asks, writes the file atomically and records a restore event so the next turn commits the restored state. Never git checkout inside ~/.claude; it is not a git repo.

Frequently asked questions

What does the Memsaga History AI skill do?

Look up the version history of Claude Code's own memory and config — global CLAUDE.md, per-project auto-memory files (MEMORY.md and topic files), and user skills — which memsaga mirrors into a git repo (`memsaga config` shows the path, for example ~/git/memories) on every turn. Use when the user asks what a memory or CLAUDE.md said last week, when a memory was added/changed/deleted and by which session, wants to diff two versions, wants to recover a deleted or overwritten memory file, or mentions memsaga, memories, or the old names memvc / ccmem. The user may ask in any language (for exampl...

Why use Memsaga History on TypingMind?

Because you install it once and use it with any model. Memsaga History is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Memsaga History in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/grimmerk/memsaga/tree/main/skills/memsaga-history. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Memsaga History?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Memsaga History?

As many as you like. As long as a model supports skills, you can use Memsaga History with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Memsaga History AI skill free?

Yes. It is published on GitHub by grimmerk under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇