discrawl-search

Search Discord message history via discrawl SQLite database. Use when the user asks about past conversations, previous discussions, historical messages, or anything that requires searching through Discord guild message archives. Triggers on queries like "之前说过...", "以前讨论过...", "找一下之前的...", "search discord history", "past messages about...", or any question that implies looking up historical guild conversations. Supports keyword search, channel-specific search, user-specific search, and SQL queries.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "discrawl-search" with this command: npx skills add jonathanjing/discrawl-search

Discrawl Search

Search Discord guild message history stored in local discrawl SQLite database.

Database Location

  • Path: ~/.discrawl/discrawl.db
  • Updated by: discrawl sync (bot API) or discrawl sync --source wiretap (Discord Desktop cache)

Quick Commands

Full-Text Search (FTS5)

Search message content with ranking:

discrawl search "query"

Options:

  • --limit N — max results (default: 20)
  • --channel ID — filter by channel
  • --author ID — filter by author
  • --before "2026-04-01" — date filter
  • --json — JSON output

List Messages by Channel

discrawl messages --channel <channel_id> --limit 10

Raw SQL Queries

discrawl sql "SELECT ..."

Common Query Patterns

Search with Context (Author + Channel Names)

SELECT
  m.content,
  m.created_at,
  COALESCE(u.username, m.author_id) as author,
  COALESCE(c.name, m.channel_id) as channel
FROM messages m
LEFT JOIN members u ON m.author_id = u.user_id
LEFT JOIN channels c ON m.channel_id = c.id
WHERE m.content LIKE '%keyword%'
ORDER BY m.created_at DESC
LIMIT 10;

Search Specific Channel History

SELECT content, created_at
FROM messages
WHERE channel_id = '<channel_id>'
  AND content LIKE '%keyword%'
ORDER BY created_at DESC
LIMIT 20;

Find User's Past Messages

SELECT m.content, m.created_at, c.name
FROM messages m
JOIN channels c ON m.channel_id = c.id
WHERE m.author_id = '<user_id>'
ORDER BY m.created_at DESC
LIMIT 20;

Search with FTS5 (Best Relevance)

SELECT
  m.content,
  m.created_at,
  fts.rank
FROM message_fts fts
JOIN messages m ON fts.message_id = m.id
WHERE message_fts MATCH 'keyword'
ORDER BY rank
LIMIT 20;

Recent Messages in Channel

SELECT content, created_at
FROM messages
WHERE channel_id = '<channel_id>'
ORDER BY created_at DESC
LIMIT 5;

Key Tables

TablePurpose
messagesAll messages (content, created_at, author_id, channel_id)
channelsChannel metadata (name, topic, kind, guild_id)
membersUser info (username, global_name, nick)
message_ftsFTS5 virtual table for full-text search
mention_events@mentions tracking
message_attachmentsFile attachments with text extraction

Important Notes

  • members table may be sparse (2 rows in current db) — use COALESCE(u.username, m.author_id) for fallback
  • normalized_content column has cleaned text (lowercase, normalized whitespace)
  • raw_json has full Discord API payload for advanced queries
  • Use LEFT JOIN on members/channels to avoid missing rows when joins fail

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

会话日志分析

会话日志分析 - 搜索和分析历史会话日志,查找之前的对话内容和结果。

Registry SourceRecently Updated
310Profile unavailable
General

ClawHub技能探索工具

ClawHub技能探索和导航工具。帮助用户快速找到所需的技能,支持关键词搜索和分类浏览。

Registry SourceRecently Updated
1.1K1Profile unavailable
General

Search Cluster

Aggregated search aggregator using Google CSE, GNews RSS, Wikipedia, Reddit, and Scrapling.

Registry SourceRecently Updated
1.3K0Profile unavailable
General

企业年金查询技能 Pro

企业年金智能查询技能。搜索并确认企业年金信息,输出带来源链接和错误检查的标准化调查报告。只查询企业年金,不查询职业年金。

Registry SourceRecently Updated
2130Profile unavailable