
Discrawl
FreeEfficiently manage and query your Discord archives.
Free · Opens the source repo
What Discrawl does
Discrawl is a command-line tool designed for users who need to manage and query their local Discord archives effectively. It prioritizes the use of locally stored data, allowing users to answer questions about their Discord interactions without relying on the Discord API unless necessary. This is particularly useful for maintaining privacy and ensuring quick access to information that is already available in the local database. The tool supports various commands for searching messages, accessing direct messages, and syncing data with Discord when required.
The tool operates by checking the freshness of the local database before executing queries. Users can easily check the status of their data and perform synchronization with the Discord API when the local data is stale or when specific external context is needed. Discrawl also provides a robust SQL interface for users who require precise data manipulation and reporting, making it suitable for both casual users and developers looking for detailed insights into their Discord interactions.
Discrawl is ideal for developers, community managers, or anyone who actively engages with Discord and needs a reliable way to archive and query their interactions. Its ability to operate without constant API calls makes it a valuable tool for users concerned about rate limits or data privacy. The built-in diagnostics and status checks ensure that users can maintain their data integrity and troubleshoot any issues that arise during usage.
With its focus on local data management and efficient querying capabilities, Discrawl is a powerful addition to any Discord user's toolkit, especially for those who frequently analyze their communication patterns or need to extract specific information from their archives.
When to use it
Use Discrawl when you need to access or analyze your Discord archives efficiently without relying on the Discord API for every query.
When not to use it
Discrawl is not suitable for users who do not have local archives or who need real-time updates from Discord, as it primarily operates on stored data.
What you can build with it
Analyzing Community Engagement
Use Discrawl to extract and analyze message data from your Discord server to understand community engagement trends.
Archiving Important Conversations
Quickly archive and retrieve important conversations from your Discord DMs or channels using Discrawl's search functionality.
Syncing Data for Reports
Sync your local Discord archive with the latest data from the Discord API to ensure your reports are accurate and up-to-date.
How to install Discrawl
View source1. Install with the skills CLI
npx skills add openclaw/openclaw/discrawl --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by openclawDiscrawl
Use local Discord archive data first for Discord questions. Hit Discord APIs only when the archive is stale, missing the requested scope, or the user asks for current external context.
Sources
- DB: platform-native XDG data dir, usually
${XDG_DATA_HOME:-~/.local/share}/discrawl/discrawl.dbon Linux or~/Library/Application Support/discrawl/discrawl.dbon macOS - Config: platform-native XDG config dir, with legacy fallback to
~/.discrawl/config.toml - Cache: platform-native XDG cache dir
- Logs: platform-native XDG state dir
- Git share repo: platform-native XDG data dir
- Repo:
openclaw/discrawl; use~/GIT/_Perso/discrawlonly after verifying its remote targetsopenclaw/discrawl, otherwise use a fresh checkout - Preferred CLI:
discrawl; fallback togo run ./cmd/discrawlfrom the repo if the installed binary is stale
Freshness
For recent/current questions, check freshness before analysis:
discrawl status --json
For precise freshness from the default database:
# Discrawl uses macOS ~/Library defaults unless XDG_DATA_HOME is explicitly set.
case "$(uname -s)" in
Darwin)
db="$HOME/Library/Application Support/discrawl/discrawl.db"
;;
*)
db="${XDG_DATA_HOME:-$HOME/.local/share}/discrawl/discrawl.db"
;;
esac
sqlite3 "$db" \
"select coalesce(max(updated_at),'') from sync_state where scope like 'channel:%';"
Routine diagnostics:
discrawl doctor
Desktop-local refresh:
discrawl sync --source wiretap
Bot API latest refresh, when credentials are available:
discrawl sync
Use --full only for deliberate historical backfills:
discrawl sync --full
If SQLite reports busy/locked, check for stray discrawl processes before retrying.
Query Workflow
- Resolve scope: guild, channel, DM, author, keyword, date range.
- Check freshness for recent/current requests.
- Prefer CLI search/messages for slices; use read-only SQL for exact counts.
- Report absolute date spans, counts, channel/DM names, and known gaps.
Use root or subcommand help for syntax: discrawl --help,
discrawl help search, discrawl search --help. Use
DISCRAWL_NO_AUTO_UPDATE=1 for read smokes when you do not want git-share
updates.
Common commands:
DISCRAWL_NO_AUTO_UPDATE=1 discrawl search --limit 20 "query"
discrawl messages --channel '#maintainers' --days 7 --all
discrawl dms --last 20
discrawl tui --dm
DISCRAWL_NO_AUTO_UPDATE=1 discrawl --json sql "select count(*) from messages;"
SQL
Use discrawl sql for exact counts, joins, and ranking queries when normal
CLI reads are too coarse. The command is read-only by default, accepts SQL as
args or stdin, and supports --json for agent parsing.
Useful examples:
DISCRAWL_NO_AUTO_UPDATE=1 discrawl --json sql "select count(*) as messages from messages;"
DISCRAWL_NO_AUTO_UPDATE=1 discrawl --json sql "select coalesce(nullif(c.name, ''), m.channel_id) as channel, count(*) as messages from messages m left join channels c on c.id = m.channel_id group by m.channel_id order by messages desc limit 20;"
DISCRAWL_NO_AUTO_UPDATE=1 discrawl --json sql "select coalesce(nullif(mm.display_name, ''), nullif(mm.global_name, ''), nullif(mm.username, ''), m.author_id) as author, count(*) as messages from messages m left join members mm on mm.guild_id = m.guild_id and mm.user_id = m.author_id group by m.guild_id, m.author_id order by messages desc limit 20;"
Never use --unsafe --confirm unless the user explicitly asks for a database
mutation and the write has been reviewed.
When the installed CLI lacks a new feature, build or run from a verified
openclaw/discrawl checkout before concluding the feature is missing.
Discord Boundaries
Bot API sync requires configured Discord bot credentials; do not invent token
availability. Desktop wiretap mode reads local Discord Desktop artifacts and
must not extract credentials, use user tokens, call Discord as the user, or
write to Discord application storage. Wiretap/Desktop cache DMs are local-only
and must not be described as part of the published Git snapshot. Git-share
snapshots must not include secrets or @me DM rows.
Verification
For repo edits, prefer existing Go gates:
GOWORK=off go test ./...
Then run targeted CLI smoke for the touched surface, for example:
discrawl doctor
discrawl status --json
DISCRAWL_NO_AUTO_UPDATE=1 discrawl search --limit 5 "test"
ClawSweeper Sandbox
Use the sandbox reader only:
discrawl-sandbox search --limit 20 "query"
discrawl-sandbox messages --channel clawtributors --days 7 --all
discrawl-sandbox status --json
This reader imports https://github.com/openclaw/discord-store.git into
/root/clawsweeper-sandbox-workspace/.discrawl/discrawl.db with
discord.token_source = "none". The published Git snapshot is public-channel
filtered; do not use /root/.discrawl/config.toml or the rich writer DB from
sandboxed public Discord sessions.
Frequently asked questions about Discrawl
Similar skills
Slidev
Create interactive web-based presentations with Markdown.
Axiom
Audit your assumptions for clearer decision-making.
2slides Presentation Generation
Generate professional presentations with AI.
Performance Review Writer
Draft personalized performance reviews effortlessly.
Legal Team Briefing
Generate contextual briefings for legal workflows.
Search
Efficiently find documents and discussions across connected sources.
