obsidian-conversation-backup

0
0
Source

Automatic conversation backup system for Obsidian with incremental snapshots, hourly breakdowns, and formatted chat-style markdown. Use when setting up conversation archival, preventing data loss from /new resets, or organizing chat history in Obsidian vault with proper formatting (colored callouts, timestamps, multi-paragraph support).

Install

mkdir -p .claude/skills/obsidian-conversation-backup && curl -L -o skill.zip "https://mcp.directory/api/skills/download/6485" && unzip -o skill.zip -d .claude/skills/obsidian-conversation-backup && rm skill.zip

Installs to .claude/skills/obsidian-conversation-backup

About this skill

Obsidian Conversation Backup

Automatically backs up Clawdbot conversations to Obsidian with beautiful chat-style formatting. Prevents data loss from /new resets with hourly incremental snapshots.

Features

  • Incremental backups: Hourly snapshots of new messages only (no duplication)
  • Chat formatting: Obsidian callouts with emojis, timestamps, proper multi-paragraph support
  • Hourly breakdowns: Organize conversations by clock hour for easy reference
  • Zero token cost: Pure shell scripting, no LLM calls
  • Smart filtering: Skips empty messages and system notifications

Quick Setup

Installation

# Extract the skill (if downloaded as .skill file)
unzip obsidian-conversation-backup.skill
cd obsidian-conversation-backup

# Run installer (interactive)
chmod +x install.sh
./install.sh

The installer will ask for:

  • Obsidian vault path
  • Session directory location
  • Tracking files location

Or manual setup:

  1. Copy config.example to config
  2. Edit config with your paths
  3. Make scripts executable: chmod +x scripts/*.sh

Enable Automatic Backups

Add to crontab for hourly backups:

crontab -e

# Add this line (runs every hour at :00)
0 * * * * /path/to/obsidian-conversation-backup/scripts/monitor_and_save.sh

Customize Chat Appearance (Optional)

Edit scripts/format_message_v2.jq to change:

  • User emoji (default: 🐉)
  • Assistant emoji (default: 🦞)
  • Callout types (default: [!quote] for user, [!check] for assistant)

Usage

Automatic Incremental Backups

Once configured in cron, the system runs automatically:

Every hour:

  • Checks for new messages (≥10 lines)
  • Creates incremental snapshot if found
  • Saves to: YYYY-MM-DD-HHmm-incremental.md
  • Skips if no new conversation

Example output:

2026-01-20-1500-incremental.md (messages from last save to now)
2026-01-20-1600-incremental.md (new messages since 15:00)
2026-01-20-1700-incremental.md (new messages since 16:00)

Protection: Max conversation loss = 1 hour

On-Demand Full Snapshot

Save complete conversation anytime:

scripts/save_full_snapshot.sh [topic-name]

Examples:

scripts/save_full_snapshot.sh important-decisions
scripts/save_full_snapshot.sh bug-fix-discussion
scripts/save_full_snapshot.sh  # uses "full-conversation" as default

Hourly Breakdown (Organization)

Create organized breakdown by clock hour:

scripts/create_hourly_snapshots.sh YYYY-MM-DD

Example:

scripts/create_hourly_snapshots.sh 2026-01-20

Output:

2026-01-20-1500-hourly.md (15:00-15:59 messages)
2026-01-20-1600-hourly.md (16:00-16:59 messages)
2026-01-20-1700-hourly.md (17:00-17:59 messages)

Use case: End-of-day organization for easy reference

Chat Format

Messages appear as colored Obsidian callouts:

User messages (blue [!quote] callout):

> [!quote] 🐉 User · 15:30
> This is my message

Assistant messages (green [!check] callout):

> [!check] 🦞 Zoidbot · 15:31  
> This is the response

Features:

  • Timestamps (HH:MM format)
  • Multi-paragraph support (uses <br><br> for paragraph breaks)
  • Proper line wrapping (all lines prefixed with > )
  • Empty messages filtered out
  • System notifications excluded

Token Monitoring

The monitor_and_save.sh script also tracks token usage:

Warnings via Telegram:

  • 800k tokens (80%): "Consider /new soon"
  • 900k tokens (90%): "Run /new NOW"

Implementation:

# Sends warning only when crossing threshold (one-time)
# No repeated warnings
# Resets when back under 800k

File Structure

scripts/
├── monitor_and_save.sh           # Hourly incremental backup + token monitoring
├── save_full_snapshot.sh         # On-demand full conversation save
├── create_hourly_snapshots.sh    # Organize by clock hour
└── format_message_v2.jq          # Chat formatting logic

Configuration

Tracking Files

The system uses hidden files to track state:

/root/clawd/.last_save_line_count       # For token monitoring
/root/clawd/.last_snapshot_timestamp    # For incremental saves
/root/clawd/.token_warning_sent         # For warning deduplication

Note: Do not delete these files or incremental backups may duplicate content

Session File Location

Default: /root/.clawdbot/agents/main/sessions/*.jsonl

If your session files are elsewhere, update the SESSION_FILE path in each script.

Troubleshooting

No snapshots being created

  1. Check cron is running: crontab -l
  2. Verify script has execute permission: chmod +x scripts/*.sh
  3. Check logs: Run manually to see errors

Messages breaking out of callouts

  • Ensure format_message_v2.jq has the gsub("\n\n"; "<br><br>") line
  • Check that all lines have > prefix
  • Verify jq is installed: jq --version

Duplicated content in snapshots

  • Delete tracking files and let system reset:
    rm /root/clawd/.last_snapshot_timestamp
    

Empty callout boxes appearing

  • Update format_message_v2.jq to filter empty messages
  • Check for the if ($text_content | length) > 0 condition

Requirements

  • jq: JSON parsing (apt-get install jq)
  • cron: For automatic backups
  • Obsidian vault: Target directory for markdown files

Advanced Customization

Change Backup Frequency

Edit crontab:

# Every 2 hours
0 */2 * * * /path/to/monitor_and_save.sh

