/memory-mason:mmsetupfrom memory-mason
Sets up, reconfigures, or removes Memory Mason, a persistent memory system for Claude Code using an Obsidian vault. Configures vault path, installs hooks, and handles uninstallation.
Ships in memory-mason. 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.
You are setting up or removing Memory Mason for the current session.
This command is operational only. Do not write /mmsetup, /memory-mason:mmsetup, or their execution chatter back into the vault.
Platform detection: Check the OS before running any scripts. Use bash / .sh scripts on macOS and Linux. Use powershell / .ps1 scripts on Windows. Never ask the user which OS they're on — detect it from the environment.
If the user says "uninstall", "remove", or "clean up" → skip to Uninstall section below.
Identify which agent you are running in:
CLAUDE_CONFIG_DIR or CLAUDE_PLUGIN_ROOT is set -> Claude Code.github/hooks/session-start.json exists in workspace -> GitHub Copilot workspace install already done~/.copilot/hooks/memory-mason/ exists -> GitHub Copilot user-level already donegemini-extension.json exists in workspace root -> Gemini CLI~/.codex/ or .codex/ exists -> CodexFor Claude Code: check ~/.claude/hooks/memory-mason/session-start.js exists AND ~/.claude/settings.json contains memory-mason hook entries.
For Copilot: check ~/.copilot/hooks/memory-mason/session-start.js exists.
For Codex: check ~/.codex/hooks/memory-mason/session-start.js exists.
For Gemini CLI: check whether the extension is already installed or linked in the active Gemini extensions directory before reinstalling.
If already installed: report status and skip unless user says "reinstall" or "force".
Check if vault is already configured (file-based vault-path priority order):
.env in project root contains MEMORY_MASON_VAULT_PATHmemory-mason.json exists in project root~/.memory-mason/.env contains MEMORY_MASON_VAULT_PATH~/.memory-mason/config.json existsIf none found, ask user and create global config:
~/.memory-mason/config.json:{ "vaultPath": "<input>", "subfolder": "<input>", "minimize": <true|false> }
Set minimize to true only when the user explicitly opts in (step-3 answer). Default is false.
minimize precedence (highest first): process environment variable MEMORY_MASON_MINIMIZE > .env file MEMORY_MASON_MINIMIZE > config.json key minimize. Process env overrides everything.
Skip this step if hooks are already wired (plugin install or shell installer already ran).
Claude Code:
bash scripts/install/claude-code.sh
# Windows:
powershell -File scripts\install\claude-code.ps1
Or if no local clone:
bash <(curl -fsSL https://raw.githubusercontent.com/s-gryt/memory-mason/main/scripts/install/claude-code.sh)
GitHub Copilot:
bash scripts/install/copilot.sh
# Windows:
powershell -File scripts\install\copilot.ps1
Or remote:
bash <(curl -fsSL https://raw.githubusercontent.com/s-gryt/memory-mason/main/scripts/install/copilot.sh)
Codex:
bash scripts/install/codex.sh
# Windows:
powershell -File scripts\install\codex.ps1
Skills-only hosts (Cursor, Windsurf, Cline): no hook system available. Inform user that automatic session capture is not supported on this platform. Knowledge base commands (/mmc, /mmq, /mml, /mms, /mma) work once vault is configured.
Write .obsidian/graph.json — see references/obsidian-graph.md for template and field explanations.
After setup, verify:
~/.memory-mason/config.jsonReport success or troubleshoot any failures.
Guided removal of Memory Mason hooks and configuration. Vault content (daily logs, knowledge articles) is never deleted.
Check all locations:
~/.claude/hooks/memory-mason/ and entries in ~/.claude/settings.json~/.claude/plugins/marketplaces/memory-mason/~/.copilot/hooks/memory-mason/ and .github/hooks/ JSON files in workspace~/.codex/hooks/memory-mason/ and .codex/hooks.json in workspace~/.memory-mason/config.jsonmemory-mason.json or .env entries in project rootReport what was found and ask user to confirm removal.
For Claude Code (shell install):
bash scripts/uninstall/claude-code.sh
# Windows:
powershell -File scripts\uninstall\claude-code.ps1
Or if no local clone:
bash <(curl -fsSL https://raw.githubusercontent.com/s-gryt/memory-mason/main/scripts/uninstall/claude-code.sh)
For Claude Code (plugin install):
/plugin uninstall memory-mason
For Copilot: remove ~/.copilot/hooks/memory-mason/ directory and any .github/hooks/ JSON files that reference memory-mason.
For Codex: remove ~/.codex/hooks/memory-mason/ directory and memory-mason entries from .codex/hooks.json.
Ask user: "Also remove vault configuration? Your vault content will not be touched."
If yes: delete ~/.memory-mason/config.json. Remove memory-mason.json or Memory Mason entries from .env in project root if present.
List everything that was removed. Confirm vault content is untouched. Remind user to restart their agent for changes to take effect.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
memory-mason, setup, configuration, obsidian-vault, hooks, memory-management
npx claudepluginhub s-gryt/memory-mason --plugin memory-mason6 skills in this plugin
/mmaArchive log entries when they exceed 32 entries, using batches of 2^k for compact storage. Extractive only — no invented facts. Run whenever _meta/log.md grows unwieldy.
/mmcCompile today's or a specified daily capture into the Vault Architecture v2 structure. Runs a three-stage EXTRACT -> TRANSFORM -> LOAD pipeline that updates concepts, atlas MOCs, synthesis pages, the root index, build log, manifest, state, session bootstrap context, and auto-archive folds. Triggers: "compile today", "/mmc", "compile YYYY-MM-DD", "--all" for batch. Use /mmq instead to query the vault without modifying it.
/mmlLint the knowledge base for broken links, orphan pages, stale captures, and wikilink convention violations. Run as a periodic health check.
Other plugins' skills for the same job