Sync Claude Sessions
Export Claude Code conversations to Obsidian for observability and analysis.
Quick Reference
# Alias (add to ~/.zshrc)
alias cs="python3 ~/.claude/skills/sync-claude-sessions/scripts/claude-sessions"
# Common commands
cs list # Active sessions
cs list --all # All sessions
cs export --today # Export today's sessions
cs resume --pick # Interactive resume
cs note "got it working" # Add timestamped comment
cs close "done" # Mark session done
Commands
| Command |
Description |
sync |
Sync session (hook or explicit) |
export |
Batch export (--today, --all, <file>) |
resume |
Resume session (--pick, --active, <file>) |
note |
Add timestamped comment |
close |
Mark done + optional comment |
list |
List sessions (--active, --all, --json) |
Workflow Routing
| Task |
Workflow |
| Enable live sync hooks |
workflows/setup.md |
| Log/annotate session |
workflows/log-session.md |
Output
Sessions exported to Claude-Sessions/ with:
- Frontmatter:
type, date, session_id, title, summary, skills, messages, status, tags, rating, comments
- Content: Summary, Skills Used (linked), Artifacts (wiki-linked), My Notes, Conversation
Preserved on Sync
## My Notes section
- Frontmatter:
comments, related, status, tags, rating
Frontmatter Schema
See Templates/Types/claude-session.md for the canonical template.
type: claude-session
date: YYYY-MM-DD
session_id: uuid
title: "..."
summary: "..." # auto-generated by Claude Code or haiku
skills: [skill1, skill2]
messages: 42
last_activity: ISO timestamp
status: active | done | blocked | handoff
tags: [] # see schema/tags.yaml
rating: null # 1-10
comments: |
[2026-02-05 14:30] Comment here
[2026-02-05 15:00] Another comment
related: []
Tags Schema
Tags are defined in schema/tags.yaml with descriptions, keywords, and examples.
Type tags: research, implementation, debugging, planning, brainstorm, admin, quick, video, automation, writing
Project tags: lab, openclaw, personal, client
Agent should read schema/tags.yaml to validate tags when logging sessions.
1---2name: sync-claude-sessions3description: Sync Claude Code sessions to Obsidian markdown. Export, resume, add notes, close sessions. USE WHEN user says "sync sessions", "export sessions", "resume session", "add session note", "close session", "log session".4metadata:5 source: https://skillmd.com/skills/artemxtech/sync-claude-sessions6---78# Sync Claude Sessions910Export Claude Code conversations to Obsidian for observability and analysis.1112## Quick Reference1314```bash15# Alias (add to ~/.zshrc)16alias cs="python3 ~/.claude/skills/sync-claude-sessions/scripts/claude-sessions"1718# Common commands19cs list # Active sessions20cs list --all # All sessions21cs export --today # Export today's sessions22cs resume --pick # Interactive resume23cs note "got it working" # Add timestamped comment24cs close "done" # Mark session done25```2627## Commands2829| Command | Description |30|---------|-------------|31| `sync` | Sync session (hook or explicit) |32| `export` | Batch export (`--today`, `--all`, `<file>`) |33| `resume` | Resume session (`--pick`, `--active`, `<file>`) |34| `note` | Add timestamped comment |35| `close` | Mark done + optional comment |36| `list` | List sessions (`--active`, `--all`, `--json`) |3738## Workflow Routing3940| Task | Workflow |41|------|----------|42| Enable live sync hooks | [workflows/setup.md](workflows/setup.md) |43| Log/annotate session | [workflows/log-session.md](workflows/log-session.md) |4445## Output4647Sessions exported to `Claude-Sessions/` with:48- Frontmatter: `type`, `date`, `session_id`, `title`, `summary`, `skills`, `messages`, `status`, `tags`, `rating`, `comments`49- Content: Summary, Skills Used (linked), Artifacts (wiki-linked), My Notes, Conversation5051## Preserved on Sync5253- `## My Notes` section54- Frontmatter: `comments`, `related`, `status`, `tags`, `rating`5556## Frontmatter Schema5758> See `Templates/Types/claude-session.md` for the canonical template.5960```yaml61type: claude-session62date: YYYY-MM-DD63session_id: uuid64title: "..."65summary: "..." # auto-generated by Claude Code or haiku66skills: [skill1, skill2]67messages: 4268last_activity: ISO timestamp69status: active | done | blocked | handoff70tags: [] # see schema/tags.yaml71rating: null # 1-1072comments: |73 [2026-02-05 14:30] Comment here74 [2026-02-05 15:00] Another comment75related: []76```7778## Tags Schema7980Tags are defined in `schema/tags.yaml` with descriptions, keywords, and examples.8182**Type tags:** research, implementation, debugging, planning, brainstorm, admin, quick, video, automation, writing8384**Project tags:** lab, openclaw, personal, client8586Agent should read `schema/tags.yaml` to validate tags when logging sessions.