{"id":"5e83b4e2-bf14-4bed-ae0b-34cb63084e35","entityType":"agent","slug":"clawhub-jonathanjing-discrawl-search","name":"discrawl-search","canonicalUrl":"https://www.xpersona.co/agent/clawhub-jonathanjing-discrawl-search","canonicalPath":"/agent/clawhub-jonathanjing-discrawl-search","generatedAt":"2026-10-11T22:54:27.695Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-11T19:39:32.966Z","emptyReason":null},"description":"Search a user-authorized Discord history archive through discrawl's bounded search and message commands. Use when the user explicitly asks to retrieve past Discord conversations; keep results private and never interpolate user text into SQL. Skill: discrawl-search Owner: jonathanjing Summary: Search a user-authorized Discord history archive through discrawl's bounded search and message commands. Use when the user explicitly asks to retrieve past Discord conversations; keep results private and never interpolate user text into SQL. Tags: discord:1.0.0, history:1.0.0, latest:1.0.1, search:1.0.0 Version history: v1.0.1 | 2026-08-03T16:55:48.965Z | user Repla","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1K downloads reported by the source. Last updated 10/11/2026.","installCommand":"clawhub skill install s17aah0h06a3741dypyhe3a2xd85pgsx:discrawl-search","sourceUrl":"https://clawhub.ai/jonathanjing/discrawl-search","homepage":"https://clawhub.ai/jonathanjing/skills/discrawl-search","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/jonathanjing/discrawl-search","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/jonathanjing/skills/discrawl-search","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":60,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Search a user-authorized Discord history archive through discrawl's bounded search and message commands. Use when the user explicitly asks to retrieve past Disc"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-11T19:39:32.966Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T19:39:32.966Z","emptyReason":null},"stars":null,"forks":null,"downloads":1002,"likes":null,"task":null,"library":null,"packageName":null,"latestVersion":"1.0.1","tractionLabel":"1K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T19:39:32.954Z","emptyReason":null},"lastUpdatedAt":"2026-10-11T19:39:32.966Z","lastCrawledAt":"2026-10-11T19:39:32.954Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-12T19:39:32.954Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.1","createdAt":"2026-08-03T16:55:48.965Z","changelog":"Replace interpolated SQL with bounded discrawl argv calls, validate limits, and declare private-history handling and current OpenClaw metadata.","fileCount":5,"zipByteSize":4677},{"version":"1.0.0","createdAt":"2026-04-28T16:39:55.103Z","changelog":"Initial release: Discord history search via discrawl SQLite","fileCount":5,"zipByteSize":4413}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17aah0h06a3741dypyhe3a2xd85pgsx:discrawl-search","setupComplexity":"low","setupSteps":["Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-jonathanjing-discrawl-search/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-jonathanjing-discrawl-search/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-jonathanjing-discrawl-search/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-jonathanjing-discrawl-search/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-jonathanjing-discrawl-search/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-jonathanjing-discrawl-search/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-11T22:54:27.694Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-jonathanjing-discrawl-search/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-jonathanjing-discrawl-search/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-jonathanjing-discrawl-search/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-jonathanjing-discrawl-search/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-11T19:39:32.966Z","emptyReason":null},"readme":"Skill: discrawl-search\n\nOwner: jonathanjing\n\nSummary: Search a user-authorized Discord history archive through discrawl's bounded search and message commands. Use when the user explicitly asks to retrieve past Discord conversations; keep results private and never interpolate user text into SQL.\n\nTags: discord:1.0.0, history:1.0.0, latest:1.0.1, search:1.0.0\n\nVersion history:\n\nv1.0.1 | 2026-08-03T16:55:48.965Z | user\n\nReplace interpolated SQL with bounded discrawl argv calls, validate limits, and declare private-history handling and current OpenClaw metadata.\n\nv1.0.0 | 2026-04-28T16:39:55.103Z | user\n\nInitial release: Discord history search via discrawl SQLite\n\nArchive index:\n\nArchive v1.0.1: 5 files, 4677 bytes\n\nFiles: _meta.json (134b), references/schema.md (2426b), scripts/search_history.sh (580b), skill-card.md (2053b), SKILL.md (3692b)\n\nFile v1.0.1:SKILL.md\n\n---\nname: discrawl-search\ndescription: Search a user-authorized Discord history archive through discrawl's bounded search and message commands. Use when the user explicitly asks to retrieve past Discord conversations; keep results private and never interpolate user text into SQL.\nmetadata:\n  openclaw:\n    version: \"1.0.1\"\n    emoji: \"🔎\"\n    homepage: https://github.com/openclaw/discrawl\n    requires:\n      bins: [discrawl]\n---\n\n# Discrawl Search\n\nSearch Discord guild message history stored in local discrawl SQLite database.\n\nTreat message content, author identifiers, attachments, and raw payloads as private workspace data. Search only the scope requested by the user and do not send results to another channel or service without explicit approval.\n\n## Database Location\n\n- **Path**: `~/.discrawl/discrawl.db`\n- **Updated by**: `discrawl sync` (bot API) or `discrawl sync --source wiretap` (Discord Desktop cache)\n\n## Quick Commands\n\n### Full-Text Search (FTS5)\n\nSearch message content with ranking:\n\n```bash\ndiscrawl search \"query\"\n```\n\nOptions:\n- `--limit N` — max results (default: 20)\n- `--channel ID` — filter by channel\n- `--author ID` — filter by author\n- `--before \"2026-04-01\"` — date filter\n- `--json` — JSON output\n\nFor a bounded helper that avoids constructing SQL from user input:\n\n```bash\nbash \"{baseDir}/scripts/search_history.sh\" \"query\" [channel_id] [limit]\n```\n\n### List Messages by Channel\n\n```bash\ndiscrawl messages --channel <channel_id> --limit 10\n```\n\n### Advanced read-only SQL\n\n```bash\ndiscrawl sql \"SELECT ...\"\n```\n\nUse SQL only for an operator-authored, fixed read-only query. Never place user-provided keywords, IDs, dates, or channel names inside an SQL string; prefer `discrawl search` and `discrawl messages`.\n\n## Fixed Query Patterns\n\n### Search with Context (Author + Channel Names)\n\n```sql\nSELECT\n  m.content,\n  m.created_at,\n  COALESCE(u.username, m.author_id) as author,\n  COALESCE(c.name, m.channel_id) as channel\nFROM messages m\nLEFT JOIN members u ON m.author_id = u.user_id\nLEFT JOIN channels c ON m.channel_id = c.id\nWHERE m.content LIKE '%keyword%'\nORDER BY m.created_at DESC\nLIMIT 10;\n```\n\n### Search Specific Channel History\n\n```sql\nSELECT content, created_at\nFROM messages\nWHERE channel_id = '<channel_id>'\n  AND content LIKE '%keyword%'\nORDER BY created_at DESC\nLIMIT 20;\n```\n\n### Find User's Past Messages\n\n```sql\nSELECT m.content, m.created_at, c.name\nFROM messages m\nJOIN channels c ON m.channel_id = c.id\nWHERE m.author_id = '<user_id>'\nORDER BY m.created_at DESC\nLIMIT 20;\n```\n\n### Search with FTS5 (Best Relevance)\n\n```sql\nSELECT\n  m.content,\n  m.created_at,\n  fts.rank\nFROM message_fts fts\nJOIN messages m ON fts.message_id = m.id\nWHERE message_fts MATCH 'keyword'\nORDER BY rank\nLIMIT 20;\n```\n\n### Recent Messages in Channel\n\n```sql\nSELECT content, created_at\nFROM messages\nWHERE channel_id = '<channel_id>'\nORDER BY created_at DESC\nLIMIT 5;\n```\n\n## Key Tables\n\n| Table | Purpose |\n|-------|---------|\n| `messages` | All messages (content, created_at, author_id, channel_id) |\n| `channels` | Channel metadata (name, topic, kind, guild_id) |\n| `members` | User info (username, global_name, nick) |\n| `message_fts` | FTS5 virtual table for full-text search |\n| `mention_events` | @mentions tracking |\n| `message_attachments` | File attachments with text extraction |\n\n## Important Notes\n\n- `members` table may be sparse (2 rows in current db) — use `COALESCE(u.username, m.author_id)` for fallback\n- `normalized_content` column has cleaned text (lowercase, normalized whitespace)\n- `raw_json` has full Discord API payload for advanced queries\n- Use `LEFT JOIN` on members/channels to avoid missing rows when joins fail\n\nFile v1.0.1:_meta.json\n\n{\n  \"ownerId\": \"kn7ffnhm7z8g6e92rfq14svwcx81hkvw\",\n  \"slug\": \"discrawl-search\",\n  \"version\": \"1.0.1\",\n  \"publishedAt\": 1785776148965\n}\n\nFile v1.0.1:references/schema.md\n\n# Discrawl Database Schema Reference\n\n## Core Tables\n\n### messages\n| Column | Type | Description |\n|--------|------|-------------|\n| id | TEXT PK | Discord message ID |\n| guild_id | TEXT | Guild ID |\n| channel_id | TEXT | Channel ID |\n| author_id | TEXT | Author user ID |\n| message_type | INTEGER | Discord message type |\n| created_at | TEXT | ISO timestamp |\n| edited_at | TEXT | Edit timestamp |\n| deleted_at | TEXT | Deletion timestamp |\n| content | TEXT | Raw message content |\n| normalized_content | TEXT | Lowercase, normalized whitespace |\n| reply_to_message_id | TEXT | Reply reference |\n| pinned | INTEGER | Pinned flag |\n| has_attachments | INTEGER | Has attachments flag |\n| raw_json | TEXT | Full Discord API payload |\n| updated_at | TEXT | Last sync timestamp |\n\n### channels\n| Column | Type | Description |\n|--------|------|-------------|\n| id | TEXT PK | Channel ID |\n| guild_id | TEXT | Guild ID |\n| parent_id | TEXT | Parent category ID |\n| kind | TEXT | Channel type (text, voice, etc) |\n| name | TEXT | Channel name |\n| topic | TEXT | Channel topic |\n| position | INTEGER | Sort position |\n| is_nsfw | INTEGER | NSFW flag |\n| is_archived | INTEGER | Archived flag |\n| is_locked | INTEGER | Locked flag |\n| is_private_thread | INTEGER | Private thread flag |\n\n### members\n| Column | Type | Description |\n|--------|------|-------------|\n| guild_id | TEXT | Guild ID |\n| user_id | TEXT PK | User ID |\n| username | TEXT | Username |\n| global_name | TEXT | Global display name |\n| display_name | TEXT | Display name |\n| nick | TEXT | Guild nickname |\n| bot | INTEGER | Bot flag |\n| role_ids_json | TEXT | JSON array of role IDs |\n\n## FTS5 Virtual Tables\n\n### message_fts\nColumns: message_id, guild_id, channel_id, author_id, author_name, channel_name, content\n\n### member_fts\nColumns: member_key, guild_id, user_id, username, display_name, profile_text\n\n## Useful SQL Patterns\n\n### Count messages per channel\n```sql\nSELECT c.name, COUNT(*) as count\nFROM messages m\nJOIN channels c ON m.channel_id = c.id\nGROUP BY c.id\nORDER BY count DESC;\n```\n\n### Messages in date range\n```sql\nSELECT content, created_at\nFROM messages\nWHERE created_at >= '2026-04-01'\n  AND created_at < '2026-04-02'\nORDER BY created_at;\n```\n\n### Search with FTS ranking\n```sql\nSELECT m.content, m.created_at, rank\nFROM message_fts fts\nJOIN messages m ON fts.message_id = m.id\nWHERE message_fts MATCH 'OpenClaw MCP'\nORDER BY rank\nLIMIT 20;\n```\n\nFile v1.0.1:skill-card.md\n\n## Description:\n\nSearch a user-authorized Discord history archive through discrawl's bounded search and message commands.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[jonathanjing](https://clawhub.ai/user/jonathanjing)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and agent users use this skill to retrieve past Discord conversations from a user-authorized local discrawl archive while keeping message content, identifiers, attachments, and raw payloads private.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Search results may expose private Discord message content, author identifiers, attachments, or raw payloads from the local archive.\n\nMitigation: Search only the user-requested scope, keep results private, and avoid sending retrieved content to another channel or service without explicit approval.\n\nRisk: User-provided terms copied into SQL examples could produce unsafe or overbroad local archive queries.\n\nMitigation: Prefer the bounded discrawl search commands or helper script, validate limits, and reserve SQL for fixed read-only queries authored by the operator.\n\n## Reference(s):\n\n- [Discrawl Database Schema Reference](references/schema.md)\n- [Discrawl homepage](https://github.com/openclaw/discrawl)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, Shell commands, Guidance]\n\n**Output Format:** [Markdown with inline bash and SQL examples; bounded discrawl commands can emit JSON results.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Searches should stay scoped to the user's request and use tight limits, channel filters, or author filters when available.]\n\n## Skill Version(s):\n\n1.0.1 (source: SKILL.md metadata, artifact _meta.json, release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v1.0.0: 5 files, 4413 bytes\n\nFiles: references/schema.md (2426b), scripts/search_history.sh (1058b), skill-card.md (1869b), SKILL.md (3249b), _meta.json (134b)\n\nFile v1.0.0:SKILL.md\n\n---\nname: discrawl-search\ndescription: 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.\n---\n\n# Discrawl Search\n\nSearch Discord guild message history stored in local discrawl SQLite database.\n\n## Database Location\n\n- **Path**: `~/.discrawl/discrawl.db`\n- **Updated by**: `discrawl sync` (bot API) or `discrawl sync --source wiretap` (Discord Desktop cache)\n\n## Quick Commands\n\n### Full-Text Search (FTS5)\n\nSearch message content with ranking:\n\n```bash\ndiscrawl search \"query\"\n```\n\nOptions:\n- `--limit N` — max results (default: 20)\n- `--channel ID` — filter by channel\n- `--author ID` — filter by author\n- `--before \"2026-04-01\"` — date filter\n- `--json` — JSON output\n\n### List Messages by Channel\n\n```bash\ndiscrawl messages --channel <channel_id> --limit 10\n```\n\n### Raw SQL Queries\n\n```bash\ndiscrawl sql \"SELECT ...\"\n```\n\n## Common Query Patterns\n\n### Search with Context (Author + Channel Names)\n\n```sql\nSELECT\n  m.content,\n  m.created_at,\n  COALESCE(u.username, m.author_id) as author,\n  COALESCE(c.name, m.channel_id) as channel\nFROM messages m\nLEFT JOIN members u ON m.author_id = u.user_id\nLEFT JOIN channels c ON m.channel_id = c.id\nWHERE m.content LIKE '%keyword%'\nORDER BY m.created_at DESC\nLIMIT 10;\n```\n\n### Search Specific Channel History\n\n```sql\nSELECT content, created_at\nFROM messages\nWHERE channel_id = '<channel_id>'\n  AND content LIKE '%keyword%'\nORDER BY created_at DESC\nLIMIT 20;\n```\n\n### Find User's Past Messages\n\n```sql\nSELECT m.content, m.created_at, c.name\nFROM messages m\nJOIN channels c ON m.channel_id = c.id\nWHERE m.author_id = '<user_id>'\nORDER BY m.created_at DESC\nLIMIT 20;\n```\n\n### Search with FTS5 (Best Relevance)\n\n```sql\nSELECT\n  m.content,\n  m.created_at,\n  fts.rank\nFROM message_fts fts\nJOIN messages m ON fts.message_id = m.id\nWHERE message_fts MATCH 'keyword'\nORDER BY rank\nLIMIT 20;\n```\n\n### Recent Messages in Channel\n\n```sql\nSELECT content, created_at\nFROM messages\nWHERE channel_id = '<channel_id>'\nORDER BY created_at DESC\nLIMIT 5;\n```\n\n## Key Tables\n\n| Table | Purpose |\n|-------|---------|\n| `messages` | All messages (content, created_at, author_id, channel_id) |\n| `channels` | Channel metadata (name, topic, kind, guild_id) |\n| `members` | User info (username, global_name, nick) |\n| `message_fts` | FTS5 virtual table for full-text search |\n| `mention_events` | @mentions tracking |\n| `message_attachments` | File attachments with text extraction |\n\n## Important Notes\n\n- `members` table may be sparse (2 rows in current db) — use `COALESCE(u.username, m.author_id)` for fallback\n- `normalized_content` column has cleaned text (lowercase, normalized whitespace)\n- `raw_json` has full Discord API payload for advanced queries\n- Use `LEFT JOIN` on members/channels to avoid missing rows when joins fail\n\nFile v1.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn7ffnhm7z8g6e92rfq14svwcx81hkvw\",\n  \"slug\": \"discrawl-search\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1777394395103\n}\n\nFile v1.0.0:references/schema.md\n\n# Discrawl Database Schema Reference\n\n## Core Tables\n\n### messages\n| Column | Type | Description |\n|--------|------|-------------|\n| id | TEXT PK | Discord message ID |\n| guild_id | TEXT | Guild ID |\n| channel_id | TEXT | Channel ID |\n| author_id | TEXT | Author user ID |\n| message_type | INTEGER | Discord message type |\n| created_at | TEXT | ISO timestamp |\n| edited_at | TEXT | Edit timestamp |\n| deleted_at | TEXT | Deletion timestamp |\n| content | TEXT | Raw message content |\n| normalized_content | TEXT | Lowercase, normalized whitespace |\n| reply_to_message_id | TEXT | Reply reference |\n| pinned | INTEGER | Pinned flag |\n| has_attachments | INTEGER | Has attachments flag |\n| raw_json | TEXT | Full Discord API payload |\n| updated_at | TEXT | Last sync timestamp |\n\n### channels\n| Column | Type | Description |\n|--------|------|-------------|\n| id | TEXT PK | Channel ID |\n| guild_id | TEXT | Guild ID |\n| parent_id | TEXT | Parent category ID |\n| kind | TEXT | Channel type (text, voice, etc) |\n| name | TEXT | Channel name |\n| topic | TEXT | Channel topic |\n| position | INTEGER | Sort position |\n| is_nsfw | INTEGER | NSFW flag |\n| is_archived | INTEGER | Archived flag |\n| is_locked | INTEGER | Locked flag |\n| is_private_thread | INTEGER | Private thread flag |\n\n### members\n| Column | Type | Description |\n|--------|------|-------------|\n| guild_id | TEXT | Guild ID |\n| user_id | TEXT PK | User ID |\n| username | TEXT | Username |\n| global_name | TEXT | Global display name |\n| display_name | TEXT | Display name |\n| nick | TEXT | Guild nickname |\n| bot | INTEGER | Bot flag |\n| role_ids_json | TEXT | JSON array of role IDs |\n\n## FTS5 Virtual Tables\n\n### message_fts\nColumns: message_id, guild_id, channel_id, author_id, author_name, channel_name, content\n\n### member_fts\nColumns: member_key, guild_id, user_id, username, display_name, profile_text\n\n## Useful SQL Patterns\n\n### Count messages per channel\n```sql\nSELECT c.name, COUNT(*) as count\nFROM messages m\nJOIN channels c ON m.channel_id = c.id\nGROUP BY c.id\nORDER BY count DESC;\n```\n\n### Messages in date range\n```sql\nSELECT content, created_at\nFROM messages\nWHERE created_at >= '2026-04-01'\n  AND created_at < '2026-04-02'\nORDER BY created_at;\n```\n\n### Search with FTS ranking\n```sql\nSELECT m.content, m.created_at, rank\nFROM message_fts fts\nJOIN messages m ON fts.message_id = m.id\nWHERE message_fts MATCH 'OpenClaw MCP'\nORDER BY rank\nLIMIT 20;\n```\n\nFile v1.0.0:skill-card.md\n\n## Description: <br>\nSearch Discord message history stored in a local discrawl SQLite database. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[jonathanjing](https://clawhub.ai/user/jonathanjing) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers and workspace agents use this skill to search local Discord guild archives for prior messages, channels, authors, and time-bounded context when answering questions about past conversations. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Broad searches over local Discord archives can expose private or sensitive message content. <br>\nMitigation: Use explicit channel, author, and time filters, and only query archives the user is authorized to inspect. <br>\nRisk: The shell SQL helper is unsafe for untrusted query text unless hardened. <br>\nMitigation: Review or harden the helper before passing user-supplied strings, and prefer scoped discrawl search filters where possible. <br>\n\n\n## Reference(s): <br>\n- [Discrawl Database Schema Reference](references/schema.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, shell commands, code, guidance] <br>\n**Output Format:** [Markdown with inline shell commands and SQL examples] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May include discrawl CLI commands, SQL query patterns, filters, and concise guidance for searching local Discord archives.] <br>\n\n## Skill Version(s): <br>\n1.0.0 (source: server release metadata) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>","readmeExcerpt":"Skill: discrawl-search Owner: jonathanjing Summary: Search a user-authorized Discord history archive through discrawl's bounded search and message commands. Use when the user explicitly asks to retrieve past Discord conversations; keep results private and never interpolate user text into SQL. Tags: discord:1.0.0, history:1.0.0, latest:1.0.1, search:1.0.0 Version history: v1.0.1 | 2026-08-03T16:55:48.965Z | user Repla","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"discrawl search \"query\""},{"language":"bash","snippet":"bash \"{baseDir}/scripts/search_history.sh\" \"query\" [channel_id] [limit]"},{"language":"bash","snippet":"discrawl messages --channel <channel_id> --limit 10"},{"language":"bash","snippet":"discrawl sql \"SELECT ...\""},{"language":"sql","snippet":"SELECT\n  m.content,\n  m.created_at,\n  COALESCE(u.username, m.author_id) as author,\n  COALESCE(c.name, m.channel_id) as channel\nFROM messages m\nLEFT JOIN members u ON m.author_id = u.user_id\nLEFT JOIN channels c ON m.channel_id = c.id\nWHERE m.content LIKE '%keyword%'\nORDER BY m.created_at DESC\nLIMIT 10;"},{"language":"sql","snippet":"SELECT content, created_at\nFROM messages\nWHERE channel_id = '<channel_id>'\n  AND content LIKE '%keyword%'\nORDER BY created_at DESC\nLIMIT 20;"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: discrawl-search\ndescription: Search a user-authorized Discord history archive through discrawl's bounded search and message commands. Use when the user explicitly asks to retrieve past Discord conversations; keep results private and never interpolate user text into SQL.\nmetadata:\n  openclaw:\n    version: \"1.0.1\"\n    emoji: \"🔎\"\n    homepage: https://github.com/openclaw/discrawl\n    requires:\n      bins: [discrawl]\n---\n\n# Discrawl Search\n\nSearch Discord guild message history stored in local discrawl SQLite database.\n\nTreat message content, author identifiers, attachments, and raw payloads as private workspace data. Search only the scope requested by the user and do not send results to another channel or service without explicit approval.\n\n## Database Location\n\n- **Path**: `~/.discrawl/discrawl.db`\n- **Updated by**: `discrawl sync` (bot API) or `discrawl sync --source wiretap` (Discord Desktop cache)\n\n## Quick Commands\n\n### Full-Text Search (FTS5)\n\nSearch message content with ranking:\n\n```bash\ndiscrawl search \"query\"\n```\n\nOptions:\n- `--limit N` — max results (default: 20)\n- `--channel ID` — filter by channel\n- `--author ID` — filter by author\n- `--before \"2026-04-01\"` — date filter\n- `--json` — JSON output\n\nFor a bounded helper that avoids constructing SQL from user input:\n\n```bash\nbash \"{baseDir}/scripts/search_history.sh\" \"query\" [channel_id] [limit]\n```\n\n### List Messages by Channel\n\n```bash\ndiscrawl messages --channel <channel_id> --limit 10\n```\n\n### Advanced read-only SQL\n\n```bash\ndiscrawl sql \"SELECT ...\"\n```\n\nUse SQL only for an operator-authored, fixed read-only query. Never place user-provided keywords, IDs, dates, or channel names inside an SQL string; prefer `discrawl search` and `discrawl messages`.\n\n## Fixed Query Patterns\n\n### Search with Context (Author + Channel Names)\n\n```sql\nSELECT\n  m.content,\n  m.created_at,\n  COALESCE(u.username, m.author_id) as author,\n  COALESCE(c.name, m.channel_id) as channel\nFROM messages m\nLEFT JOIN members u ON m.author_id = u.user_id\nLEFT JOIN channels c ON m.channel_id = c.id\nWHERE m.content LIKE '%keyword%'\nORDER BY m.created_at DESC\nLIMIT 10;\n```\n\n### Search Specific Channel History\n\n```sql\nSELECT content, created_at\nFROM messages\nWHERE channel_id = '<channel_id>'\n  AND content LIKE '%keyword%'\nORDER BY created_at DESC\nLIMIT 20;\n```\n\n### Find User's Past Messages\n\n```sql\nSELECT m.content, m.created_at, c.name\nFROM messages m\nJOIN channels c ON m.channel_id = c.id\nWHERE m.author_id = '<user_id>'\nORDER BY m.created_at DESC\nLIMIT 20;\n```\n\n### Search with FTS5 (Best Relevance)\n\n```sql\nSELECT\n  m.content,\n  m.created_at,\n  fts.rank\nFROM message_fts fts\nJOIN messages m ON fts.message_id = m.id\nWHERE message_fts MATCH 'keyword'\nORDER BY rank\nLIMIT 20;\n```\n\n### Recent Messages in Channel\n\n```sql\nSELECT content, created_at\nFROM messages\nWHERE channel_id = '<channel_id>'\nORDER BY created_at DESC\nLIMIT 5;\n```\n\n## Key Tables\n\n| Table | Purpose |\n|-------|---------|\n| `messages` | All messages (content,"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7ffnhm7z8g6e92rfq14svwcx81hkvw\",\n  \"slug\": \"discrawl-search\",\n  \"version\": \"1.0.1\",\n  \"publishedAt\": 1785776148965\n}"},{"path":"references/schema.md","content":"# Discrawl Database Schema Reference\n\n## Core Tables\n\n### messages\n| Column | Type | Description |\n|--------|------|-------------|\n| id | TEXT PK | Discord message ID |\n| guild_id | TEXT | Guild ID |\n| channel_id | TEXT | Channel ID |\n| author_id | TEXT | Author user ID |\n| message_type | INTEGER | Discord message type |\n| created_at | TEXT | ISO timestamp |\n| edited_at | TEXT | Edit timestamp |\n| deleted_at | TEXT | Deletion timestamp |\n| content | TEXT | Raw message content |\n| normalized_content | TEXT | Lowercase, normalized whitespace |\n| reply_to_message_id | TEXT | Reply reference |\n| pinned | INTEGER | Pinned flag |\n| has_attachments | INTEGER | Has attachments flag |\n| raw_json | TEXT | Full Discord API payload |\n| updated_at | TEXT | Last sync timestamp |\n\n### channels\n| Column | Type | Description |\n|--------|------|-------------|\n| id | TEXT PK | Channel ID |\n| guild_id | TEXT | Guild ID |\n| parent_id | TEXT | Parent category ID |\n| kind | TEXT | Channel type (text, voice, etc) |\n| name | TEXT | Channel name |\n| topic | TEXT | Channel topic |\n| position | INTEGER | Sort position |\n| is_nsfw | INTEGER | NSFW flag |\n| is_archived | INTEGER | Archived flag |\n| is_locked | INTEGER | Locked flag |\n| is_private_thread | INTEGER | Private thread flag |\n\n### members\n| Column | Type | Description |\n|--------|------|-------------|\n| guild_id | TEXT | Guild ID |\n| user_id | TEXT PK | User ID |\n| username | TEXT | Username |\n| global_name | TEXT | Global display name |\n| display_name | TEXT | Display name |\n| nick | TEXT | Guild nickname |\n| bot | INTEGER | Bot flag |\n| role_ids_json | TEXT | JSON array of role IDs |\n\n## FTS5 Virtual Tables\n\n### message_fts\nColumns: message_id, guild_id, channel_id, author_id, author_name, channel_name, content\n\n### member_fts\nColumns: member_key, guild_id, user_id, username, display_name, profile_text\n\n## Useful SQL Patterns\n\n### Count messages per channel\n```sql\nSELECT c.name, COUNT(*) as count\nFROM messages m\nJOIN channels c ON m.channel_id = c.id\nGROUP BY c.id\nORDER BY count DESC;\n```\n\n### Messages in date range\n```sql\nSELECT content, created_at\nFROM messages\nWHERE created_at >= '2026-04-01'\n  AND created_at < '2026-04-02'\nORDER BY created_at;\n```\n\n### Search with FTS ranking\n```sql\nSELECT m.content, m.created_at, rank\nFROM message_fts fts\nJOIN messages m ON fts.message_id = m.id\nWHERE message_fts MATCH 'OpenClaw MCP'\nORDER BY rank\nLIMIT 20;\n```"},{"path":"skill-card.md","content":"## Description:\n\nSearch a user-authorized Discord history archive through discrawl's bounded search and message commands.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[jonathanjing](https://clawhub.ai/user/jonathanjing)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and agent users use this skill to retrieve past Discord conversations from a user-authorized local discrawl archive while keeping message content, identifiers, attachments, and raw payloads private.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Search results may expose private Discord message content, author identifiers, attachments, or raw payloads from the local archive.\n\nMitigation: Search only the user-requested scope, keep results private, and avoid sending retrieved content to another channel or service without explicit approval.\n\nRisk: User-provided terms copied into SQL examples could produce unsafe or overbroad local archive queries.\n\nMitigation: Prefer the bounded discrawl search commands or helper script, validate limits, and reserve SQL for fixed read-only queries authored by the operator.\n\n## Reference(s):\n\n- [Discrawl Database Schema Reference](references/schema.md)\n- [Discrawl homepage](https://github.com/openclaw/discrawl)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, Shell commands, Guidance]\n\n**Output Format:** [Markdown with inline bash and SQL examples; bounded discrawl commands can emit JSON results.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Searches should stay scoped to the user's request and use tight limits, channel filters, or author filters when available.]\n\n## Skill Version(s):\n\n1.0.1 (source: SKILL.md metadata, artifact _meta.json, release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment."}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"Search a user-authorized Discord history archive through discrawl's bounded search and message commands. Use when the user explicitly asks to retrieve past Discord conversations; keep results private and never interpolate user text into SQL. Skill: discrawl-search Owner: jonathanjing Summary: Search a user-authorized Discord history archive through discrawl's bounded search and message commands. Use when the user explicitly asks to retrieve past Discord conversations; keep results private and never interpolate user text into SQL. Tags: discord:1.0.0, history:1.0.0, latest:1.0.1, search:1.0.0 Version history: v1.0.1 | 2026-08-03T16:55:48.965Z | user Repla","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":1170,"uniquenessScore":45,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-11T19:39:32.966Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-11T19:39:32.966Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-11T22:54:27.695Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}