{"skill":{"slug":"forge-obsidian-brain","displayName":"Forge Obsidian Brain","summary":"CLI tool for managing an AI's Obsidian vault with note CRUD, bidirectional sync, capture commands, and intelligent resurface. Local-only — no network access....","description":"---\nname: forge-obsidian-brain\ndescription: CLI tool for managing an AI's Obsidian vault with note CRUD, bidirectional sync, capture commands, and intelligent resurface. Local-only — no network access. Triggers on brain commands, vault management, note capture, fuzzy search, regex search, case-insensitive search, resurface stale/topic, or Obsidian-related operations.\n---\n\n# ForgeObsidianBrain\n\nAnalytics and capture layer for an AI's Obsidian vault. Auto-discovers vaults, manages note CRUD operations, captures fleeting thoughts, resurfaces forgotten knowledge, with fuzzy matching, regex patterns, and case-insensitive search.\n\n**Security Note:** See [SECURITY.md](SECURITY.md) for full security model. This skill operates entirely locally with no network access.\n\n---\n\n## Installation\n\n```bash\n# Clone or copy to your OpenClaw skills folder\ncp -r skills/forge-obsidian-brain ~/.openclaw/workspace/skills/\n\n# Make executable\nchmod +x ~/.openclaw/workspace/skills/forge-obsidian-brain/scripts/brain.js\n\n# Set up alias (optional)\nalias brain=\"node ~/.openclaw/workspace/skills/forge-obsidian-brain/scripts/brain.js\"\n```\n\n---\n\n## Configuration\n\nSet the default vault path via environment variable:\n\n```bash\nexport OBSIDIAN_VAULT=\"$HOME/obsidian-vault\"\n```\n\nOr specify `--vault <path>` for any command.\n\nThe skill auto-discovers vaults by:\n1. Checking `OBSIDIAN_VAULT` environment variable\n2. Reading Obsidian's config (`~/.config/obsidian/obsidian.json`)\n3. Falling back to `~/obsidian-vault`\n\n---\n\n## Commands\n\n### Core Commands\n\n| Command | Description |\n|---------|-------------|\n| `discover` | Auto-detect vault location |\n| `config` | Show Obsidian configuration |\n| `init` | Create Brain folder structure |\n| `sync` | Bidirectional sync with memory folder |\n\n### Note CRUD\n\n| Command | Usage |\n|---------|-------|\n| `read <path>` | Read a note |\n| `create <path> [content]` | Create a new note |\n| `update <path> [content]` | Update existing note |\n| `delete <path>` | Delete a note |\n| `list [folder]` | List notes in folder |\n| `search <query>` | Search notes by content (case-insensitive by default) |\n| `search <query> --fuzzy` | Fuzzy search (typo-tolerant) |\n| `search <query> --regex` | Regex pattern search |\n| `exists <path>` | Check if note exists |\n\n### Capture Commands\n\nCapture content to structured folders:\n\n| Command | Description |\n|---------|-------------|\n| `capture thought <text>` | Quick thought → `Brain/Thoughts/` |\n| `capture research --url <url> --title <title>` | Research ref → `Brain/Research/` |\n| `capture conversation --source <src> --id <id>` | Chat log → `Brain/Conversations/` |\n\n**Examples:**\n\n```bash\n# Fleeting thought\nbrain capture thought \"I should refactor the auth module\"\n\n# Research capture\nbrain capture research \\\n  --url \"https://martinfowler.com/articles/microservices.html\" \\\n  --title \"Microservices Guide\" \\\n  --text \"Key points about service boundaries\"\n\n# Conversation log\nbrain capture conversation \\\n  --source telegram \\\n  --id \"12345\" \\\n  --text \"User asked about distributed systems\"\n```\n\n### Resurface Commands\n\nFind relevant or neglected notes:\n\n| Command | Description |\n|---------|-------------|\n| `resurface topic <query>` | Fuzzy search with relevance scoring |\n| `resurface stale --days <n>` | Find notes untouched in N days |\n\n**Examples:**\n\n```bash\n# Find notes about microservices\nbrain resurface topic \"microservices\"\n\n# Find all notes older than 30 days\nbrain resurface stale --days 30 --limit 20\n```\n\n---\n\n## Options\n\n| Flag | Description |\n|------|-------------|\n| `--vault <path>` | Override vault location |\n| `--frontmatter '<json>'` | Add frontmatter to note |\n| `--merge` | Merge instead of replace frontmatter |\n| `--overwrite` | Allow overwriting existing notes |\n| `--limit <n>` | Limit results (default: 5) |\n| `--dry-run` | Preview sync without writing |\n| `--days <n>` | Days threshold for stale search |\n| `--fuzzy` | Use fuzzy matching for search |\n| `--regex` | Use regex pattern for search |\n| `--case-sensitive` | Force case-sensitive search |\n\n---\n\n## Workflow Examples\n\n### Daily Brain Maintenance\n\n```bash\n# 1. Initialize structure (once)\nbrain init\n\n# 2. Capture a thought\nbrain capture thought \"Kubernetes selectors are just labels as queries\"\n\n# 3. Save research for later\nbrain capture research \\\n  --url \"https://distcc.github.io/\" \\\n  --title \"Distributed Compilation\"\n\n# 4. Check for stale notes to review\nbrain resurface stale --days 14\n\n# 5. Sync to memory folder\nbrain sync\n```\n\n### Search and Resurface\n\n```bash\n# Case-insensitive search (new default)\nbrain search \"OpenClaw\"\n\n# Fuzzy search - matches \"opneclaw\" to \"openclaw\"\nbrain search \"opneclaw\" --fuzzy\n\n# Regex search\nbrain search \"^# .* Title\" --regex\n\n# Case-sensitive search\nbrain search \"OpenClaw\" --case-sensitive\n\n# Resurface topic with fuzzy matching\nbrain resurface topic distributed --limit 10\n\n# Output:\n# {\n#   \"success\": true,\n#   \"query\": \"distributed\",\n#   \"totalMatches\": 3,\n#   \"shown\": 3,\n#   \"searchMode\": \"fuzzy\",\n#   \"results\": [\n#     { \"relativePath\": \"Brain/Research/...\", \"relevance\": 5, \"rank\": 1, \"matches\": [...] },\n#     ...\n#   ]\n# }\n```\n\n---\n\n## Folder Structure\n\nAfter `brain init`, your vault gets these folders:\n\n```\nvault/\n├── Brain/\n│   ├── Thoughts/          # Quick captures\n│   ├── Research/          # URL references\n│   ├── Conversations/     # Chat logs\n│   ├── Entities/          # Structured data\n│   └── Relations/         # Connections\n└── .obsidian/\n    └── ...\n```\n\n---\n\n## Implementation Details\n\n- **Vault Discovery**: Cross-platform (Linux, macOS, Windows)\n- **Note Format**: Markdown with YAML frontmatter\n- **Search**: Uses grep for fast content matching\n- **Sync**: Bidirectional between `~/.openclaw/workspace/memory` and vault Inbox\n- **IDs**: Base36 timestamps for collision-resistant filenames\n\n---\n\n## Security\n\nThis skill operates entirely on the local filesystem with **no network access**:\n\n- **No external APIs** — No network requests are made\n- **No data exfiltration** — All data stays on your machine\n- **No arbitrary code execution** — `execSync` is used only for `grep` text search with strictly validated input\n- **Plain source code** — No obfuscation, all JavaScript is readable\n\nSee [SECURITY.md](SECURITY.md) for complete security documentation including data access patterns, credentials, and execution details.\n\n---\n\n## Related\n\n- [Obsidian](https://obsidian.md) - The knowledge base\n- [OpenClaw](../README.md) - Parent project\n","tags":{"latest":"1.0.2"},"stats":{"comments":0,"downloads":383,"installsAllTime":0,"installsCurrent":0,"stars":0,"versions":3},"createdAt":1777844270188,"updatedAt":1779076185286},"latestVersion":{"version":"1.0.2","createdAt":1777846343525,"changelog":"- Internal code improvements in note CRUD, search, sync, and vault management scripts.\n- No user-facing command or documentation changes in this release.","license":"MIT-0"},"metadata":null,"owner":{"handle":"lukeaustin13","userId":"s17f8b0m7p0mdh72e14zgrb7kd861e4c","displayName":"LukeAustin13","image":"https://avatars.githubusercontent.com/u/34007025?v=4"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1780090738002}}