← 返回 Skills 市场
jonathanjing

Discrawl Search

作者 Jonathan Jing · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
54
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install discrawl-search
功能描述
Search Discord message history via discrawl SQLite database. Use when the user asks about past conversations, previous discussions, historical messages, or a...
使用说明 (SKILL.md)

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 \x3Cchannel_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 = '\x3Cchannel_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 = '\x3Cuser_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 = '\x3Cchannel_id>'
ORDER BY created_at DESC
LIMIT 5;

Key Tables

Table Purpose
messages All messages (content, created_at, author_id, channel_id)
channels Channel metadata (name, topic, kind, guild_id)
members User info (username, global_name, nick)
message_fts FTS5 virtual table for full-text search
mention_events @mentions tracking
message_attachments File 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
安全使用建议
This skill appears to do what it says: query a local Discrawl SQLite database. Before installing or enabling it, confirm the following: 1) The agent environment actually has the 'discrawl' CLI and the database at ~/.discrawl/discrawl.db (the manifest did not declare these). 2) Understand privacy implications — the skill can read all stored Discord messages (raw_json, attachments metadata, etc.). Only enable it if you trust the agent and the environment. 3) The provided script interpolates user input directly into SQL executed via the shell; if you or the agent supply untrusted input this can break queries or be abused. If you plan to use this skill with external inputs, sanitize/parameterize queries or restrict to read-only, pre-built queries. 4) If you need stronger guarantees, ask the author to: declare the discrawl binary and config path in the manifest, add input sanitization or parameterized SQL, and include an install/check step that validates the DB path and permissions. If you are unsure, test the script locally on a copy of the DB first or run it in a restricted/sandboxed environment.
功能分析
Type: OpenClaw Skill Name: discrawl-search Version: 1.0.0 The skill bundle is designed to search local Discord message history via a SQLite database using the 'discrawl' CLI. However, it contains a significant SQL injection vulnerability in `scripts/search_history.sh`, where the `$QUERY` and `$CHANNEL_ID` variables are directly interpolated into SQL strings. While there is no evidence of intentional malice, data exfiltration, or backdoors, this flaw allows for potential database manipulation or unauthorized data access if the agent is provided with a crafted prompt.
能力评估
Purpose & Capability
The skill's name, description, SKILL.md, and included scripts all consistently target searching a local Discrawl SQLite database (~/.discrawl/discrawl.db). However, the runtime assumes the 'discrawl' CLI is available and that the local DB exists, yet the manifest declares no required binaries or config paths — a minor inconsistency in declarations (the skill does need access to the local DB and a discrawl binary to function).
Instruction Scope
SKILL.md and scripts instruct the agent to read/query the local Discrawl database (message contents, raw_json, members, channels). The script and examples also allow/encourage raw SQL queries and the provided search_history.sh directly interpolates user-supplied query and channel into SQL strings executed via the discrawl CLI. This creates two concerns: (1) the manifest does not declare the config path (~/.discrawl/discrawl.db) even though the skill reads it, and (2) the script is vulnerable to SQL-injection or shell-escaping issues if untrusted input is used. There are no instructions to send data to external endpoints.
Install Mechanism
There is no install spec (instruction-only), so nothing will be downloaded or written during install. The included script expects the 'discrawl' CLI to be present; absence of an install instruction is reasonable but the manifest should have declared the dependency.
Credentials
The skill requests no environment variables or credentials, which is proportionate. However it does access sensitive local data (Discord messages and raw_json in ~/.discrawl/discrawl.db). That access is consistent with the purpose but represents a privacy-sensitive capability the user should be aware of.
Persistence & Privilege
The skill is not marked always:true and doesn't request elevated platform privileges or modification of other skills. It is user-invocable and can be invoked autonomously per platform default; that is expected for skills of this kind.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install discrawl-search
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /discrawl-search 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: Discord history search via discrawl SQLite
元数据
Slug discrawl-search
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Discrawl Search 是什么?

Search Discord message history via discrawl SQLite database. Use when the user asks about past conversations, previous discussions, historical messages, or a... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 54 次。

如何安装 Discrawl Search?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install discrawl-search」即可一键安装,无需额外配置。

Discrawl Search 是免费的吗?

是的,Discrawl Search 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Discrawl Search 支持哪些平台?

Discrawl Search 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Discrawl Search?

由 Jonathan Jing(@jonathanjing)开发并维护,当前版本 v1.0.0。

💬 留言讨论