From memory-mason
Sets up or removes Memory Mason by configuring Obsidian vault path and installing agent hooks for Claude Code, Copilot, Codex, Cursor. Use for /mmsetup or setup/uninstall commands.
npx claudepluginhub s-gryt/memory-mason --plugin memory-masonThis skill uses the workspace's default tool permissions.
You are setting up or removing Memory Mason for the current session.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Guides code writing, review, and refactoring with Karpathy-inspired rules to avoid overcomplication, ensure simplicity, surgical changes, and verifiable success criteria.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Share bugs, ideas, or general feedback.
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.
/mmsetup to set vault path.npx skills add only (Cursor, Windsurf, Cline, Copilot): skills installed but no hooks and no vault config. Run /mmsetup to configure vault path AND install hooks for capture.install.sh / install.ps1): prompts for vault path during install. /mmsetup not needed unless reconfiguring.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 done~/.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.
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>" }
Alternatively, user can create a .env in their project root:
MEMORY_MASON_VAULT_PATH=/path/to/vault
MEMORY_MASON_SUBFOLDER=ai-knowledge
Or a ~/.memory-mason/.env file:
MEMORY_MASON_VAULT_PATH=/path/to/vault
MEMORY_MASON_SUBFOLDER=ai-knowledge
Or a memory-mason.json in project root:
{ "vaultPath": "/path/to/vault", "subfolder": "ai-knowledge" }
Skip this step if hooks are already wired (plugin install or shell installer already ran).
Claude Code:
bash hooks/install.sh
# Windows:
powershell -File hooks\install.ps1
Or if no local clone:
bash <(curl -fsSL https://raw.githubusercontent.com/s-gryt/memory-mason/main/hooks/install.sh)
GitHub Copilot:
bash hooks/install-copilot-hooks.sh
# Windows:
powershell -File hooks\install-copilot-hooks.ps1
Or remote:
bash <(curl -fsSL https://raw.githubusercontent.com/s-gryt/memory-mason/main/hooks/install-copilot-hooks.sh)
Codex:
bash hooks/install-codex-hooks.sh
# Windows:
powershell -File hooks\install-codex-hooks.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.
If the vault has an .obsidian/ directory (indicating Obsidian is used), create or update .obsidian/graph.json with knowledge-base-optimized settings. Replace {subfolder} with the actual configured subfolder name (e.g., ai-knowledge):
{
"collapse-filter": false,
"search": "path:{subfolder} -path:{subfolder}/_raw -path:{subfolder}/_meta",
"showTags": false,
"showAttachments": false,
"hideUnresolved": true,
"showOrphans": false,
"collapse-color-groups": false,
"colorGroups": [
{ "query": "path:{subfolder}/concepts", "color": { "a": 1, "rgb": 5227007 } },
{ "query": "path:{subfolder}/synthesis", "color": { "a": 1, "rgb": 13724009 } },
{ "query": "path:{subfolder}/atlas", "color": { "a": 1, "rgb": 12945088 } },
{ "query": "path:{subfolder}", "color": { "a": 1, "rgb": 4473924 } }
],
"collapse-display": true,
"showArrow": true,
"textFadeMultiplier": -1,
"nodeSizeMultiplier": 2,
"lineSizeMultiplier": 0.8,
"collapse-forces": false,
"centerStrength": 0.25,
"repelStrength": 20,
"linkStrength": 1,
"linkDistance": 80
}
Color scheme: concepts = green (5227007), synthesis = orange (13724009), atlas = blue (12945088), fallback = dark grey (4473924). All RGB values from the proven claude-obsidian palette. Hidden: orphan nodes, unresolved links, tags, attachments. Sidebar sections expanded (collapse = false) so user can see and adjust filters, colors, and physics. Physics tuned for readability with strong node repulsion.
The search field filters the graph to only show content inside the subfolder while explicitly excluding {subfolder}/_raw and {subfolder}/_meta. Each colorGroups entry must include the subfolder prefix in its query path. The last entry is a catch-all fallback.
Path quoting rule (Obsidian search syntax): bare path:folder works for single-word or hyphenated names (e.g. path:ai-knowledge). If the subfolder name contains spaces, wrap in double quotes: path:"my vault". Apply the same quoting rule to all path: values in both search and colorGroups entries.
If .obsidian/graph.json already exists, merge the colorGroups and force settings without overwriting user customizations to other fields. If .obsidian/ does not exist, skip this step silently.
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 hooks/uninstall.sh
# Windows:
powershell -File hooks\uninstall.ps1
Or if no local clone:
bash <(curl -fsSL https://raw.githubusercontent.com/s-gryt/memory-mason/main/hooks/uninstall.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.