Skill 详情
obsidian-gh-knowledge
Bootstraps and manages Obsidian vaults with CLI and Git.
使用前先检查
自动化审核只检查相关性,不代表安全审查或推荐。使用前请阅读来源中的说明。
SKILL.md
这段内容是审核时保存的快照。外部来源才是完整且最新的版本。
---
name: obsidian-gh-knowledge
description: Bootstrap and operate an Obsidian vault with official Obsidian CLI first, then local filesystem/git fallback, then GitHub API fallback when local access is unavailable. Use when Codex needs first-run workspace init from a confirmed vault repo URL, project-scoped note reads and writes, vault health and readability audits, or structure cleanup in this vault. Verify current Obsidian CLI and Help syntax with Context7 instead of guessing, and use DeepWiki only for related public repo exploration.
---
# Obsidian GH Knowledge (CLI-first)
## TL;DR
- **Goal:** Bootstrap and operate the Obsidian vault using the safest and most optimal method depending on the environment context.
- **Execution Order:** 0. Bootstrap a local clone after repo confirmation -> 1. Local Obsidian CLI -> 2. Local fallback -> 3. GitHub API fallback.
- **Agent Rules:** Agents **must** read before write, include a `## TL;DR`, and **must** use Mermaid diagrams for visual explanations.
- **Project Scoping:** When working on a specific project (cmux, trends, etc.), **stay within that project's folder** under `5️⃣-Projects/GitHub/<project>/`. See "Project Scoping (CRITICAL)" section below.
- **Local Wrapper:** Use `scripts/local_obsidian_knowledge.py` for repeatable local macOS workflows that combine Obsidian CLI operations with this vault's project rules and git sync.
- **Raw Materials:** If the vault mounts `raw/` as a Git submodule, treat it as source-input storage rather than curated note space.
- **Inbox Split:** `raw/inbox` is the default intake lane for external source material. `0️⃣-Inbox` is curated staging for notes that already contain synthesis and still need routing.
- **Health Default:** Use `simplify-review` first when the vault feels hard to read or hard to trust; it reconciles full-vault Obsidian counts with active-scope graph checks and overview readability audits.
- **Git Sync:** For note updates, prefer pull/rebase before push, never force-push `main`, and record the sync outcome in today's daily log when the task is complete.
- **Git Bootstrap:** Local bootstrap must configure Git and the `raw/` submodule even when the Obsidian CLI is unavailable. Keep the baseline hook-free and clean up stale `core.hooksPath` config during bootstrap.
## Execution Mode Flowchart
```mermaid
graph TB
A[Start Vault Operation] --> B{Local vault exists}
B -- Yes --> C{Obsidian CLI ready}
B -- No --> D{Confirmed vault repo URL}
D -- Yes --> E[Clone vault into Documents]
D -- No --> F[Use GitHub mode]
E --> C
C -- Yes --> G[Use local CLI mode]
C -- No --> H[Use local git fallback]
G --> I[Run operation]
H --> I
F --> I
```
Use this skill to bootstrap and manage an Obsidian vault safely and consistently.
## Intake lane split (critical)
Keep the two inboxes semantically strict:
- `raw/inbox`: clipped articles, copied posts, transcripts, imported markdown, and other preserved source material.
- `0️⃣-Inbox`: curated notes that already contain synthesis, project framing, or structured writeup but still need routing.
Decision rule:
- If the user wants to preserve source material itself, use `capture-raw` into `raw/inbox`.
- If the user wants a note that already reflects reasoning or synthesis, use `capture` into `0️⃣-Inbox` or write directly into the final project folder.
- Do not use `0️⃣-Inbox` as a raw-material dumping ground.
- Search curated notes first and `raw/` second.
## Source of truth
- Primary live docs: Context7 Obsidian CLI index (`/websites/help_obsidian_md_cli`)
- Official CLI docs: `https://help.obsidian.md/cli/index`
- Public release note introducing CLI: `https://obsidian.md/changelog/2026-02-27-desktop-v1.12.4/`
- Upstream reusable skill set: `https://github.com/kepano/obsidian-skills`
Note: CLI docs may still show early-access wording in some sections. Treat the public changelog (February 27, 2026) as the release marker.
## Recommended skill layering
Use 在 GitHub 阅读完整来源 (打开外部页面)