Aller au contenu
Hermès Skills
← Retour au catalogue

obsidian

Read, search, create, and edit notes in the Obsidian vault.

Quand l'utiliser (Trigger)

Déclenchement standard selon le contexte de l'écosystème Hermès.

Mode d'emploi (Usage)

Mode d'emploi standard via l'agent Hermès.

Obsidian Vault

Use this skill for filesystem-first Obsidian vault work: reading notes, listing notes, searching note files, creating notes, appending content, and adding wikilinks.

Vault path

Use a known or resolved vault path before calling file tools.

The documented vault-path convention is the OBSIDIAN_VAULT_PATH environment variable, for example from ~/.hermes/.env. If it is unset, the known vault path is /home/bf/second-brain/.

This vault follows the Karpathy RAG second brain pattern:

  • Full-text search via ~/second-brain/scripts/rag-query.sh
  • Vault layout: 01-Index/, 02-Projets/, 03-Devops/, 04-IA/, 05-Log/, 06-Emploi/, templates/
  • Cross-linked notes with wikilinks [[Note Name]]
  • Agents Claude Code utilisent ce vault comme source de vérité (via ~/.claude/CLAUDE.md)
  • Snapshots/rollback: ~/second-brain/scripts/vault-snapshot.sh (créer, lister, restaurer)
  • Templates disponibles dans ~/second-brain/templates/ (note-projet, note-log, note-agent)

File tools do not expand shell variables. Do not pass paths containing $OBSIDIAN_VAULT_PATH to read_file, write_file, patch, or search_files; resolve the vault path first and pass a concrete absolute path. Vault paths may contain spaces, which is another reason to prefer file tools over shell commands.

If the vault path is unknown, terminal is acceptable for resolving OBSIDIAN_VAULT_PATH or checking whether the fallback path exists. Once the path is known, switch back to file tools.

Read a note

Use read_file with the resolved absolute path to the note. Prefer this over cat because it provides line numbers and pagination.

List notes

Use search_files with target: "files" and the resolved vault path. Prefer this over find or ls.

  • To list all markdown notes, use pattern: "*.md" under the vault path.
  • To list a subfolder, search under that subfolder’s absolute path.

Use search_files for both filename and content searches. Prefer this over grep, find, or ls.

  • For filenames, use search_files with target: "files" and a filename pattern.
  • For note contents, use search_files with target: "content", the content regex as pattern, and file_glob: "*.md" when you want to restrict matches to markdown notes.

Create a note

Use write_file with the resolved absolute path and the full markdown content. Prefer this over shell heredocs or echo because it avoids shell quoting issues and returns structured results.

Append to a note

Prefer a native file-tool workflow when it is not awkward:

  • Read the target note with read_file.
  • Use patch for an anchored append when there is stable context, such as adding a section after an existing heading or appending before a known trailing block.
  • Use write_file when rewriting the whole note is clearer than constructing a fragile patch.

For an anchored append with patch, replace the anchor with the anchor plus the new content.

For a simple append with no stable context, terminal is acceptable if it is the clearest safe option.

Targeted edits

Use patch for focused note changes when the current content gives you stable context. Prefer this over shell text rewriting.

Vault Sync — Multi-device (VPS ↔ Windows/Linux/Mac)

Le vault est sur le VPS. La synchro utilise une architecture 3 niveaux backup mutuel :

🟢 07:00 rsync local VPS    — snapshot rapide, rétention 14 jours
🟣 07:30 Google Drive        — backup cloud compressé, 30 versions
🔵 08:00 git push → GitHub   — sync actif inter-machines

Chaque niveau est indépendant. Si un tombe, les deux autres tiennent.

Approche git (sync actif) ⭐

Le git push/pull n’utilise PAS le MCP GitHub — ce sont des commandes terminal standard (0 token overhead). Le MCP GitHub (8K tokens) sert uniquement pour issues/PRs/review.

Voir le guide complet → skill_view(name="obsidian", file_path="references/vault-sync.md")

Pourquoi pas CalDAV pour le vault ?

CalDAV est pour les tâches avec échéance (Vikunja), pas pour les notes Obsidian. Les notes n’ont pas de notion de date/durée — CalDAV ne sert à rien ici. Utiliser Git.

Journal quotidien (Daily Log)

Le vault utilise un mécanisme de journal quotidien dans 05-Log/ — fichiers YYYY-MM-DD.md créés automatiquement chaque jour via un cron Hermes.

Ce workflow couvre :

  • Récupération des événements du jour via session_search (browse + query ciblée + scroll)
  • Création de la note au format standard (YAML + résumé + 5 sections + barre nav)
  • Au moins 4-6 wikilinks par note (dont [[05-Log/README]] et [[index-general]] en haut et en bas)
  • Une section dédiée Liens du jour groupant les wikilinks par catégorie
  • Mise à jour de 01-Index/index-general.md dans la section Derniers ajouts

Voir le guide complet → skill_view(name="obsidian", file_path="references/daily-log.md")

Obsidian links notes with [[Note Name]] syntax. When creating notes, use these to link related content.

Absorbed: Vault Backup Strategy

references/vault-backup.md — 3-tier backup strategy for Obsidian vaults: local rsync + cloud sync + remote Git mirror. Previously a standalone skill (obsidian-vault-backup). Use this reference when setting up or troubleshooting vault backups.