snippets-sync

Sync code snippets and notes between machines via file sync. Organized by language, rendered in any Markdown viewer (Obsidian, VS Code, etc.).

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "snippets-sync" with this command: npx skills add cdmichaelb/snippets-sync

Obsidian Skill

How This Works

The vault is a directory of .md files synced between machines (typically via Syncthing, but any file sync works). Anything written to the vault appears on all synced devices.

Primary use case: Sharing code snippets, notes, and structured content through Obsidian — persists across sessions, renders nicely in Obsidian, and is searchable.

Vault Location

Set SNIPPETS_VAULT_PATH to your vault directory. Defaults to ~/snippets-vault if unset. Point this at a dedicated directory — not your home dir or any folder containing secrets.

Path
Vault$SNIPPETS_VAULT_PATH
Synced toYour other machines via Syncthing/rsync/etc.

Reading & Writing Notes

Direct File I/O (preferred)

Just read/write .md files in the vault directory. Obsidian picks up changes automatically via file sync.

Markdown Format

Notes are plain Markdown with optional YAML frontmatter:

---
created: 2026-04-05
tags: [snippet, python]
---

# Note Title

Content here. Use standard Markdown formatting.

Sharing Code Snippets

Naming Convention

code_snippets/
├── python/
│   └── http-server.md
├── bash/
│   └── find-large-files.md
├── typescript/
│   └── debounce.md
├── docker/
│   └── healthcheck.md
└── _uncategorized/
    └── random-thing.md

Rules:

  • Folder = language/tech (python/, bash/, typescript/, docker/, sql/, lua/, gdscript/, etc.)
  • Filename = what it does (kebab-case): json-parser.md, not snippet-001.md
  • No date prefixes — sort by modified time in Obsidian
  • One snippet per file — keeps things searchable and linkable
  • _uncategorized/ for anything that doesn't fit a clear bucket

Snippet Template

---
created: YYYY-MM-DD
language: <lang>
tags: [snippet, <lang>, <topic>]
---

# Descriptive Title

Description or context here.

\```<lang>
# code here
\```

Usage: `command to run if applicable`

When to Share via Obsidian vs Chat

Use Obsidian vault when:

  • Code snippets the user might reference later
  • Anything with syntax highlighting that benefits from persistence
  • Reference material or reusable code

Use chat directly when:

  • Quick one-off code blocks in active discussion
  • Transient stuff that doesn't need to persist

Notification Convention

When dropping a snippet, send a brief heads-up in chat:

"Dropped snippet: code_snippets/python/http-server.md"

Markdown Rules

These files render in Obsidian, not Discord/chat. Write standard CommonMark Markdown:

  • Headers: Use # / ## / ### — never **bold text** as a fake header
  • Code blocks: Always use fenced code blocks with language tag (```python) — never inline backticks for multi-line code
  • No chat-isms: No > blockquotes for emphasis, no ~~strikethrough~~ abuse, no platform-specific formatting
  • Links: Wikilinks ([[other-note]]) for internal references, standard [text](url) for external
  • Lists: Use - or 1. with proper indentation
  • Emphasis: *italic* and **bold** are fine — use sparingly, for actual emphasis
  • Tables: Standard Markdown tables

The goal: clean, readable notes that render well in Obsidian's reading view.

obsidian-cli (optional)

If obsidian-cli is installed and the vault is registered with Obsidian desktop:

obsidian-cli search "query"              # search note names
obsidian-cli search-content "query"      # search inside notes
obsidian-cli list                         # list files

Direct file I/O is the reliable path on headless Linux.

Safety

  • Only read/write .md files in the vault directory
  • Never touch .obsidian/ or other app config directories
  • Only point SNIPPETS_VAULT_PATH at a dedicated snippet/note directory — never at home, ~/.ssh, password stores, or credential-containing repos
  • Files written to the vault propagate to all synced machines

Tips

  • Don't touch .obsidian/ — that's Obsidian's config
  • File sync picks up changes automatically (typically within seconds)
  • Wikilinks work: [[other-note]] links between notes
  • Frontmatter is searchable in Obsidian
  • Use folders for organization — Obsidian handles them natively
  • Create language subfolders as needed — the vault grows with usage

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

Claude Chrome

Use Claude Code with Chrome browser extension for web browsing and automation tasks. Alternative to OpenClaw's built-in browser tools.

Registry SourceRecently Updated
Coding

App Builder

Build, edit, and deploy Instant-backed apps using npx instant-cli, create-instant-app (Next.js + Codex), GitHub (gh), and Vercel (vercel). Use when asked to create a new app, modify an existing app, fix bugs, add features, or deploy/update an app. Projects live under ~/apps; always work inside the relevant app folder.

Registry SourceRecently Updated
Coding

Opengraph Io

Extract web data, capture screenshots, scrape content, and generate AI images via OpenGraph.io. Use when working with URLs (unfurling, previews, metadata), capturing webpage screenshots, scraping HTML content, asking questions about webpages, or generating images (diagrams, icons, social cards, QR codes). Triggers: 'get the OG tags', 'screenshot this page', 'scrape this URL', 'generate a diagram', 'create a social card', 'what does this page say about'.

Registry SourceRecently Updated
Coding

Xlsx Pro

Compétence pour manipuler les fichiers Excel (.xlsx, .xlsm, .csv, .tsv). Utiliser quand l'utilisateur veut : ouvrir, lire, éditer ou créer un fichier tableur ; ajouter des colonnes, calculer des formules, formater, créer des graphiques, nettoyer des données ; convertir entre formats tabulaires. Le livrable doit être un fichier tableur. NE PAS utiliser si le livrable est un document Word, HTML, script Python standalone, ou intégration Google Sheets.

Registry SourceRecently Updated
2.1K0Profile unavailable