# Every 30 minutes
*/30 * * * * /path/to/monitor_and_save.sh

# Specific times only (9am, 12pm, 6pm, 9pm)
0 9,12,18,21 * * * /path/to/monitor_and_save.sh

Change Minimum Message Threshold

Edit monitor_and_save.sh:

# Change from 10 to 5 messages minimum
if [[ $new_lines -lt 5 ]]; then

Add More Callout Styles

Obsidian callout types:

  • [!quote] - Blue
  • [!check] - Green
  • [!note] - Cyan
  • [!tip] - Purple
  • [!warning] - Orange
  • [!danger] - Red

Customize Telegram Notifications

Edit monitor_and_save.sh to change warning text or add custom notifications.

Best Practices

  1. Run hourly breakdown at end of day - Use as organizational tool, not backup
  2. Keep incremental backups running - This is your safety net
  3. Test scripts after setup - Run manually first to verify output
  4. Backup tracking files - Include .last_snapshot_timestamp in vault backups
  5. Use descriptive topic names - For full snapshots, use meaningful names

Example Workflow

Daily routine:

  1. Automatic incremental backups run hourly (no action needed)
  2. At end of day: scripts/create_hourly_snapshots.sh 2026-01-20
  3. Review organized hourly files in Obsidian
  4. Delete old incrementals if desired (hourly breakdown covers them)

Before /new reset:

  1. Optional: scripts/save_full_snapshot.sh before-reset
  2. Run /new safely - conversation is backed up
  3. Continue chatting - incrementals resume automatically

Integration with Clawdbot

This skill works with:

  • HEARTBEAT.md: Automatic token monitoring
  • MEMORY.md: Conversation archival system
  • Telegram integration: Warning notifications
  • Any Obsidian vault: Works with existing vaults

Credits

Created by the Clawdbot community for reliable conversation backup and beautiful Obsidian formatting.

seedream-image-gen

openclaw

Generate images via Seedream API (doubao-seedream models). Synchronous generation.

2259

ffmpeg-cli

openclaw

Comprehensive video/audio processing with FFmpeg. Use for: (1) Video transcoding and format conversion, (2) Cutting and merging clips, (3) Audio extraction and manipulation, (4) Thumbnail and GIF generation, (5) Resolution scaling and quality adjustment, (6) Adding subtitles or watermarks, (7) Speed adjustment (slow/fast motion), (8) Color correction and filters.

6623

context-optimizer

openclaw

Advanced context management with auto-compaction and dynamic context optimization for DeepSeek's 64k context window. Features intelligent compaction (merging, summarizing, extracting), query-aware relevance scoring, and hierarchical memory system with context archive. Logs optimization events to chat.

3622

a-stock-analysis

openclaw

A股实时行情与分时量能分析。获取沪深股票实时价格、涨跌、成交量,分析分时量能分布(早盘/尾盘放量)、主力动向(抢筹/出货信号)、涨停封单。支持持仓管理和盈亏分析。Use when: (1) 查询A股实时行情, (2) 分析主力资金动向, (3) 查看分时成交量分布, (4) 管理股票持仓, (5) 分析持仓盈亏。

9121

himalaya

openclaw

CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).

7921

garmin-connect

openclaw

Syncs daily health and fitness data from Garmin Connect into markdown files. Provides sleep, activity, heart rate, stress, body battery, HRV, SpO2, and weight data.

7321

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

643969

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

591705

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

318398

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

339397

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

451339

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

304231

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.