home / skills / ladderchaos / tora-skills / sync-github-to-obsidian

sync-github-to-obsidian skill

/sync-github-to-obsidian

This skill syncs markdown documentation from GitHub projects into an Obsidian vault, preserving structure for easy navigation and offline access.

npx playbooks add skill ladderchaos/tora-skills --skill sync-github-to-obsidian

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
2.0 KB
---
name: sync-github-to-obsidian
description: Syncs markdown documentation from GitHub projects to Obsidian vault. Use when user wants to sync, export, or copy .md files from their code repositories to Obsidian for documentation browsing.
---

# Sync GitHub to Obsidian

Automatically extract and organize markdown documentation from GitHub projects into Obsidian vaults.

## Configuration

Default paths (can be overridden by user):

- **GitHub folder**: `/Users/danieltang/GitHub`
- **Obsidian vault**: `~/Obsidian`

## Instructions

1. **Scan the GitHub folder** for project directories:
   ```bash
   ls -la /Users/danieltang/GitHub
   ```

2. **For each project**, find relevant .md files excluding:
   - `node_modules/`
   - `.git/`
   - `lib/` (dependency folders)
   - `target/` (Rust build)
   - `.changeset/` (auto-generated changesets)

3. **Create project folders** in the Obsidian vault:
   ```bash
   mkdir -p ~/Obsidian/PROJECT_NAME
   ```

4. **Copy .md files** preserving directory structure:
   ```bash
   find /Users/danieltang/GitHub/PROJECT_NAME -name "*.md" -type f \
     -not -path "*/node_modules/*" \
     -not -path "*/.git/*" \
     -not -path "*/lib/*" \
     -not -path "*/target/*" \
     -not -path "*/.changeset/*" \
     | while read f; do
       relpath="${f#/Users/danieltang/GitHub/PROJECT_NAME/}"
       dir=$(dirname "$relpath")
       mkdir -p ~/Obsidian/PROJECT_NAME/"$dir"
       cp "$f" ~/Obsidian/PROJECT_NAME/"$relpath"
     done
   ```

5. **Report summary** with file counts per project

## Options

When user requests sync, ask if they want to:
- Sync all projects or specific ones
- Clean existing folders first (full refresh) or merge
- Include or exclude `_legacy/` and `_archive/` folders

## Example Usage

User: "sync my github to obsidian"
User: "update obsidian with latest docs from github"
User: "export markdown from sooth-alpha to obsidian"

## Output Format

Provide a summary table:

| Project | Files | Description |
|---------|-------|-------------|
| project-name | 42 | Brief description from README |

Overview

This skill sync-github-to-obsidian automates extracting and organizing Markdown documentation from GitHub project folders into an Obsidian vault. It preserves directory structure, filters out dependency and build artifacts, and produces a concise sync summary per project. Use it to keep Obsidian-based documentation up to date with repository READMEs and docs.

How this skill works

The skill scans a configured GitHub root folder for project directories, discovers .md files while excluding common noise folders (node_modules, .git, lib, target, .changeset), and recreates the matching project tree inside the target Obsidian vault. It copies files while preserving relative paths and can either merge with existing vault content or perform a full refresh by cleaning target folders first. After the run it reports file counts and a brief README-derived description per project.

When to use it

  • When you want local, browsable project documentation inside an Obsidian vault
  • Before knowledge-sharing sessions or onboarding to ensure docs are consolidated
  • To export Markdown docs from selected repositories into Obsidian for linking and note-taking
  • When automating periodic documentation snapshots from multiple repos
  • To migrate repository READMEs and docs into a personal knowledge base

Best practices

  • Configure and review the GitHub root and Obsidian vault paths before running
  • Exclude large dependency or build folders to avoid clutter and reduce run time
  • Choose merge mode for incremental updates or cleanup mode for a complete refresh
  • Optionally exclude _legacy/ or _archive/ folders to avoid importing outdated content
  • Verify README summaries in repositories to get useful project descriptions in the final report

Example use cases

  • Sync all repositories nightly into an Obsidian vault for searchable offline docs
  • Export specific project docs before a release to assemble a changelog or release notes in Obsidian
  • Merge updated Markdown from active repos into an existing vault without overwriting user edits in other notes
  • Perform a one-time import of repository docs into a fresh Obsidian vault for onboarding new team members
  • Exclude legacy folders and do a clean sync to rebuild vault structure from current sources

FAQ

Can I restrict sync to specific projects?

Yes. The tool can target all projects or a user-specified subset to limit which repositories are exported.

Will it overwrite my existing Obsidian notes?

You can choose merge mode to preserve existing content or enable a clean refresh to remove and replace target project folders; choose carefully to avoid data loss.