snippets-sync
Sync code snippets and notes between machines via file sync. Organized by language, rendered in any Markdown viewer (Obsidian, VS Code, etc.).
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/cdmichaelb/snippets-syncObsidian 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 to | Your 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, notsnippet-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:
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-cdmichaelb-snippets-sync": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
sleep-channel
Handle messages in a Discord sleep-tracking channel by grounding all sleep logging and summaries on the real sleep tracker and source Discord metadata. Use when working in a dedicated sleep channel, especially for adding sleep entries, correcting the latest entry, deleting the latest entry, or rendering the current sleep log without hallucinating timestamps, dates, or entries.
food-channel
Handle messages in a food-tracking channel by routing food intake events through a deterministic food tracker. Use when working in a dedicated food channel, especially for barcode lookups, photo estimates, and daily summaries.
publish-skill
Prepare and publish an OpenClaw skill to ClawHub. Handles PII/secret auditing, generalization, env var extraction, directory scaffolding, git init, and the clawhub publish command. Use when publishing a new skill or updating an existing one on ClawHub.
vitamin-tracker-channel
Manage vitamin/supplement reminders across configurable daily time slots via cron jobs. Use when adjusting supplement schedules, adding/removing supplements, or handling vitamin-related channel interactions. Triggers on "vitamin", "supplement", "vitamin reminder", "vitamin schedule".
medication-channel
Handle messages in a medication-tracking channel by routing medication events through a deterministic medication tracker instead of freehand model judgment. Use when working in a dedicated medication channel, especially for logging taken/missed/extra medication events, morning/evening completion, timestamp-grounded confirmations, and avoiding hallucinated reminders or fake times.