doc-sync

A command that copies documentation files into an Obsidian research vault, which is a folder of linked notes. It scans files, checks whether they changed, classifies them, and records the sync activity.

In plain words
What is it for?
Keeping Markdown files such as README files, architecture notes, and project documentation up to date in Obsidian.
Why use it?
It reduces the need to find and copy changed documentation by hand. A dry-run option lets you preview what would be synced.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/thelobbi/claude/doc-sync
Clone the repo
git clone --depth 1 https://github.com/TheLobbi/claude

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,234 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01234
Opus 5 $0.00000 $0.00617
Sonnet 5 $0.00000 $0.00247
Haiku 4.5 $0.00000 $0.00123

Measured 2d ago against content hash 4413e2aae4e0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

doc-sync scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -X PUT "http://localhost:27123/vault/{path}" \
.claude/commands/doc-sync.md · 193 lines

How it starts

The opening of the file, as written. The whole thing — 193 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Documentation Sync Command

Automatically sync documentation files to the Obsidian research vault.

Command Metadata

```yaml command: doc-sync description: Scan for new/updated documentation and sync to Obsidian vault category: documentation priority: high auto_trigger: post-task, session-end ```

Usage

```bash

Manual execution

/doc-sync

With specific file

/doc-sync --file docs/architecture.md

Dry run (no actual sync)

/doc-sync --dry-run

Force sync (ignore hash check)

/doc-sync --force ```

Workflow

  1. Scan - Find all documentation files matching patterns
  2. Hash Check - Compare content hash with last sync
  3. Classify - Determine document type and target Obsidian path
  4. Sync - Upload to Obsidian vault via MCP
  5. Log - Record activity in documentation_log table

Configuration

Sync patterns defined in .claude/orchestration/config.json:

```json { "documentation": { "syncPatterns": [ "/*.md", "/README.md", "docs//*", ".claude/docs//*" ], "excludePatterns": [ "node_modules/", ".git/" ] } } ```

Examples

Sync All Documentation

```bash /doc-sync ```

Output: ``` Scanning for documentation files... Found 15 markdown files

Checking for changes... ├─ docs/architecture/system-design.md - CHANGED ├─ README.md - CHANGED ├─ docs/api/endpoints.md - UNCHANGED (skipped) └─ .claude/ARCHITECTURE_REFACTOR.md - CHANGED

Syncing 3 files to Obsidian... ✓ Synced: docs/architecture/system-design.md → Repositories/Alpha-1.4/Architecture/ ✓ Synced: README.md → Repositories/Alpha-1.4/ ✓ Synced: .claude/ARCHITECTURE_REFACTOR.md → Repositories/Alpha-1.4/Architecture/

Summary:

  • Total files scanned: 15
  • Files synced: 3
  • Files skipped: 12
  • Sync time: 1.2s ```

Sync Specific File

```bash /doc-sync --file docs/setup-guide.md ```

Dry Run

```bash /doc-sync --dry-run ```

Output shows what would be synced without actually syncing.

Read the full file on GitHub · 193 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 193 lines · 0 tokens per session scan A 4413e2aae4e0

Subscribe to this mod's changes

doc-sync is a command published in the GitHub repository TheLobbi/claude (21 stars, last pushed 5d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,234 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.