Configuration de mémoire de coffre Obsidian partagé pour les bots IA
De Wikiprompt, l’encyclopédie libre de prompts
Configuration de mémoire de coffre Obsidian partagé pour les bots IA Invite de flux de travail complet pour configurer un coffre Obsidian partagé dans un dépôt GitHub privé comme mémoire à long terme pour les bots Claude Code, Codex et Grok, incluant des fichiers de compétences, des blocs de configuration et des étapes d'intégration.
Contenu du PromptEnregistrer
🌐
Configurer une mémoire partagée à partir de zéro : un coffre Obsidian dans un dépôt GitHub privé, utilisé par Claude Code, Codex (si je l'ai) et tous mes bots Grok. Fais chaque étape toi-même ; arrête-toi seulement quand je dois cliquer ou me connecter, dis-moi exactement quoi faire et attends "done". Ne demande jamais et ne tape jamais de mots de passe, jetons ou codes. Ne supprime jamais et n'écrase jamais rien qui existe : demande d'abord. Parle-moi dans ma langue.
1. Outils. Installe ce qui manque. 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` pour git, `brew install gh`, `brew install --cask obsidian` (pas de Homebrew : les dernières versions GitHub de cli/cli et obsidianmd/obsidian-releases). Si `gh auth status` échoue, dis-moi de lancer `gh auth login -p https -w` dans ma propre fenêtre de terminal (quand il demande où j'utilise GitHub, choisis la première option), puis lance `gh auth setup-git`. OWNER = `gh api user --jq .login`.
2. Dépôt. `gh repo create ai-memory --private` (s'il existe, demande-moi ; si tu n'es pas autorisé à le lancer, dis-moi de le créer sur GitHub avec New repository : nom ai-memory, Private, pas de README, puis attends "done"). VAULT = ~/ai-memory (Windows : %USERPROFILE%\ai-memory). Là : `git init -b main` ; si git n'a pas d'email de commit, définis l'email de commit de ce dépôt sur l'email GitHub noreply de OWNER (id = `gh api user --jq .id`) et son nom de commit sur OWNER. Ajoute les fichiers ci-dessous, commit, ajoute OWNER/ai-memory comme remote origin sur HTTPS, `git push -u origin main`.
- ./index.md : "# Index", la ligne "Map of this vault: read it first, then only the notes you need.", et "## 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, mot pour mot :
~~~
---
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 et Codex. Ajoute ce bloc à la fin de ~/.claude/CLAUDE.md et, si `codex --version` fonctionne, de ~/.codex/AGENTS.md (crée-le s'il manque, ne change rien d'autre ; écris VAULT comme le chemin réel ; si tu ne peux pas éditer un fichier, imprime le bloc et dis-moi où le coller) :
~~~
## 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. Ouvre-le et dis-moi de cliquer sur "Open folder as vault" et de choisir VAULT. Saute Obsidian Sync : GitHub le synchronise gratuitement.
5. Bot Grok. Imprime ce message dans un bloc de code avec OWNER rempli. Dis-moi de le coller dans mon bot Grok principal, de faire ce qu'il dit si GitHub n'est pas connecté, et désormais de créer de nouveaux bots uniquement via ce bot principal.
~~~
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. Vérification. Quand j'écris "done", lance `git -C VAULT pull` et montre-moi la note de test du bot. Si elle manque, dis-moi quoi corriger. Termine avec 3 lignes : où vit ma mémoire, "create new bots through your main bot", "say remember to save something ".
Connectez-vous pour voir le prompt complet
Continuer avec:
En vous connectant, vous acceptez nos Conditions et Confidentialité
Utilisation
Ce prompt est conçu pour être utilisé avec productivity. Copiez le contenu ci-dessus et collez-le dans votre outil d’IA préféré.
Pour de meilleurs résultats, personnalisez les espaces réservés (indiqués par des crochets ou des majuscules) selon vos besoins.
Références
- Catégorie: Prompts productivity
- Source: https://x.com/0xCodila/status/2118763721526817169
Discussion
0 commentaires