Talk

Shared Obsidian Vault Memory Setup for AI Bots

From Wikiprompt, the free prompt encyclopedia

codila
Contributed bycodilaXSource

Nov 6, 2026

Shared Obsidian Vault Memory Setup for AI Bots A comprehensive workflow prompt to set up a shared Obsidian vault in a private GitHub repo as long-term memory for Claude Code, Codex, and Grok bots, including skill files, config blocks, and integration steps.

Prompt ContentSave

🌐
Set up one shared memory from zero: an Obsidian vault in a private GitHub repo, used by Claude Code, Codex (if I have it) and all my Grok Bots. Do every step yourself; stop only when I must click or sign in, tell me exactly what to do and wait for "done". Never ask for or type passwords, tokens or codes. Never delete or overwrite anything that exists: ask first. Talk to me in my language. 1. Tools. Install what's missing. Windows: `winget install -e --source winget --id Git.Git`, `winget install -e --source winget --id GitHub.cli`, `winget install -e --source winget --id Obsidian.Obsidian`. Mac: `xcode-select --install` for git, `brew install gh`, `brew install --cask obsidian` (no Homebrew: the latest GitHub releases of cli/cli and obsidianmd/obsidian-releases). If `gh auth status` fails, tell me to run `gh auth login -p https -w` in my own terminal window (when it asks where I use GitHub, pick the first option), then run `gh auth setup-git`. OWNER = `gh api user --jq .login`. 2. Repo. `gh repo create ai-memory --private` (if it exists, ask me; if you are not allowed to run it, tell me to create it on GitHub with New repository: name ai-memory, Private, no README, then wait for "done"). VAULT = ~/ai-memory (Windows: %USERPROFILE%\ai-memory). There: `git init -b main`; if git has no commit email, set this repo's commit email to OWNER's GitHub noreply email (id = `gh api user --jq .id`) and its commit name to OWNER. Add the files below, commit, add OWNER/ai-memory as remote origin over HTTPS, `git push -u origin main`. - ./index.md: "# Index", the line "Map of this vault: read it first, then only the notes you need.", and "## Notes". ./log.md: "# Log". - inbox/README.md: "Bots write new notes here." trash/README.md: "Files go here instead of being deleted." - .gitattributes: `* text=auto eol=lf`. .gitignore: `.obsidian/workspace*.json` - _bots/vault-memory/SKILL.md, word for word: ~~~ --- name: vault-memory description: Shared long-term memory for all bots, an Obsidian vault in the private GitHub repo named in the bot's instructions. Use at the start of any task that may depend on past work (projects, decisions, posts, people, preferences, "remember", "what did we decide") and at the end of every real task. Skip only small talk and one-line answers. --- # vault-memory All bots share ONE memory: this repo of Markdown notes. Read it with the GitHub connector (main branch); never ask the user for it. Read before you answer - Read ./index.md (the map) and your own _bots/<bot-name>.md if it exists, then only the 1-5 notes the task needs. Never scan the whole vault. - Trust the notes: don't re-research or re-ask what is written there. If the user now says otherwise, the user wins: write the correction. Write at the end of every real task (always when the user says "remember" or "save"), one note per task - New file inbox/YYYY-MM-DD-HHMM-<bot-name>-<topic>.md (UTC; never overwrite): a header (bot, date, topic), then 3-10 lines on what was asked, done, decided, liked or rejected and why, with sources. <bot-name> = your name in the bot list, lowercase with hyphens ("Grok Bot" -> grok-bot); never invent a name like bot or assistant. - You may keep a short page about yourself in _bots/<bot-name>.md (what you do, what you learned). - No tool that writes to the repo? Launch a cloud agent on it: "create this exact file with this content and commit it directly to main", then read it back from main. Can't write at all? Tell the user. Never skip silently. Never - Delete a file (to remove one: create the same file in trash/, then remove the original), edit notes outside inbox/ and your own _bots/<bot-name>.md unless the user names that note, reorganize the vault, force-push, or write passwords, tokens, keys or codes. - If a push fails: pull and push again; if it still fails, tell the user. ~~~ 3. Claude Code and Codex. Add this block to the end of ~/.claude/CLAUDE.md and, if `codex --version` works, of ~/.codex/AGENTS.md (create if missing, change nothing else; write VAULT as the real path; if you can't edit a file, print the block and tell me where to paste it): ~~~ ## Shared memory - My long-term memory is the Obsidian vault at VAULT (private repo OWNER/ai-memory). Before any task about past work, posts, projects, decisions or "remember": `git -C VAULT pull`, read VAULT/index.md, then only the notes you need. Don't ask me what is written there. - After a decision, a result, a verified fact (with source) or something I liked or rejected: update or create the right note, list new notes in VAULT/index.md, add a line to VAULT/log.md, commit and push. When I say "remember", always write it. - "Sort the inbox": move useful notes from inbox/ (my bots write there) into the right notes, move processed files to trash/. Never delete anything. Never write passwords, tokens or keys. ~~~ 4. Obsidian. Open it and tell me to click "Open folder as vault" and pick VAULT. Skip Obsidian Sync: GitHub syncs it for free. 5. Grok Bot. Print this message in a code block with OWNER filled in. Tell me to paste it into my main Grok Bot, do what it says if GitHub isn't connected, and from now on create new bots only through this main bot. ~~~ Set up shared memory for all my bots (one time): 1. Check that the GitHub connector can read my private repo OWNER/ai-memory. If not, tell me exactly what to click, then stop. 2. Save _bots/vault-memory/SKILL.md from that repo, word for word, as the skill vault-memory in my shared skill library (replace it if it exists). 3. Add these two lines to your own instructions, once each: "Long-term memory: the private GitHub repo OWNER/ai-memory (Obsidian vault). Before and after each task, use the vault-memory skill." and "Whenever a bot is created or you see a bot without the Long-term memory line, add that line to its instructions once, change nothing else, and tell me." 4. Add the Long-term memory line once to every other bot's instructions. Change nothing else. Skip group chats. 5. Test: read ./index.md and list its headings. Then create inbox/<YYYY-MM-DD-HHMM>-<your-bot-name>-memory-test.md with "memory test from <your-bot-name>", commit it to main (if you can only read GitHub, use a cloud agent as the skill says) and tell me the path. ~~~ 6. Check. When I write "done", run `git -C VAULT pull` and show me the bot's test note. If it's missing, tell me what to fix. End with 3 lines: where my memory lives, "create new bots through your main bot", "say remember to save something "

Sign in to see the full prompt

Continue with:

By logging in, you agree to our Terms of Use and Privacy Policy

Usage

This prompt is designed for use with productivity. Copy the prompt content above and paste it into your preferred AI tool.

For best results, you may customize the placeholders (indicated by square brackets or capital letters) with your specific requirements.

References

Categories:productivity| twitter| obsidian| github

Talk