discord-sync

lycfyi's avatarfrom lycfyi

Sync Discord messages to local storage. Use when user asks to sync, pull, fetch, or download Discord messages.

⭐2stars🔀0forks📁View on GitHub🕐Updated Jan 9, 2026

When & Why to Use This Skill

This Claude skill enables the seamless synchronization of Discord messages, including server channels and direct messages, into local Markdown files. It facilitates efficient data archiving, offline reading, and structured analysis by providing incremental updates, customizable history ranges, and smart defaults for automated message fetching.

Use Cases

  • Archiving critical team discussions or community interactions from Discord servers for long-term local storage and compliance.
  • Building a searchable local knowledge base from Discord chat history to improve information retrieval and knowledge management.
  • Exporting Discord conversations into Markdown format for seamless integration with personal note-taking tools like Obsidian, Logseq, or Notion.
  • Performing offline data analysis on communication patterns and message history without requiring constant Discord API access.
  • Backing up private Direct Messages (DMs) to ensure important personal or professional conversations are preserved locally.
namediscord-sync
description"Sync Discord messages to local storage. Use when user asks to sync, pull, fetch, or download Discord messages."

Discord Sync

Syncs messages from Discord servers to local Markdown files for reading and analysis.

When to Use

  • User asks to "sync Discord messages"
  • User asks to "pull messages from Discord"
  • User wants to "get Discord history"
  • User wants to "update Discord data"
  • User wants to "download Discord messages"
  • User asks to "fetch messages from #channel"

Smart Defaults (Reduce Questions)

When user is vague, apply these defaults instead of asking:

User Says Default Action
"sync my Discord" Sync the configured default server from agents.yaml
"sync [server name]" Find server by name, sync with 7 days default
No --days specified Default to 7 days
"sync everything" List available servers and ask user to pick

Only ask for clarification when:

  • User's server name matches multiple servers
  • User explicitly asks "which servers can I sync?"

How to Execute

Sync all channels in configured server:

python ${CLAUDE_PLUGIN_ROOT}/tools/discord_sync.py

Sync specific channel:

python ${CLAUDE_PLUGIN_ROOT}/tools/discord_sync.py --channel CHANNEL_ID

Sync specific server:

python ${CLAUDE_PLUGIN_ROOT}/tools/discord_sync.py --server SERVER_ID

Sync with custom history range:

python ${CLAUDE_PLUGIN_ROOT}/tools/discord_sync.py --days 7

Full re-sync (ignore previous sync state):

python ${CLAUDE_PLUGIN_ROOT}/tools/discord_sync.py --full

Sync DMs

DMs are included by default. Use --no-dms to sync servers only.

Sync all (servers + DMs):

python ${CLAUDE_PLUGIN_ROOT}/tools/discord_sync.py

Sync servers only (exclude DMs):

python ${CLAUDE_PLUGIN_ROOT}/tools/discord_sync.py --no-dms

Sync a specific DM by channel ID:

python ${CLAUDE_PLUGIN_ROOT}/tools/discord_sync.py --dm CHANNEL_ID

Sync DMs with custom message limit (default: 100):

python ${CLAUDE_PLUGIN_ROOT}/tools/discord_sync.py --dm-limit 500

DM Message Limits

DM Limit (--dm-limit)

  • Default: 100 (privacy-conscious default)
  • Lower than server channel limit by design
  • Increase manually if needed: --dm-limit 500

Server Channel Limit (--limit)

  • Default: 200 for quick mode
  • Use config file to set higher limits for full sync

Output Location

All paths are relative to cwd (current working directory):

Server Messages

Messages saved to: ./data/{server_id}/{channel_name}/messages.md

Sync state tracked in: ./data/{server_id}/sync_state.yaml

DM Messages

DM messages saved to: ./dms/discord/{user_id}-{username}/messages.md

DM manifest: ./dms/discord/manifest.yaml

Prerequisites

  • ./.env file with DISCORD_USER_TOKEN set (in cwd)
  • ./config/agents.yaml with discord.default_server_id configured (unless using --server flag)

Incremental Sync

By default, sync is incremental - only new messages since last sync are fetched. Use --full to re-sync all messages within the date range.

Next Steps

After syncing, use discord-read skill to view or search messages.