From pragmatic
Resume a Claude Code session by pulling recent session logs and project decisions from an Obsidian vault exposed via an MCP filesystem server. Use when the user types /resume, says "resume", "where did I leave off", "what was I doing", "continue from last session", or otherwise asks you to reload context that was persisted to their vault. On first run on a machine, bootstraps by registering the vault MCP server.
How this skill is triggered — by the user, by Claude, or both
Slash command
/pragmatic:resumeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Reload the user's working context for the current project from their Obsidian vault.
Reload the user's working context for the current project from their Obsidian vault.
A network-accessible Obsidian vault exposed via an MCP filesystem server. The canonical setup is a Tailscale-reachable host (LXC, NAS, server) running mcp-proxy in front of @modelcontextprotocol/server-filesystem pointed at the vault directory. The user may run their own variant — what matters is that the MCP server is reachable and exposes the vault as a filesystem.
The MCP server is registered in Claude Code under a user-chosen name (default vault-fs). This skill calls the MCP's filesystem tools — typically list_directory, read_text_file, write_file, create_directory, search_files — under whatever name the user registered the server. Do NOT hardcode tool names; introspect what the registered MCP exposes.
Check whether an MCP server pointing at a vault filesystem is already registered.
claude mcp list 2>&1
Parse the output. A vault-fs registration looks like a line containing /servers/vault-fs/sse or any URL ending in .../sse that the user identifies as their vault.
If a vault MCP appears connected (✓ Connected): skip to Step 2.
If no vault MCP is registered, or the existing one is failing: run the bootstrap flow. Ask the user three things via AskUserQuestion (one question, three fields if your harness supports it; otherwise sequentially):
http://obsidian-bridge:9876/servers/vault-fs/sse. Tell the user this default assumes a Tailscale host named obsidian-bridge running on the standard mcp-proxy port. They should override if their host or port differs.vault-fs. This is the name Claude Code will use to identify the server.sse. Use http if the user's server uses streamable HTTP instead.Then register the server at user scope so every project on this machine inherits it:
claude mcp add --transport <transport> --scope user <name> <url>
After registration, verify it connects:
claude mcp list 2>&1 | grep "<name>"
If it doesn't show ✓ Connected, surface the error to the user. Common causes:
--allow-http via mcp-remote wrapperWrite a sentinel marking bootstrap complete so subsequent invocations skip Step 1:
mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}/vault-session"
cat > "${XDG_CONFIG_HOME:-$HOME/.config}/vault-session/config.json" <<EOF
{
"mcp_name": "<name>",
"mcp_url": "<url>",
"bootstrapped_at": "$(date -u +%Y-%m-%dT%H:%M:%SZ)"
}
EOF
The vault organizes notes per-project. Derive the project key from the current working directory:
git remote get-url origin 2>/dev/null — if it succeeds, take the basename without .git. Example: [email protected]:user/my-app.git → my-app.basename $PWD).Call this $PROJECT_KEY. Tell the user which key you derived in one short line so they can correct it if wrong.
Using the vault MCP, list the logs directory for this project:
<vault-root>/<PROJECT_KEY>/logs/YYYY-MM-DD-slug.md, so name sort === chronological sort).If the logs directory does not exist:
/save will create it when the user ends the session.If fewer than 3 logs exist, read whatever is available.
After reading logs, also fetch any of these if they exist in the vault under <PROJECT_KEY>/:
architecture/decisions.mddecisions.mdADR.mdarchitecture.mdRead the first one that exists. Do not error if none do.
After presenting the summary, offer the user three optional pulls they can ask for explicitly:
permanent/ modified in the last 7 days- [ ]) under <PROJECT_KEY>/Phrase the offer as one line: "Want me to also pull recent permanent notes, open TODOs, or cross-project context?"
Write a short summary in this shape:
**Project:** <PROJECT_KEY>
**Last session:** <date of most recent log, or "no prior sessions">
**Where you left off**
<2-4 bullets distilling the most recent logs — what was done, what was pending>
**Decisions in play** (if a decisions doc was found)
<1-3 bullets of standing decisions relevant to current work>
**Pending**
<bullets of items the most recent logs flagged as TODO/next>
Keep it tight. The user is loading context, not reading a report. If they want more they will ask.
/resume. Read-only.npx claudepluginhub sapoepsilon/pragmatic-skills --plugin pragmaticCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.