Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Vault Autosync: Auto-Save Claude Code Sessions

    3

    Sets up a Claude Code hook that writes every finished session to your Obsidian vault automatically, with nothing to remember to run.

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    5.0 (1 review)
    Vault Autosync: Auto-Save Claude Code Sessions

    Vault Autosync: Auto-Save Claude Code Sessions

    Example session with this skill installed

    /vault-autosync

    • Read your context and instructions
    • Compiled the vault autosync

    Your vault path is set: VAULT_PROJECTS_ROOT=~/Vault/01_Projects (the folder exists). Node.js is v22.11.0, which is fine.

    I copied the hook script to ~/.claude/vault-sync/vault-sync.mjs.

    Proposed change to ~/.claude/settings.json. It keeps your existing settings and adds:

    {
      "env": { "CLAUDE_VAULT_ROOT": "/Users/you/Vault/01_Projects" },
      "hooks": {
        "SessionEnd": [
          { "hooks": [ { "type": "command", "command": "node \"/Users/you/.claude/vault-sync/vault-sync.mjs\"", "timeout": 15 } ] }
        ]
      }
    }
    

    Okay to write this?

    yes

    Done. settings.json is updated and is still valid JSON.

    Smoke test: I ran the script with a test payload. The log shows:
    Skip: no transcript_path given …
    That's the expected result: the hook found your vault and runs.

    What happens now

    • Autosync starts with your next session. When you exit Claude Code, the session is written to 01_Projects/<project>/Chats/ and the project README is updated, about a minute later.
    • Each sync is a short background claude -p run, so it uses a little of your usage.
    • Short sessions and sessions inside the vault are skipped.
    • Log: ~/.claude/hooks/vault-sync.log. To remove autosync, ask me to uninstall it.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Vault Sync works when you remember to run it. Autosync makes it automatic: every time a Claude Code session ends, the session is summarized into your vault in the background.

    What the skill does

    1. Reads your vault path and checks your Node.js version.
    2. Installs a small zero-dependency script to ~/.claude/vault-sync/.
    3. Adds a SessionEnd hook to ~/.claude/settings.json and keeps your existing settings. It shows you the exact change and waits for your OK.
    4. Runs a smoke test, so you know it works before your next session.

    What happens each time you exit

    • The transcript is condensed locally.
    • A background claude -p run, limited to Read, Write and Edit, writes a dated chat log and updates the project README.
    • Each chat log is tagged with its session id, so Vault Import never imports it twice.
    • Very short sessions are skipped, and so are sessions run inside the vault itself.

    Also included

    • A troubleshooting guide, with a clear log at ~/.claude/hooks/vault-sync.log
    • A setting for a custom claude path (useful on Windows)
    • Uninstall steps

    Requirements: Claude Code, Node.js 18+ and an Obsidian vault (or any Markdown folder). Each sync is a short Claude run, so it uses a little of your usage.

    The script makes no network calls of its own. It only starts your local claude CLI.

    • Claude Code only. Other agents can use the free Vault Sync skill manually.
    • Each sync is a short background claude -p run, so it uses a little of your Claude usage.
    • The note appears about a minute after you exit. If you shut the computer down right away, that sync may not finish.
    • Sessions that are too short, and sessions run inside the vault folder, are skipped.
    • On Windows, the hook may not find claude on its own. Set VAULT_SYNC_CLAUDE_BIN to its full path (the skill explains how).

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    5.0
    1 review
    5
    1
    4
    0
    3
    0
    2
    0
    1
    0

    Trust & safety

    Security scan

    Security scan passed 21 days ago

    Requires

    Node.js

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Environment Variables

    File Scopes

    ~/.claude/settings.json
    ~/.claude/vault-sync/**
    ~/.claude/hooks/vault-sync.log
    $VAULT_PROJECTS_ROOT/**

    Terminal: runs node to check the version and the smoke test. Writes ~/.claude/settings.json only after you approve the exact change. The installed hook starts your local claude CLI in the background (Read/Write/Edit only, no shell) to write the session summary. The script itself makes no network calls.

    Listed21 days ago

    What's inside

    Frequently Asked Questions

    This skill targets the Claude Code CLI. It automates the archival of terminal transcripts and updates to README files directly into your Obsidian vault as soon as you exit a session.

    The skill requires Node.js (v18+) and the Claude Code CLI. It is compatible with any local Markdown-based note-taking system, though it is optimized for Obsidian users.

    No, this is a "set and forget" integration. Once installed, it hooks into the CLI's lifecycle to trigger syncs automatically every time you end a session, eliminating the need for manual commands.

    The package includes the deployment engine, the vault-sync core script, and an automated setup utility that handles hook registration and environment configuration for you.

    Yes, the skill includes a filtering mechanism that monitors session activity to ignore trivial commands and prevent duplicate logs, keeping your vault clean.

    While the initial setup is automated, you will need to define your `CLAUDE_VAULT_ROOT` environment variable so the script knows exactly where your Obsidian vault is located.

    Each sync is a short Claude run, so it uses a little of your existing Claude Code usage. There’s no other cost.

    Very short sessions are skipped automatically. You can also delete any chat log from the vault. They’re plain files.

    No. It keeps your existing settings.json and shows you the exact change before writing it.

    Ask the agent to uninstall vault-autosync, or delete the SessionEnd entry from settings.json and the ~/.claude/vault-sync folder.

    New in Agents & Orchestration